moved NG json to default file

This commit is contained in:
Johannes Findeisen 2013-06-05 06:22:38 +02:00
commit 533cf02c10
4 changed files with 357 additions and 358 deletions

View file

@ -1,230 +1,142 @@
{
"services":
{
"discusage": {"command": "ssh @host df -a @device", "parser": "df"},
"load": {"command": "ssh @host uptime"},
"dirsize": { "command": "ssh @host du -chs @path"},
"filesize": {"command": "ssh @host du -chs @path"},
"loggedinusercount": {"command": "ssh @host who | wc -l"},
"loggedinusers": {"command": "ssh @host who"},
"swapusage": {"command": "ssh @host cat /proc/swaps"},
"processcount": {"command": "ssh @host ps ax | wc -l"},
"processcountbyname": {"command": "ssh @host ps ax | grep @name | wc -l"},
"fileage": {"command": "ssh @host ls -l @file"},
"ping": {"command": "ping @host"},
"snmpget": {"command": "snmpget -v1 -c public $oid"},
"busy_waiting": {"command": "sleep 3600"},
"htmlcontent": {"command": "wget -qO- @url", "comment": "Get HTML Content for a string lookup."}
},
"filters":
{
"email":
{
"command": "/usr/bin/warn_the_admin_mail @member @+message",
"comment": "Sends an E-Mail to the member.",
"priority": 1
},
"sms":
{
"command": "/usr/bin/warn_the_admin_sms @member @+message",
"comment": "Sends a Short Message to the member.",
"priority": 0
},
"foo":
{
"command": "/usr/bin/warn_the_admin_foo @member @+message",
"priority": 500
},
"mongowriter":
{
"command": "./plugins/mongowriter.py @+message localhost 27017 linspector123",
"priority": 1000
"filters":{
"email":{
"command":"email @member @+message",
"comment":"Sends an E-Mail to the member.",
"priority":1
}
},
"members":
{
"hanez":
{
"name": "Johannes Findeisen",
"comment": "Just a nerd doing admin stuff...",
"parent": "admin",
"filters":
{
"email": "you@hanez.org",
"sms": "+23345567"
}
"members":{
"hanez":{
"name":"Johannes Findeisen",
"comment":"Just a nerd doing admin stuff...",
"parent": "darth",
"filters":{ "email":"you@hanez.org" }
},
"linspector":
{
"name": "Linspector BOT",
"comment": "Botty Botsen...",
"parent": "admin",
"filters":
{
"email": "botty@hanez.org",
"sms": "+23345567213123"
}
},
"unixpeople":
{
"name": "Hanna Findeisen",
"comment": "Master of UNIX",
"parent": "admin",
"filters":
{
"email": "master@hanez.org",
"sms": "+2334556733333"
}
},
"admin":
{
"name": "Peter Hansen",
"comment": "The son of Hans-Peter Hansen",
"parent": "ultraadmin",
"filters":
{
"email": "admin@systemchaos.org",
"sms": "+23345567",
"phone": "+435345345"
}
},
"ultraadmin":
{
"name": "Hans-Peter Hansen (CEO)",
"comment": "The guru of the Datacenter",
"parent": "darthvader",
"filters":
{
"email": "bofh@systemchaos.org",
"sms": "+23345567",
"phone": "+435345345"
}
},
"darthvader":
{
"name": "Darth Vader",
"comment": "The Father",
"filters":
{
"email": "darth.vader@systemchaos.org"
}
},
"jens":
{
"name": "Jens Larssen",
"comment": "Our network guru",
"filters":
{
"email": "jens@systemchaos.org",
"sms": "+23345567",
"phone": "+435345345"
}
},
"ruff":
{
"name": "Ruffn Buffn",
"filters":
{
"sms": "+23343457"
}
},
"mongowriter":
{
"name": "MongoDB Database writer plugin",
"filters":
{
"mongowriter": "localhost"
}
"darth":{
"name":"Darth Vader",
"comment":"The father",
"filters":{ "email":"darth.vader@hanez.org" }
}
},
"periods":
{
"twentyfourseven":
{
"year": "*",
"month": "*",
"day": "*",
"week": "*",
"hour": "*",
"minute": "*/1",
"second": "0",
"comment": "Cron Job / Every minute"
"periods":{
"short":{
"seconds":5,
"comment":"Interval job; every 10 seconds"
},
"do_every_x_times" : {
"days": 0,
"weeks": 0,
"hours": 0,
"minutes": 0,
"seconds": 10,
"comment": "Interval Job / Every 10 seconds"
"middle":{
"seconds":60,
"comment":"Interval job; every 60 seconds"
},
"next_christmas" : {
"date": "2013-12-24 20:00:00",
"comment": "Date Job / Just one day"
"long":{
"minutes":2,
"comment":"Interval job; every 2 minutes"
}
},
"hosts":
{
"hanez":
{
"host": "www.hanez.org",
"services":
{
"discusage":
[
{ "device": "/dev/sda1", "warning": "80%", "critical": "90%" },
{ "device": "/dev/sda2", "warning": "70%", "critical": "90%" },
{ "device": "/dev/sda3", "warning": "70GB", "critical": "90GB" }
],
"load":
[
{ "warning": 8.00, "critical": 12.00 }
],
"dirsize":
[
{ "path": "/var/log", "warning": 30000000, "critical": 40000000 }
],
"processcount":
[
{ "warning": 3000, "critical": 3800 }
],
"processcountbyname":
[
{ "name": "java", "warning": 100, "critical": 200 }
],
"fileage":
[
{ "file": "/var/backup/server_1", "warning": 2, "critical": 3 }
],
"htmlcontent":
[
{ "url": "@host/test.php", "content": "<h1>Server up!</h1>" }
],
"ping":
[
{}
]
}
"hostgroups":{
"group1":{
"members":[ "hanez" ],
"hosts":[ "a.systemchaos.org", "b.systemchaos.org" ],
"parents": [ "network" ],
"services":[
{
"class":"ping",
"fails":{ "warning":"100ms", "critical":"150ms" },
"periods": ["short"],
"threshold":10,
"parser":{ "class":"shell", "line":2, "col":5 }
},
{
"class":"tcpconnect",
"args":{ "port":80 },
"periods": ["middle"],
"threshold":2
},
{
"class":"tcpconnect",
"args":{ "port":25 },
"periods":["long"],
"threshold":2
},
{
"class":"tcpconnect",
"args":{ "port":110 },
"periods": ["long"],
"threshold":2
},
{
"class":"http",
"args":{ "port": 80, "path": "/status.cgi", "method": "get", "params": { "foo": 1, "bar": 2 }, "protocol": "https"},
"periods": ["long"],
"threshold":2,
"parser":{ "class":"grep", "string": "<h1>I am up!</h1>" },
"comment": "Just a string grep"
}
]
},
"group2":{
"members":["hanez"],
"hosts":["x.systemchaos.org", "y.systemchaos.org"],
"services":[
{
"class":"ping",
"fails":{ "warning":"100ms", "critical":"150ms" },
"periods":["short"],
"threshold":10,
"parser":{ "class":"shell", "line":2, "col":5 }
},
{
"class":"tcpconnect",
"args":{ "port":2342 },
"periods":["long"],
"threshold":2
}
]
},
"group3":{
"members":[ "hanez" ],
"hosts":[ "master.systemchaos.org" ],
"services":[
{
"class":"ssh",
"args":{ "port": 23, "command": "df", "username": "hanez", "password": "secret", "key": "~/.ssh/id_rsa" },
"fails":{ "warning":"80%", "critical":"90%" },
"periods":[ "long" ],
"threshold":10,
"parser": [{ "class":"grep", "line": "/dev/sda1", "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 }
}
]
}
},
"hostgroups":
{
"all":
{
"members": ["admin"],
"hosts": ["hanez"],
"parent": "network",
"threshold": 10,
"services":
{
"ping": ["do_every_x_times"]
}
"layouts":{
"production":{
"hostgroups": [ "group1" ],
"enabled": true
},
"critical":{
"hostgroups": [ "group3" ],
"enabled": false
},
"all":{
"hostgroups": [ "group1", "group2", "group3" ],
"enabled": false
}
},
"layouts": {"production": {"hostgroups": ["all", "hanez", "network"], "enabled": true},
"lazy": {"hostgroups": ["hanez", "ruff"], "enabled": false}
},
"core": {
"core":{
"max_logfile_size": 1024000,
"max_logfile_count": 4,
"max_worker_threads": 8