A couple of our systems got decommissioned and it led to check_ping to fail (obviously). So the output according to the GUI is:
Code: Select all
check_ping: Invalid hostname/address - ldan10
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
[-p packets] [-t timeout] [-4
However, the json breaks my Perl script (very ungracefully). It turns out that when the API creates the JSON, one of the characters turns into a nonprintable character (I'm guessing). Here is what I get if I just do a json query:
Code: Select all
"long_plugin_output": "Usage:check_ping -H <host_address> -w <wrta>,<wpl>? <crta>,<cpl>% [-p packets] [-t timeout] [-4",
and this is the output if I use decode_json().
Code: Select all
-bash-4.1$ ./broken_json.pl
malformed UTF-8 character in JSON string, at character offset 521 (before "\x{b0} <crta>,<cpl>%...") at ./broken_json.pl line 10
-bash-4.1$
thanks!