From 7f7d831d23d433c9c85ce2ac7a49763a64f01730 Mon Sep 17 00:00:00 2001 From: krebs Date: Wed, 18 May 2011 18:12:15 +0200 Subject: added initial tinc monitoring Makefile: makefile now handles changed folder structure conf - all nagios config files htdocs - all additional static content (logos for krebs and tinc) plugins - all new nagios plugins conf/* addition of tinc hots as well as tinc-hosts group and krebsnet now has sharepoint and supernode in the queue htdocs/* added logos for tinc, as well as gd2 for the tree --- modules/Monitoring/conf/hostgroups_nagios2.cfg | 31 +++++++++++++ modules/Monitoring/conf/krebsnet.cfg | 14 ++++++ modules/Monitoring/conf/localhost.cfg | 60 ++++++++++++++++++++++++++ modules/Monitoring/conf/tinc_hosts.cfg | 20 +++++++++ modules/Monitoring/conf/tincnet.cfg | 27 ++++++++++++ 5 files changed, 152 insertions(+) create mode 100644 modules/Monitoring/conf/hostgroups_nagios2.cfg create mode 100644 modules/Monitoring/conf/krebsnet.cfg create mode 100644 modules/Monitoring/conf/localhost.cfg create mode 100644 modules/Monitoring/conf/tinc_hosts.cfg create mode 100644 modules/Monitoring/conf/tincnet.cfg (limited to 'modules/Monitoring/conf') diff --git a/modules/Monitoring/conf/hostgroups_nagios2.cfg b/modules/Monitoring/conf/hostgroups_nagios2.cfg new file mode 100644 index 00000000..63acbf50 --- /dev/null +++ b/modules/Monitoring/conf/hostgroups_nagios2.cfg @@ -0,0 +1,31 @@ +# Some generic hostgroup definitions + +# A simple wildcard hostgroup +define hostgroup { + hostgroup_name all + alias All Servers + members * + } + +# A list of your Debian GNU/Linux servers +define hostgroup { + hostgroup_name debian-servers + alias Debian GNU/Linux Servers + members localhost + } + +# A list of your web servers +define hostgroup { + hostgroup_name http-servers + alias HTTP servers + members localhost + } + +# A list of your ssh-accessible servers +define hostgroup { + hostgroup_name ssh-servers + alias SSH servers + members localhost + } + + diff --git a/modules/Monitoring/conf/krebsnet.cfg b/modules/Monitoring/conf/krebsnet.cfg new file mode 100644 index 00000000..211ed76a --- /dev/null +++ b/modules/Monitoring/conf/krebsnet.cfg @@ -0,0 +1,14 @@ +## extended infos for krebsnet +define hostgroup { + hostgroup_name krebs-machines + alias Krebs Machines + } +define hostextinfo{ + hostgroup_name krebs-machines + notes Deployed Krebse +# notes_url http://webserver.localhost.localdomain/hostinfo.pl?host=netware1 + icon_image krebs/krebs.png + icon_image_alt Krebs + vrml_image krebs.png + statusmap_image krebs/krebs.gd2 + } diff --git a/modules/Monitoring/conf/localhost.cfg b/modules/Monitoring/conf/localhost.cfg new file mode 100644 index 00000000..3b098195 --- /dev/null +++ b/modules/Monitoring/conf/localhost.cfg @@ -0,0 +1,60 @@ +# A simple configuration file for monitoring the local host +# This can serve as an example for configuring other servers; +# Custom services specific to this host are added here, but services +# defined in nagios2-common_services.cfg may also apply. +# + +define host{ + use generic-host ; Name of host template to use + host_name localhost + alias localhost + address 127.0.0.1 + hostgroups krebs-machines + } + +# Define a service to check the disk space of the root partition +# on the local machine. Warning if < 20% free, critical if +# < 10% free space on partition. + +define service{ + use generic-service ; Name of service template to use + host_name localhost + service_description Disk Space + check_command check_all_disks!20%!10% + } + + + +# Define a service to check the number of currently logged in +# users on the local machine. Warning if > 20 users, critical +# if > 50 users. + +define service{ + use generic-service ; Name of service template to use + host_name localhost + service_description Current Users + check_command check_users!20!50 + } + + +# Define a service to check the number of currently running procs +# on the local machine. Warning if > 250 processes, critical if +# > 400 processes. + +define service{ + use generic-service ; Name of service template to use + host_name localhost + service_description Total Processes + check_command check_procs!250!400 + } + + + +# Define a service to check the load on the local machine. + +define service{ + use generic-service ; Name of service template to use + host_name localhost + service_description Current Load + check_command check_load!5.0!4.0!3.0!10.0!6.0!4.0 + } diff --git a/modules/Monitoring/conf/tinc_hosts.cfg b/modules/Monitoring/conf/tinc_hosts.cfg new file mode 100644 index 00000000..03cfcc41 --- /dev/null +++ b/modules/Monitoring/conf/tinc_hosts.cfg @@ -0,0 +1,20 @@ + +# +# Miefda Supernode +# +define host{ + use generic-host + host_name miefda.org + alias Supernode External + _TINC_ADDRESS 10.7.7.1 + hostgroups tinc-nodes,ssh-servers + } + +define host{ + use generic-host + host_name pa-sharepoint.informatik.ba-stuttgart.de + alias PA Sharepoint + address 141.31.8.11 + _TINC_ADDRESS 10.7.7.5 + hostgroups tinc-nodes,ssh-servers + } diff --git a/modules/Monitoring/conf/tincnet.cfg b/modules/Monitoring/conf/tincnet.cfg new file mode 100644 index 00000000..d63119b3 --- /dev/null +++ b/modules/Monitoring/conf/tincnet.cfg @@ -0,0 +1,27 @@ +define hostgroup { + hostgroup_name tinc-nodes + alias Tinc Nodes + } + +define hostextinfo{ + hostgroup_name tinc-nodes + notes Tinc Nodes + icon_image krebs/tinc.png + icon_image_alt tinc + vrml_image tinc.png + statusmap_image krebs/tinc.gd2 + } + +define command { + command_name check_internal_tinc_up + command_line $USER1$/check_ping -H $_HOSTTINC_ADDRESS$ -w $ARG1$ -c $ARG2$ + } + +define service { + hostgroup_name tinc-nodes + service_description tinc internal + check_command check_internal_tinc_up!100.0,20%!500.0,60% + use generic-service + notification_interval 0 +} + -- cgit v1.2.3 From fcec78c5b4a4cad7218cf4788019c6205fa757b9 Mon Sep 17 00:00:00 2001 From: krebs Date: Thu, 19 May 2011 03:26:40 +0200 Subject: added whole shack-RZ, tinc nodes krebs_hosts.cfg: added vhosts added parent relationships shack_infrastructure.cfg: added whole RZ (was using nmap for enum) tinc_hosts: added parents relationship logos: added shack logo --- modules/Monitoring/conf/krebs_hosts.cfg | 67 ++++++++++++ modules/Monitoring/conf/shack_infrastructure.cfg | 134 +++++++++++++++++++++++ modules/Monitoring/conf/tinc_hosts.cfg | 24 +++- 3 files changed, 222 insertions(+), 3 deletions(-) create mode 100644 modules/Monitoring/conf/krebs_hosts.cfg create mode 100644 modules/Monitoring/conf/shack_infrastructure.cfg (limited to 'modules/Monitoring/conf') diff --git a/modules/Monitoring/conf/krebs_hosts.cfg b/modules/Monitoring/conf/krebs_hosts.cfg new file mode 100644 index 00000000..c52c6924 --- /dev/null +++ b/modules/Monitoring/conf/krebs_hosts.cfg @@ -0,0 +1,67 @@ + +# +# Ur-Krebs +# +define host{ + use generic-host + host_name krebs.shack + alias krebs + _tinc_address 10.7.7.156 + address 10.42.23.5 + parents shack-router + hostgroups krebs-machines,tinc-nodes,ssh-servers + } +# +# UTART +# +define host{ + use generic-host + host_name utart.shack + alias UTART + _tinc_address 10.7.7.66 + address 10.42.2.238 + parents shack-router + hostgroups krebs-machines,tinc-nodes,ssh-servers + } +# +# ytart +# +define host{ + use generic-host + host_name ytart.shack + alias ytart + _tinc_address 10.7.7.201 + parents shack-router + address 10.42.2.254 #TODO check me + hostgroups krebs-machines,tinc-nodes,ssh-servers + } +# +# uPM +# +define host{ + use generic-host + host_name upm + alias uPM Virtual Machine + _tinc_address 10.7.7.99 + address upm.shack + parents shack-vplatform + hostgroups krebs-machines,ssh-servers,shack-rz + #,tinc-nodes + } + +# TODO add upm and genericore as tinc-nodes +# TODO check MONGODB on uPM + + + +#TODO verkrebse genericore/get password +define host{ + use generic-host + host_name genericore + alias genericore Virtual Machine + #_tinc_address 10.7.7.XX + address genericore.shack + parents shack-vplatform + hostgroups ssh-servers,shack-rz + #,tinc-nodes,krebs-machines + } diff --git a/modules/Monitoring/conf/shack_infrastructure.cfg b/modules/Monitoring/conf/shack_infrastructure.cfg new file mode 100644 index 00000000..53bc688b --- /dev/null +++ b/modules/Monitoring/conf/shack_infrastructure.cfg @@ -0,0 +1,134 @@ +# + +define hostgroup { + hostgroup_name shack-rz + alias Shack RZ Infrastructure + } +define hostextinfo{ + hostgroup_name shack-rz + notes Shack RZ Infrastructure +# notes_url http://webserver.localhost.localdomain/hostinfo.pl?host=netware1 + icon_image krebs/shack.png + icon_image_alt shack-RZ + vrml_image shack.png + statusmap_image krebs/shack.gd2 + } +# +# Shack Virtual Machine Hoster Platform +# +define host{ + use generic-host + host_name shack-vplatform + alias Shack Virtualization Server + address node0.shack + parents shack-router + hostgroups shack-rz,ssh-servers + } +define host{ + use generic-host + host_name shack-router + alias Shack Cisco Router + address 10.42.0.3 + hostgroups shack-rz,ssh-servers + } + +define host{ + use generic-host + host_name shack-plattenschwein + parents shack-router + alias Shack Plattenschwein + address plattenschwein.shack + hostgroups shack-rz,ssh-servers + } + + +# +# Shack DNS Server +# + +define host{ + use generic-host + host_name shack-dns + parents shack-vplatform + alias Shack DNS Virtual Host + address dns.shack + hostgroups shack-rz + } +define service { + host_name shack-dns + service_description DNS Service + use generic-service + check_command check_dns + } + +define host{ + use generic-host + host_name shack-pxe + parents shack-vplatform + alias Shack PXEBoot Vhost + address pxeboot.shack + hostgroups shack-rz + } +define host{ + use generic-host + host_name shack-printsrv + parents shack-vplatform + alias Shack Print Server + address printer.shack + hostgroups shack-rz + } + +define host{ + use generic-host + host_name shack-aptproxy + parents shack-vplatform + alias Shack Apt-proxy + address aptproxy.shack + hostgroups shack-rz + } + +define host{ + use generic-host + host_name shack-shack + parents shack-vplatform + alias Shack Data Exchange + address shack.shack + hostgroups shack-rz,ssh-servers + } + +# +# shack ldap server +# +define host{ + use generic-host + host_name shack-ldap + parents shack-vplatform + alias Shack LDAP Server + address ldap.shack + hostgroups shack-rz + } +define service { + host_name shack-ldap + service_description LDAP Service + use generic-service + check_command check_ldap!shack + } + +# +# Shack gateway +# +define host{ + use generic-host + host_name shack-gw + parents shack-router + alias Watchguard Shack Gateway + address 10.42.0.1 + hostgroups shack-rz,ssh-servers + } +define service { + host_name shack-gw + service_description DNS Service + use generic-service + check_command check_dns + } + diff --git a/modules/Monitoring/conf/tinc_hosts.cfg b/modules/Monitoring/conf/tinc_hosts.cfg index 03cfcc41..ef2cb95d 100644 --- a/modules/Monitoring/conf/tinc_hosts.cfg +++ b/modules/Monitoring/conf/tinc_hosts.cfg @@ -1,20 +1,38 @@ +#connection will not work if no internet is available (e.g. no shack-gateway) # # Miefda Supernode # define host{ use generic-host - host_name miefda.org + host_name supernode alias Supernode External _TINC_ADDRESS 10.7.7.1 + address miefda.org + parents shack-gw hostgroups tinc-nodes,ssh-servers } - +# +# Sharepoint (dhbw-stuttgart) +# define host{ use generic-host - host_name pa-sharepoint.informatik.ba-stuttgart.de + host_name sharepoint alias PA Sharepoint address 141.31.8.11 _TINC_ADDRESS 10.7.7.5 + parents shack-gw hostgroups tinc-nodes,ssh-servers } +# +# Leechi +# +define host{ + use generic-host + host_name leechi + alias no_omo + address leechi.kicks-ass.org + _TINC_ADDRESS 10.7.7.111 + parents shack-gw + hostgroups tinc-nodes,ssh-servers,http-servers + } -- cgit v1.2.3 From a780c084808b707cd220729eea851b896c3310dc Mon Sep 17 00:00:00 2001 From: krebs Date: Sun, 22 May 2011 01:36:58 +0200 Subject: updated Nagios config scripts krebs_hosts: changed paths for utart/ytart shack_infrastructure: added script to check if local dns is working tinc_hosts: added IRC check for supernode tincnet: added IRC check command --- modules/Monitoring/conf/krebs_hosts.cfg | 8 ++++---- modules/Monitoring/conf/shack_infrastructure.cfg | 8 ++++++-- modules/Monitoring/conf/tinc_hosts.cfg | 9 ++++++++- modules/Monitoring/conf/tincnet.cfg | 4 ++++ 4 files changed, 22 insertions(+), 7 deletions(-) (limited to 'modules/Monitoring/conf') diff --git a/modules/Monitoring/conf/krebs_hosts.cfg b/modules/Monitoring/conf/krebs_hosts.cfg index c52c6924..6857cd45 100644 --- a/modules/Monitoring/conf/krebs_hosts.cfg +++ b/modules/Monitoring/conf/krebs_hosts.cfg @@ -16,10 +16,10 @@ define host{ # define host{ use generic-host - host_name utart.shack + host_name utart alias UTART _tinc_address 10.7.7.66 - address 10.42.2.238 + address 10.42.23.23 parents shack-router hostgroups krebs-machines,tinc-nodes,ssh-servers } @@ -28,11 +28,11 @@ define host{ # define host{ use generic-host - host_name ytart.shack + host_name ytart alias ytart _tinc_address 10.7.7.201 parents shack-router - address 10.42.2.254 #TODO check me + address 10.42.1.227 hostgroups krebs-machines,tinc-nodes,ssh-servers } # diff --git a/modules/Monitoring/conf/shack_infrastructure.cfg b/modules/Monitoring/conf/shack_infrastructure.cfg index 53bc688b..2b75a241 100644 --- a/modules/Monitoring/conf/shack_infrastructure.cfg +++ b/modules/Monitoring/conf/shack_infrastructure.cfg @@ -58,7 +58,11 @@ define service { host_name shack-dns service_description DNS Service use generic-service - check_command check_dns + check_command check_dns_shack + } +define command { + command_name check_dns_shack + command_line /usr/lib/nagios/plugins/check_dns -H shack.shack -s '$HOSTADDRESS$' } define host{ @@ -111,7 +115,7 @@ define service { host_name shack-ldap service_description LDAP Service use generic-service - check_command check_ldap!shack + check_command check_ldap!shammunity } # diff --git a/modules/Monitoring/conf/tinc_hosts.cfg b/modules/Monitoring/conf/tinc_hosts.cfg index ef2cb95d..4b1ad9ab 100644 --- a/modules/Monitoring/conf/tinc_hosts.cfg +++ b/modules/Monitoring/conf/tinc_hosts.cfg @@ -10,7 +10,14 @@ define host{ _TINC_ADDRESS 10.7.7.1 address miefda.org parents shack-gw - hostgroups tinc-nodes,ssh-servers + hostgroups tinc-nodes,ssh-servers,http-servers + } + +define service { + host_name supernode + service_description IRC + use generic-service + check_command check_ircd } # # Sharepoint (dhbw-stuttgart) diff --git a/modules/Monitoring/conf/tincnet.cfg b/modules/Monitoring/conf/tincnet.cfg index d63119b3..f0b35b4e 100644 --- a/modules/Monitoring/conf/tincnet.cfg +++ b/modules/Monitoring/conf/tincnet.cfg @@ -16,6 +16,10 @@ define command { command_name check_internal_tinc_up command_line $USER1$/check_ping -H $_HOSTTINC_ADDRESS$ -w $ARG1$ -c $ARG2$ } +define command { + command_name check_ircd + command_line $USER1$/check_ircd $_HOSTTINC_ADDRESS$ + } define service { hostgroup_name tinc-nodes -- cgit v1.2.3