summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2011-11-15 17:29:12 +0100
committerEUcancER <root@euer.krebsco.de>2011-11-15 17:29:23 +0100
commitfa0b8a46563439b0364a3c5a63fa69f3bd560441 (patch)
tree22b91afff0ad849184d82a481697668f38972bd2
parentc3964521e7c1926253fd68dcc4c0ad57bca980fb (diff)
//monitoring: add new shinken monitoring stuff
-rw-r--r--Monitoring/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Monitoring/Makefile b/Monitoring/Makefile
index 794f9262..4730f30d 100644
--- a/Monitoring/Makefile
+++ b/Monitoring/Makefile
@@ -1,6 +1,7 @@
NAGDIR = /etc/nagios3/
NAGLIBDIR = /usr/lib/nagios
HTDOCS = /usr/share/nagios3/htdocs
+KREBS = /krebs
.phony: debian
debian:
@@ -21,3 +22,11 @@ debian:
chown nagios:www-data /var/lib/nagios3/rw || true
chmod g+x /var/lib/nagios3 || true
chmod ugo=rwx /var/lib/nagios3/rw/nagios.cmd || true
+
+debian-shinken:
+ curl https://raw.github.com/nicolargo/shinkenautoinstall/master/shinkenautoinstall-debian.sh | sh
+
+shinken-discover-hosts: /etc/shinken/resources.cfg
+ sed -i '/.*NMAPTARGETS.*/d' /etc/shinken/resource.cfg
+ $(KREBS)/retiolum/bin/hosts | awk '{print $2}'| tr '\n' ' ' | xargs echo '$$NMAPTARGETS$$=' | magic create krebs-discovery /etc/shinken/resource.cfg
+ shinken-discovery -o /etc/shinken/objects/discovery