Skip to content

Instantly share code, notes, and snippets.

@infotek
Last active March 2, 2018 16:44
Show Gist options
  • Save infotek/bbe825f15658067bb50ec4920455c833 to your computer and use it in GitHub Desktop.
Save infotek/bbe825f15658067bb50ec4920455c833 to your computer and use it in GitHub Desktop.
nagios plugins not graphing
./check-services.php -d
DEBUG!
SQL[SELECT * FROM `devices` AS D, `services` AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC]
<SNIP>
Nagios Service - 28
Request: /usr/lib/nagios/plugins/check_pg_localhost -H localhost ais
Perf Data - DS: datid, Value: 16384, UOM:
Perf Data - DS: datname, Value: ai, UOM: s
Perf Data - DS: numbackends, Value: 3, UOM:
Perf Data - DS: xact_commit, Value: 22736461, UOM:
Perf Data - DS: xact_rollback, Value: 8801054, UOM:
Perf Data - DS: blks_read, Value: 3265965, UOM:
Perf Data - DS: blks_hit, Value: 84993135, UOM:
Perf Data - DS: tup_returned, Value: 74188055, UOM:
Perf Data - DS: tup_fetched, Value: 381579, UOM:
Perf Data - DS: tup_inserted, Value: 20383790, UOM:
Perf Data - DS: tup_updated, Value: 9165, UOM:
Perf Data - DS: tup_deleted, Value: 1244, UOM:
Perf Data - DS: conflicts, Value: 0, UOM:
Perf Data - DS: temp_files, Value: 0, UOM:
Perf Data - DS: temp_bytes, Value: 0, UOM:
Perf Data - DS: deadlocks, Value: 0, UOM:
Perf Data - DS: blk_read_time, Value: 0, UOM:
Perf Data - DS: blk_write_time, Value: 0, UOM:
Response: OK
Service DS: {
"datid": "",
"datname": "s",
"numbackends": "",
"xact_commit": "",
"xact_rollback": "",
"blks_read": "",
"blks_hit": "",
"tup_returned": "",
"tup_fetched": "",
"tup_inserted": "",
"tup_updated": "",
"tup_deleted": "",
"conflicts": "",
"temp_files": "",
"temp_bytes": "",
"deadlocks": "",
"blk_read_time": "",
"blk_write_time": ""
}
RRD[update /opt/librenms/rrd/localhost/services-28.rrd N:16384:U:3:22736461:8801054:3265965:84993135:74188055:381579:20383790:9165:1244:0:0:0:0:0:0]
Sending localhost.services.services.28.datid 16384 1520003999
Sending localhost.services.services.28.datname ai 1520003999
Sending localhost.services.services.28.numbackends 3 1520003999
Sending localhost.services.services.28.xact_commit 22736461 1520003999
Sending localhost.services.services.28.xact_rollback 8801054 1520003999
Sending localhost.services.services.28.blks_read 3265965 1520003999
Sending localhost.services.services.28.blks_hit 84993135 1520003999
Sending localhost.services.services.28.tup_returned 74188055 1520003999
Sending localhost.services.services.28.tup_fetched 381579 1520003999
Sending localhost.services.services.28.tup_inserted 20383790 1520003999
Sending localhost.services.services.28.tup_updated 9165 1520003999
Sending localhost.services.services.28.tup_deleted 1244 1520003999
Sending localhost.services.services.28.conflicts 0 1520003999
Sending localhost.services.services.28.temp_files 0 1520003999
Sending localhost.services.services.28.temp_bytes 0 1520003999
Sending localhost.services.services.28.deadlocks 0 1520003999
Sending localhost.services.services.28.blk_read_time 0 1520003999
Sending localhost.services.services.28.blk_write_time 0 1520003999
mysql> SELECT * FROM `services` where device_id = '1' and service_id = '28' ;
+------------+-----------+------------+--------------+--------------+---------------+----------------+----------------+-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| service_id | device_id | service_ip | service_type | service_desc | service_param | service_ignore | service_status | service_changed | service_message | service_disabled | service_ds |
+------------+-----------+------------+--------------+--------------+---------------+----------------+----------------+-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 28 | 1 | localhost | pg_localhost | | | 0 | 0 | 1520002204 | OK | 0 | {"datid":"","datname":"s","numbackends":"","xact_commit":"","xact_rollback":"","blks_read":"","blks_hit":"","tup_returned":"","tup_fetched":"","tup_inserted":"","tup_updated":"","tup_deleted":"","conflicts":"","temp_files":"","temp_bytes":"","deadlocks":" |
+------------+-----------+------------+--------------+--------------+---------------+----------------+----------------+-----------------+-----------------+------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment