whitespacing... uuuh, the json file looks sexy now... ;)

This commit is contained in:
Johannes Findeisen 2013-06-10 04:42:26 +02:00
commit 1572d9e025

View file

@ -3,28 +3,28 @@
"root":{ "root":{
"name": "Admin", "name": "Admin",
"comment": "The Linspector Admin", "comment": "The Linspector Admin",
"tasks":[{ "class": "email", "type": "warning", "args": { "rcpt": "admin@systems.hanez.org" }}, "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" }}] { "class": "xmpp", "type": "critical", "args":{ "rcpt": "admin@jabber.hanez.org" }}]
}, },
"hanez":{ "hanez":{
"name": "Johannes Findeisen", "name": "Johannes Findeisen",
"comment": "Just a nerd doing admin stuff.", "comment": "Just a nerd doing admin stuff.",
"parent": "darth", "parent": "darth",
"tasks":[{ "class": "email", "type": "warning", "args": { "rcpt": "you@hanez.org" }}, "tasks":[{ "class": "email", "type": "warning", "args":{ "rcpt": "you@hanez.org" }},
{ "class": "sms", "type": "critical", "args": { "rcpt": "+49110" }}] { "class": "sms", "type": "critical", "args":{ "rcpt": "+49110" }}]
}, },
"darth":{ "darth":{
"name": "Darth Vader", "name": "Darth Vader",
"comment": "The father", "comment": "The father",
"tasks":{ "class": "email", "type": "warning", "args": { "rcpt": "darth.vader@hanez.org" }} "tasks":{ "class": "email", "type": "warning", "args":{ "rcpt": "darth.vader@hanez.org" }}
} }
}, },
"periods":{ "periods":{
"short":{ "seconds": 5, "comment": "Interval job; every 10 seconds" }, "short":{ "seconds": 5, "comment": "Interval job; every 10 seconds" },
"middle":{ "seconds": 60, "comment": "Interval job; every 60 seconds" }, "middle":{ "seconds": 60, "comment": "Interval job; every 60 seconds" },
"long":{ "minutes": 2, "comment": "Interval job; every 2 minutes" }, "long":{ "minutes": 2, "comment": "Interval job; every 2 minutes" },
"cron":{ "minute" : "0", "hour": "2", "comment": "cron job at 2"}, "cron":{ "minute" : "0", "hour": "2", "comment": "Cron job; at 2 o'clock" },
"christmas2013":{ "date": "2013-12-24 20:00:00", "comment": "Date Job; just one day at 8PM" } "christmas2013":{ "date": "2013-12-24 20:00:00", "comment": "Date Job; just one day at 8PM" }
}, },
"hostgroups":{ "hostgroups":{
@ -35,61 +35,61 @@
"processors":[ "processors":[
{ {
"class": "mongodb", "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":[ "services":[
{ {
"class":"ping", "class": "ping",
"fails":{ "warning":"100ms", "critical":"150ms" }, "fails":{ "warning":"100ms", "critical":"150ms" },
"periods": ["short"], "periods":[ "short" ],
"threshold":10, "threshold": 10,
"parser":{ "class":"shell", "line":2, "col":5 } "parser":{ "class": "shell", "line": 2, "col": 5 }
}, },
{ {
"class":"tcpconnect", "class": "tcpconnect",
"args":{ "port":80 }, "args":{ "port": 80 },
"periods": ["middle"], "periods":[ "middle" ],
"threshold":2 "threshold": 2
}, },
{ {
"class":"tcpconnect", "class": "tcpconnect",
"args":{ "port":25 }, "args":{ "port": 25 },
"periods":["long"], "periods":["long" ],
"threshold":2 "threshold": 2
}, },
{ {
"class":"tcpconnect", "class": "tcpconnect",
"args":{ "port":110 }, "args":{ "port": 110 },
"periods": ["long"], "periods":[ "long" ],
"threshold":2 "threshold": 2
}, },
{ {
"class":"http", "class": "http",
"args":{ "port": 80, "path": "/status.cgi", "method": "get", "params": { "foo": 1, "bar": 2 }, "protocol": "https"}, "args":{ "port": 80, "path": "/status.cgi", "method": "get", "params":{ "foo": 1, "bar": 2 }, "protocol": "https" },
"periods": ["long"], "periods":[ "long" ],
"threshold":2, "threshold": 2,
"parser":{ "class":"grep", "string": "<h1>I am up!</h1>" }, "parser":{ "class":"grep", "string": "<h1>I am up!</h1>" },
"comment": "Just a string grep" "comment": "Just a string grep"
} }
] ]
}, },
"group2":{ "group2":{
"members":["hanez"], "members":["hanez" ],
"hosts":["x.systemchaos.org", "y.systemchaos.org"], "hosts":["x.systemchaos.org", "y.systemchaos.org" ],
"services":[ "services":[
{ {
"class":"ping", "class": "ping",
"fails":{ "warning":"100ms", "critical":"150ms" }, "fails":{ "warning": "100ms", "critical": "150ms" },
"periods":["short"], "periods":[ "short" ],
"threshold":10, "threshold": 10,
"parser":{ "class":"shell", "line":2, "col":5 } "parser":{ "class": "shell", "line": 2, "col": 5 }
}, },
{ {
"class":"tcpconnect", "class": "tcpconnect",
"args":{ "port":2342 }, "args":{ "port": 2342 },
"periods":["long"], "periods":[ "long" ],
"threshold":2 "threshold": 2
} }
] ]
}, },
@ -98,13 +98,14 @@
"hosts":[ "master.systemchaos.org" ], "hosts":[ "master.systemchaos.org" ],
"services":[ "services":[
{ {
"class":"ssh", "class": "ssh",
"args":{ "port": 23, "command": "df", "username": "hanez", "password": "secret", "key": "~/.ssh/id_rsa" }, "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 },
{ "class":"grep", "line": "/dev/sda2", "col": 5 }]]
}, },
{ {
"class": "shell", "class": "shell",
@ -123,7 +124,7 @@
"processors":[ "processors":[
{ {
"class": "mongodb", "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":[ "services":[
@ -140,7 +141,7 @@
"class": "snmpget", "class": "snmpget",
"comment": "The Linux system load", "comment": "The Linux system load",
"args":{ "port": 161, "community": "linspector", "oid": ".1.3.6.1.4.1.2021.10.1.3.1" }, "args":{ "port": 161, "community": "linspector", "oid": ".1.3.6.1.4.1.2021.10.1.3.1" },
"fails":{ "warning":"4.00", "critical":"8.00" }, "fails":{ "warning": "4.00", "critical": "8.00" },
"periods":[ "middle" ], "periods":[ "middle" ],
"threshold": 10 "threshold": 10
}, },
@ -156,15 +157,15 @@
}, },
"layouts":{ "layouts":{
"production":{ "production":{
"hostgroups": [ "group1" ], "hostgroups":[ "group1" ],
"enabled": true "enabled": true
}, },
"critical":{ "critical":{
"hostgroups": [ "group3" ], "hostgroups":[ "group3" ],
"enabled": false "enabled": false
}, },
"all":{ "all":{
"hostgroups": [ "group1", "group2", "group3", "network" ], "hostgroups":[ "group1", "group2", "group3", "network" ],
"enabled": false "enabled": false
} }
}, },
@ -172,6 +173,6 @@
"max_logfile_size": 1024000, "max_logfile_size": 1024000,
"max_logfile_count": 4, "max_logfile_count": 4,
"max_worker_threads": 8, "max_worker_threads": 8,
"members": [ "root" ] "members":[ "root" ]
} }
} }