linspector-old/examples/linspector.json

216 lines
8.3 KiB
JSON
Raw Normal View History

2013-05-13 03:02:34 +02:00
{
2013-06-05 06:22:38 +02:00
"members":{
2013-06-07 02:20:27 +02:00
"root":{
"name": "Admin",
"comment": "The Linspector Admin",
2013-09-23 23:50:59 +02:00
"tasks":[{ "class": "mail", "type": "warning", "args":{ "rcpt": "admin@example.org" }},
{ "class": "sms", "type": "critical", "args":{ "rcpt": "+491120000000000" }},
{ "class": "jabber", "type": "critical", "args":{ "rcpt": "admin@example.org" }}]
2013-06-07 02:20:27 +02:00
},
2013-06-05 06:22:38 +02:00
"hanez":{
2013-09-23 23:50:59 +02:00
"name": "Hanez",
"comment": "Just a nerd doing admin stuff.",
2013-06-05 06:22:38 +02:00
"parent": "darth",
2013-09-23 23:50:59 +02:00
"tasks":[{ "class": "mail", "type": "warning", "args":{ "rcpt": "you@example.org" }},
{ "class": "sms", "type": "critical", "args":{ "rcpt": "+491100000000000" }}]
2013-05-16 04:57:12 +02:00
},
2013-06-05 06:22:38 +02:00
"darth":{
"name": "Darth Vader",
"comment": "The father",
2013-09-23 23:50:59 +02:00
"tasks":{ "class": "mail", "type": "warning", "args":{ "rcpt": "darth.vader@example.org" }}
2013-05-16 04:57:12 +02:00
}
},
2013-06-05 06:22:38 +02:00
"periods":{
"short":{ "seconds": 5, "comment": "Interval job; every 10 seconds" },
2013-06-07 02:20:27 +02:00
"middle":{ "seconds": 60, "comment": "Interval job; every 60 seconds" },
"long":{ "minutes": 2, "comment": "Interval job; every 2 minutes" },
"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" }
2013-05-16 04:57:12 +02:00
},
2013-06-05 06:22:38 +02:00
"hostgroups":{
"group1":{
"members":[ "hanez" ],
2013-09-23 23:50:59 +02:00
"hosts":[ "a.example.org", "b.example.org" ],
2013-06-07 02:20:27 +02:00
"parents":[ "network" ],
"processors":[
{
"class": "mongodb",
2013-09-23 23:50:59 +02:00
"args":{ "host": "mongodb.example.org", "user": "mongo", "password": "secret", "database": "default" }
2013-06-18 05:36:13 +02:00
},
{
"class": "syslog",
2013-09-23 23:50:59 +02:00
"args":{ "host": "syslog.example.org", "user": "syslog", "password": "secret" }
},
{
"class": "mariadb",
2013-09-23 23:50:59 +02:00
"args":{ "host": "mariadb.example.org", "port": "3306", "user": "maria", "password": "secret", "database": "linspector" }
2013-06-07 02:20:27 +02:00
}
],
2013-06-05 06:22:38 +02:00
"services":[
{
"class": "ping",
2013-06-10 06:52:45 +02:00
"fails":{ "warning": "100ms", "critical": "150ms" },
"periods":[ "short" ],
"threshold": 10,
"parser":{ "class": "shell",
"args":{ "line": 2, "col": 5 }}
2013-06-05 06:22:38 +02:00
},
{
"class": "tcpconnect",
"args":{ "port": 80 },
"periods":[ "middle" ],
"threshold": 2
2013-06-05 06:22:38 +02:00
},
{
"class": "tcpconnect",
"args":{ "port": 25 },
2013-06-10 06:52:45 +02:00
"periods":[ "long" ],
"threshold": 2
2013-06-05 06:22:38 +02:00
},
{
"class": "tcpconnect",
"args":{ "port": 110 },
"periods":[ "long" ],
"threshold": 2
2013-06-05 06:22:38 +02:00
},
{
"class": "http",
2013-06-10 06:52:45 +02:00
"args":{ "port": 80, "path": "/status.cgi", "method": "get",
"params":{ "action": "go", "value": 1 },
"protocol": "https" },
"periods":[ "long" ],
"threshold": 2,
"parser":{ "class": "grep",
"args":{ "string": "<h1>I am up!</h1>" }},
2013-06-05 06:22:38 +02:00
"comment": "Just a string grep"
}
]
},
"group2":{
2013-06-10 06:52:45 +02:00
"members":[ "hanez" ],
2013-09-23 23:50:59 +02:00
"hosts":["x.example.org", "y.example.org" ],
2013-06-05 06:22:38 +02:00
"services":[
{
"class": "ping",
"fails":{ "warning": "100ms", "critical": "150ms" },
"periods":[ "short" ],
"threshold": 10,
"parser":{ "class": "shell",
"args":{ "line": 2, "col": 5 }}
2013-06-05 06:22:38 +02:00
},
{
"class": "tcpconnect",
"args":{ "port": 2342 },
"periods":[ "long" ],
"threshold": 2
2013-06-05 06:22:38 +02:00
}
]
},
"group3":{
"members":[ "hanez" ],
2013-09-23 23:50:59 +02:00
"hosts":[ "master.example.org" ],
2013-06-05 06:22:38 +02:00
"services":[
{
"class": "ssh",
2013-06-05 06:22:38 +02:00
"args":{ "port": 23, "command": "df", "username": "hanez", "password": "secret", "key": "~/.ssh/id_rsa" },
"fails":{ "warning": "80%", "critical": "90%" },
2013-06-05 06:22:38 +02:00
"periods":[ "long" ],
"threshold": 10,
"parser":[{ "class": "grep",
"args":{ "line": "/dev/sda1", "col": 5 }},
[{ "class": "grep",
"args":{ "line": "/dev/sda2", "col": 5 }},
{ "class": "grep",
"args":{ "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" },
2013-06-10 06:52:45 +02:00
"fails":{ "warning": 4.00, "critical": 8.00 },
"periods":[ "middle" ],
"threshold": 10,
"parser":{ "class": "shell",
"args":{ "line": 1, "col": 4 }}
2013-06-05 06:22:38 +02:00
}
]
},
"network":{
"members":[ "hanez" ],
2013-09-23 23:50:59 +02:00
"hosts":[ "router.example.org" ],
"processors":[
{
"class": "mongodb",
2013-09-23 23:50:59 +02:00
"args":{ "host": "mongodb.example.org", "user": "mongo", "password": "secret", "database": "default" }
}
],
2013-06-05 06:22:38 +02:00
"services":[
{
"class": "shell",
"comment": "ping using the shell service and no builtin",
"args":{ "command": "ping -c1 @host" },
2013-06-10 06:52:45 +02:00
"fails":{ "warning": "100ms", "critical": "150ms", "notes": "HeyHo! A ping failed, wake up! (@response)" },
"periods":[ "short" ],
"threshold": 10,
"parser":{ "class": "shell",
"args":{ "line": 2, "col": 8 }}
},
{
2013-10-01 01:44:35 +02:00
"template": "snmpget_linux_load",
"fails":{ "warning": 2.00, "critical": 4.00 }
},
{
"class": "snmpget",
2013-06-10 06:52:45 +02:00
"comment": "The Linux system uptime just processed... not more.",
"args":{ "port": 161, "community": "linspector", "oid": ".1.3.6.1.2.1.1.3.0" },
"periods":[ "middle" ],
"threshold": 10
2013-06-05 06:22:38 +02:00
}
]
2013-05-16 04:57:12 +02:00
}
},
2013-06-05 06:22:38 +02:00
"layouts":{
"production":{
"hostgroups":[ "group1" ],
2013-06-05 06:22:38 +02:00
"enabled": true
},
"critical":{
"hostgroups":[ "group3" ],
2013-06-05 06:22:38 +02:00
"enabled": false
},
"all":{
"hostgroups":[ "group1", "group2", "group3", "network" ],
2013-06-05 06:22:38 +02:00
"enabled": false
2013-05-16 04:57:12 +02:00
}
},
2013-06-05 06:22:38 +02:00
"core":{
2013-09-20 02:31:50 +02:00
"instance_name": "Master Monitoring (monitor.example.org)",
"max_logfile_size": 1024000,
2013-05-28 02:42:23 +02:00
"max_logfile_count": 4,
2013-06-07 02:20:27 +02:00
"max_worker_threads": 8,
2013-09-20 02:31:50 +02:00
"members":[ "root" ],
2013-10-08 21:12:08 +02:00
"backends": {
"jsonrpc": {
"listen": "127.0.0.1",
"port": "2323",
"username": "linspector",
"password": "linspector"
2013-10-08 21:12:08 +02:00
}
},
2013-09-20 02:31:50 +02:00
"tasks":{
"jabber":{
"host": "example.org",
"port": 5222,
"username": "USERNAME",
"password": "PASSWORD"
},
"mail":{
"host": "localhost",
"port": 25,
"from": "linspector@example.org"
},
"sms":{
}
}
}
}