From d48c7957f8dfbb5964cfda3aaafc5ca62f2c95ac Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Mon, 10 Jun 2013 04:14:02 +0200 Subject: [PATCH] added some more snmp stuff using the shell service for executing the snmpget command using no builtin; cleanups... --- linspector.json | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/linspector.json b/linspector.json index c9b62cc..46ef879 100644 --- a/linspector.json +++ b/linspector.json @@ -4,7 +4,8 @@ "name": "Admin", "comment": "The Linspector Admin", "tasks":[{ "class": "email", "type": "warning", "args": { "rcpt": "admin@systems.hanez.org" }}, - { "class": "sms", "type": "critical", "args": { "rcpt": "+49112" }}] + { "class": "sms", "type": "critical", "args": { "rcpt": "+49112" }}, + { "class": "xmpp", "type": "critical", "args": { "rcpt": "admin@jabber.hanez.org" }}] }, "hanez":{ "name": "Johannes Findeisen", @@ -28,7 +29,7 @@ }, "hostgroups":{ "group1":{ - "members":[ "hanez", "mongodb" ], + "members":[ "hanez" ], "hosts":[ "a.systemchaos.org", "b.systemchaos.org" ], "parents":[ "network" ], "processors":[ @@ -104,6 +105,15 @@ "threshold":10, "parser": [{ "class":"grep", "line": "/dev/sda1", "col":5 }, [{ "class":"grep", "line": "/dev/sda2", "col":5 }, { "class":"grep", "line": "/dev/sda2", "col":5 }]] + }, + { + "class": "shell", + "comment": "Getting the Linux system load using the shell service and the snmpget command", + "args":{ "command": "snmpget -v2c -c linspector @host .1.3.6.1.4.1.2021.10.1.3.1" }, + "fails":{ "warning": "4.00", "critical":"8.00" }, + "periods":[ "middle" ], + "threshold": 10, + "parser":{ "class": "shell", "line": 1, "col": 4 } } ] }, @@ -113,32 +123,32 @@ "processors":[ { "class": "mongodb", - "args": { "host": "mongodb.hanez.org", "user": "mongo", "password": "secret", "database": "default"} + "args":{ "host": "mongodb.hanez.org", "user": "mongo", "password": "secret", "database": "default"} } ], "services":[ { "class": "shell", "comment": "ping using the shell service and no builtin", - "args": { "command": "ping -c4 @host" }, + "args":{ "command": "ping -c1 @host" }, "fails":{ "warning": "100ms", "critical":"150ms", "notes": "HeyHo! A ping failed, wake up! (@response)" }, - "periods": ["short"], + "periods":[ "short" ], "threshold": 10, - "parser":{ "class": "shell", "line": 2, "col": 5 } + "parser":{ "class": "shell", "line": 2, "col": 8 } }, { - "class":"snmpget", - "comment": "The system load", + "class": "snmpget", + "comment": "The Linux system load", "args":{ "port": 161, "community": "linspector", "oid": ".1.3.6.1.4.1.2021.10.1.3.1" }, "fails":{ "warning":"4.00", "critical":"8.00" }, - "periods": ["middle"], + "periods":[ "middle" ], "threshold": 10 }, { - "class":"snmpget", - "comment": "The system uptime", + "class": "snmpget", + "comment": "The Linux system uptime", "args":{ "port": 161, "community": "linspector", "oid": ".1.3.6.1.2.1.1.3.0" }, - "periods": ["middle"], + "periods":[ "middle" ], "threshold": 10 } ]