major json update to show more complex configurations and additional parameters

This commit is contained in:
Johannes Findeisen 2013-06-05 04:19:27 +02:00
commit d9bc34f704

View file

@ -10,7 +10,13 @@
"hanez":{ "hanez":{
"name":"Johannes Findeisen", "name":"Johannes Findeisen",
"comment":"Just a nerd doing admin stuff...", "comment":"Just a nerd doing admin stuff...",
"parent": "darth",
"filters":{ "email":"you@hanez.org" } "filters":{ "email":"you@hanez.org" }
},
"darth":{
"name":"Darth Vader",
"comment":"The father",
"filters":{ "email":"darth.vader@hanez.org" }
} }
}, },
"periods":{ "periods":{
@ -29,13 +35,9 @@
}, },
"hostgroups":{ "hostgroups":{
"group1":{ "group1":{
"members":[ "members":[ "hanez" ],
"hanez" "hosts":[ "a.systemchaos.org", "b.systemchaos.org" ],
], "parents": [ "network" ],
"hosts":[
"a.systemchaos.org",
"b.systemchaos.org"
],
"services":[ "services":[
{ {
"class":"ping", "class":"ping",
@ -63,7 +65,7 @@
"threshold":2 "threshold":2
}, },
{ {
"class":"httpget", "class":"htmlcontent",
"args":{ "port":80, "path":"/status.cgi" }, "args":{ "port":80, "path":"/status.cgi" },
"periods": ["long"], "periods": ["long"],
"threshold":2, "threshold":2,
@ -71,7 +73,6 @@
"comment": "Just a string grep" "comment": "Just a string grep"
} }
] ]
}
}, },
"group2":{ "group2":{
"members":["hanez"], "members":["hanez"],
@ -98,15 +99,29 @@
"services":[ "services":[
{ {
"class":"ssh", "class":"ssh",
"args":{ "port":23, "command":"df" }, "args":{ "port": 23, "command": "df", "username": "hanez", "password": "secret", "key": "~/.ssh/id_rsa" },
"fails":{ "warning":"80%", "critical":"90%" }, "fails":{ "warning":"80%", "critical":"90%" },
"periods":[ "long" ], "periods":[ "long" ],
"threshold":10, "threshold":10,
"parser": [{ "class":"grep", "line": "/dev/sda1", "col":5 }, "parser": [{ "class":"grep", "line": "/dev/sda1", "col":5 },
{ "class":"grep", "line": "/dev/sda2", "col":5 } ] [{ "class":"grep", "line": "/dev/sda2", "col":5 }, { "class":"grep", "line": "/dev/sda2", "col":5 }]]
} }
] ]
}, },
"network":{
"members":[ "hanez" ],
"hosts":[ "router.systemchaos.org" ],
"services":[
{
"class":"ping",
"fails":{ "warning":"100ms", "critical":"150ms" },
"periods": ["short"],
"threshold":10,
"parser":{ "class":"shell", "line":2, "col":5 }
}
]
}
},
"layouts":{ "layouts":{
"production":{ "production":{
"hostgroups": [ "group1" ], "hostgroups": [ "group1" ],