added some more snmp stuff using the shell service for executing the snmpget command using no builtin; cleanups...

This commit is contained in:
Johannes Findeisen 2013-06-10 04:14:02 +02:00
commit 71c76d665c

View file

@ -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 }
}
]
},
@ -120,15 +130,15 @@
{
"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" ],
"threshold": 10,
"parser":{ "class": "shell", "line": 2, "col": 5 }
"parser":{ "class": "shell", "line": 2, "col": 8 }
},
{
"class": "snmpget",
"comment": "The system load",
"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" ],
@ -136,7 +146,7 @@
},
{
"class": "snmpget",
"comment": "The system uptime",
"comment": "The Linux system uptime",
"args":{ "port": 161, "community": "linspector", "oid": ".1.3.6.1.2.1.1.3.0" },
"periods":[ "middle" ],
"threshold": 10