Implement curl request check

Hey everybody,

I need to implement a curl request check for an external Host. Unfortunately I’m pretty new in monitoring and icinga2. So I’m stuck at this point. But as far as I know, we have a distributed monitoring system.

I should check following curl request:

curl --data '{"method":"net_peerCount","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST

What i have done so far:
In /etc/icinga2/zones.d/ I have created a new Host

object Host "<Host-to-check>" {
  import "generic-host"
  address = "<ipAddress>"

Ping Checks are working fine now. So the curl request ist sill open. But I have no idea how to move on.

This source is looking quite interesting but there is no description how to use this.

According to the above source I would create the check command as follow

object CheckCommand "check-curl" {
  command = [ ConfigDir + "/scripts/" ]
  arguments += {
    "-U" = ""
    "-M" = "POST"
    "-H" = "Content-Type: application/json"
    "-B" = "method":"net_peerCount","params":[],"id":1,"jsonrpc":"2.0"
    "-C" = "jsonrpc":"2.0","result":"0x12","id":1

This source also is looking promising but honestly I dont understand what to do next.

Does somebody have an idea how I can tackle this issue and can help me with this?