check_http_json icon indicating copy to clipboard operation
check_http_json copied to clipboard

Define Host

Open chrisgerman opened this issue 4 years ago • 1 comments

How would the Host config look like for Nagios?

chrisgerman avatar Apr 21 '20 19:04 chrisgerman

Mine looks like this:

define command {
    command_name    check_http_json
    command_line    $USER2$/check_http_json.rb -u "$ARG1$" -e "$ARG2$" -p "$ARG2$" -w $ARG3$ -c $ARG4$
}

define service {
    use                  generic-service
    host_name            myhostname
    service_description  Site X JSON check
    check_command        check_http_json!https://www.my.domain/path/to/webservice!key1.key2!24000!30000
}

to pluck 2359 out of this data structure:

{
    "key1": {
        "key2": 2359
    }
}

jonjensen avatar Apr 21 '20 20:04 jonjensen