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/Makefile | 8 ++- 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 ++++++++++ .../Monitoring/htdocs/images/logos/base/krebs.png | Bin 323 -> 0 bytes .../htdocs/images/logos/krebs/favicon.ico | Bin 0 -> 822 bytes .../Monitoring/htdocs/images/logos/krebs/krebs.gd2 | Bin 0 -> 1047 bytes .../Monitoring/htdocs/images/logos/krebs/krebs.png | Bin 0 -> 323 bytes .../Monitoring/htdocs/images/logos/krebs/tinc.gd2 | Bin 0 -> 1305 bytes .../Monitoring/htdocs/images/logos/krebs/tinc.png | Bin 0 -> 361 bytes .../Monitoring/htdocs/images/logos/logos/krebs.png | Bin 323 -> 0 bytes modules/Monitoring/krebs.png | Bin 323 -> 0 bytes 14 files changed, 158 insertions(+), 2 deletions(-) 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 delete mode 100644 modules/Monitoring/htdocs/images/logos/base/krebs.png create mode 100644 modules/Monitoring/htdocs/images/logos/krebs/favicon.ico create mode 100644 modules/Monitoring/htdocs/images/logos/krebs/krebs.gd2 create mode 100644 modules/Monitoring/htdocs/images/logos/krebs/krebs.png create mode 100644 modules/Monitoring/htdocs/images/logos/krebs/tinc.gd2 create mode 100644 modules/Monitoring/htdocs/images/logos/krebs/tinc.png delete mode 100644 modules/Monitoring/htdocs/images/logos/logos/krebs.png delete mode 100644 modules/Monitoring/krebs.png (limited to 'modules') diff --git a/modules/Monitoring/Makefile b/modules/Monitoring/Makefile index b153c8eb..89e89c69 100644 --- a/modules/Monitoring/Makefile +++ b/modules/Monitoring/Makefile @@ -1,3 +1,7 @@ +.phony: debian debian: - apt-get install nagios - cp -r htdocs /usr/share/nagios + [ `which nagios3` ] || apt-get install nagios + cp -r conf/* /etc/nagios3/conf.d/ + cp -R htdocs/* /usr/share/nagios3/htdocs/ + cp -r plugins /usr/lib/nagios + /etc/init.d/nagios3 reload 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 +} + diff --git a/modules/Monitoring/htdocs/images/logos/base/krebs.png b/modules/Monitoring/htdocs/images/logos/base/krebs.png deleted file mode 100644 index 3d8a8ab8..00000000 Binary files a/modules/Monitoring/htdocs/images/logos/base/krebs.png and /dev/null differ diff --git a/modules/Monitoring/htdocs/images/logos/krebs/favicon.ico b/modules/Monitoring/htdocs/images/logos/krebs/favicon.ico new file mode 100644 index 00000000..fa18384c Binary files /dev/null and b/modules/Monitoring/htdocs/images/logos/krebs/favicon.ico differ diff --git a/modules/Monitoring/htdocs/images/logos/krebs/krebs.gd2 b/modules/Monitoring/htdocs/images/logos/krebs/krebs.gd2 new file mode 100644 index 00000000..1113f03e Binary files /dev/null and b/modules/Monitoring/htdocs/images/logos/krebs/krebs.gd2 differ diff --git a/modules/Monitoring/htdocs/images/logos/krebs/krebs.png b/modules/Monitoring/htdocs/images/logos/krebs/krebs.png new file mode 100644 index 00000000..3d8a8ab8 Binary files /dev/null and b/modules/Monitoring/htdocs/images/logos/krebs/krebs.png differ diff --git a/modules/Monitoring/htdocs/images/logos/krebs/tinc.gd2 b/modules/Monitoring/htdocs/images/logos/krebs/tinc.gd2 new file mode 100644 index 00000000..36572d4a Binary files /dev/null and b/modules/Monitoring/htdocs/images/logos/krebs/tinc.gd2 differ diff --git a/modules/Monitoring/htdocs/images/logos/krebs/tinc.png b/modules/Monitoring/htdocs/images/logos/krebs/tinc.png new file mode 100644 index 00000000..daa1fdeb Binary files /dev/null and b/modules/Monitoring/htdocs/images/logos/krebs/tinc.png differ diff --git a/modules/Monitoring/htdocs/images/logos/logos/krebs.png b/modules/Monitoring/htdocs/images/logos/logos/krebs.png deleted file mode 100644 index 3d8a8ab8..00000000 Binary files a/modules/Monitoring/htdocs/images/logos/logos/krebs.png and /dev/null differ diff --git a/modules/Monitoring/krebs.png b/modules/Monitoring/krebs.png deleted file mode 100644 index 3d8a8ab8..00000000 Binary files a/modules/Monitoring/krebs.png and /dev/null differ -- cgit v1.2.3