![]() |
![]() |
Subject: | Nagios Parser - single/multi-line/multiple key/value pairs parsing... |
Author: | [Not Specified] |
Posted: | 2014-06-18 17:19 |
If I have output similar to the stuff below, the Nagios parser doesn't seem to parse this as key/value pairs. It will parse the mon_count but that's it. I have tried to use the script as a single line output with each kv pair separated by a space, but that won't work either. Using ssh and Zenoss Datasource COMMAND, is there no way for the Nagios parser to parse out several values and put them in different datapoints
overall_status=HEALTH_OK
mon_count=3
healthy_mons=3
pg_count=2568
pg_clean_count=2568
osd_count=72
osd_up=72
osd_in=72
bytes_avail=143932600471552
bytes_used=23298977792
bytes_total=143955899449344
Subject: | Yes, the Nagios parser is |
Author: | Chet Luther |
Posted: | 2014-06-23 09:10 |
Yes, the Nagios parser is capable of handling multiple values. The script's output needs to look like this..
HEALTH_OK|mon_count=3 healthy_mons=3 pg_count=2568 pg_clean_count=2568 osd_count=72 osd_up=72 osd_in=72 bytes_avail=143932600471552 bytes_used=23298977792 bytes_total=143955899449344
The important things to note are that it is all on one line. The part before the pipe (|) is a text summary of the status. It will be turned into the event's summary if the scripts exits with a non-zero code. The part after the pipe are as many datapoint=value pairs as you'd like separated by spaces.
Make sure you add datapoints to the datasource in the monitoring template that are named exactly the same as what the script outputs. For example: mon_count, healthy_mons, pg_count, etc.
< |
Previous Can Zenoss Listen for SNMP Traps on 2 Ports? |
Next Datapoints return text, how do you threshold/graph/alert or even know it's worki ... |
> |