From bfa204a580a503a216cedbedd36586fb00458181 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 18 Nov 2011 10:10:13 +0100 Subject: //Monitoring: add shinken configs --- Monitoring/plugins/check.bat | 0 Monitoring/plugins/check.sh | 5 + Monitoring/plugins/check_apt | Bin 0 -> 106120 bytes Monitoring/plugins/check_bgpstate | 215 ++++++++ Monitoring/plugins/check_breeze | 87 +++ Monitoring/plugins/check_by_ssh | Bin 0 -> 46192 bytes Monitoring/plugins/check_clamd | 1 + Monitoring/plugins/check_cluster | Bin 0 -> 32072 bytes Monitoring/plugins/check_cpu | 165 ++++++ Monitoring/plugins/check_dhcp | Bin 0 -> 44816 bytes Monitoring/plugins/check_dig | Bin 0 -> 41392 bytes Monitoring/plugins/check_disk | Bin 0 -> 119216 bytes Monitoring/plugins/check_disk_smb | 307 +++++++++++ Monitoring/plugins/check_dns | Bin 0 -> 45488 bytes Monitoring/plugins/check_dummy | Bin 0 -> 28968 bytes Monitoring/plugins/check_dummy.sh | 5 + Monitoring/plugins/check_file_age | 112 ++++ Monitoring/plugins/check_flexlm | 244 +++++++++ Monitoring/plugins/check_fping | Bin 0 -> 44656 bytes Monitoring/plugins/check_ftp | 1 + Monitoring/plugins/check_game | Bin 0 -> 36584 bytes Monitoring/plugins/check_host | 1 + Monitoring/plugins/check_hpjd | Bin 0 -> 41136 bytes Monitoring/plugins/check_http | Bin 0 -> 164624 bytes Monitoring/plugins/check_icmp | Bin 0 -> 49264 bytes Monitoring/plugins/check_ide_smart | Bin 0 -> 34536 bytes Monitoring/plugins/check_ifoperstatus | 472 ++++++++++++++++ Monitoring/plugins/check_ifstatus | 425 ++++++++++++++ Monitoring/plugins/check_imap | 1 + Monitoring/plugins/check_ircd | 239 ++++++++ Monitoring/plugins/check_jabber | 1 + Monitoring/plugins/check_ldap | Bin 0 -> 40816 bytes Monitoring/plugins/check_ldaps | 1 + Monitoring/plugins/check_linux_raid | 115 ++++ Monitoring/plugins/check_load | Bin 0 -> 36168 bytes Monitoring/plugins/check_log | 219 ++++++++ Monitoring/plugins/check_mailq | 608 +++++++++++++++++++++ Monitoring/plugins/check_mem.pl | 263 +++++++++ Monitoring/plugins/check_mrtg | Bin 0 -> 36264 bytes Monitoring/plugins/check_mrtgtraf | Bin 0 -> 34440 bytes Monitoring/plugins/check_mysql | Bin 0 -> 45936 bytes Monitoring/plugins/check_mysql_query | Bin 0 -> 44688 bytes Monitoring/plugins/check_nagios | Bin 0 -> 36616 bytes Monitoring/plugins/check_nntp | 1 + Monitoring/plugins/check_nntps | 1 + Monitoring/plugins/check_nt | Bin 0 -> 48720 bytes Monitoring/plugins/check_ntp | Bin 0 -> 46288 bytes Monitoring/plugins/check_ntp_peer | Bin 0 -> 44880 bytes Monitoring/plugins/check_ntp_time | Bin 0 -> 42224 bytes Monitoring/plugins/check_nwstat | Bin 0 -> 60912 bytes Monitoring/plugins/check_oracle | 287 ++++++++++ Monitoring/plugins/check_overcr | Bin 0 -> 40400 bytes Monitoring/plugins/check_pgsql | Bin 0 -> 40656 bytes Monitoring/plugins/check_ping | Bin 0 -> 48848 bytes Monitoring/plugins/check_pop | 1 + Monitoring/plugins/check_procs | Bin 0 -> 114640 bytes Monitoring/plugins/check_radius | Bin 0 -> 40624 bytes Monitoring/plugins/check_real | Bin 0 -> 40464 bytes Monitoring/plugins/check_rpc | 375 +++++++++++++ Monitoring/plugins/check_rta_multi | 1 + Monitoring/plugins/check_sensors | 65 +++ Monitoring/plugins/check_shinken.py | 157 ++++++ Monitoring/plugins/check_simap | 1 + Monitoring/plugins/check_smtp | Bin 0 -> 127216 bytes Monitoring/plugins/check_snmp | Bin 0 -> 152008 bytes Monitoring/plugins/check_spop | 1 + Monitoring/plugins/check_ssh | Bin 0 -> 36688 bytes Monitoring/plugins/check_ssmtp | 1 + Monitoring/plugins/check_swap | Bin 0 -> 37832 bytes Monitoring/plugins/check_tcp | Bin 0 -> 49328 bytes Monitoring/plugins/check_time | Bin 0 -> 38128 bytes Monitoring/plugins/check_udp | 1 + Monitoring/plugins/check_ups | Bin 0 -> 44560 bytes Monitoring/plugins/check_users | Bin 0 -> 36168 bytes Monitoring/plugins/check_wave | 122 +++++ Monitoring/plugins/getwmic.sh | 7 + Monitoring/plugins/link_vmware_host_vm.py | 184 +++++++ Monitoring/plugins/negate | Bin 0 -> 38152 bytes Monitoring/plugins/nmap_discovery_runner.py | 419 ++++++++++++++ Monitoring/plugins/notify.sh | 6 + Monitoring/plugins/nsca_client.py | 184 +++++++ Monitoring/plugins/sendmailhost.pl | 96 ++++ Monitoring/plugins/sendmailservices.pl | 105 ++++ Monitoring/plugins/urlize | Bin 0 -> 36104 bytes Monitoring/plugins/utils.pm | 67 +++ Monitoring/plugins/utils.sh | 23 + Monitoring/plugins/vmware_discovery_runner.py | 225 ++++++++ Monitoring/shinken/brokerd-windows.ini | 26 + Monitoring/shinken/brokerd.ini | 37 ++ Monitoring/shinken/certs/ca.pem | 64 +++ Monitoring/shinken/certs/client.pem | 86 +++ Monitoring/shinken/certs/server.pem | 86 +++ Monitoring/shinken/commands.cfg | 285 ++++++++++ Monitoring/shinken/contactgroups.cfg | 8 + Monitoring/shinken/contacts.cfg | 10 + Monitoring/shinken/dependencies.cfg | 25 + Monitoring/shinken/discovery.cfg | 25 + Monitoring/shinken/discovery_rules.cfg | 203 +++++++ Monitoring/shinken/discovery_runs.cfg | 10 + Monitoring/shinken/escalations.cfg | 18 + Monitoring/shinken/hostgroups.cfg | 17 + Monitoring/shinken/hosts/localhost.cfg | 7 + Monitoring/shinken/nagios-windows.cfg | 136 +++++ Monitoring/shinken/nagios.cfg | 157 ++++++ Monitoring/shinken/objects/groups/root_contact.cfg | 16 + .../objects/internet/euer.krebsco.de/Http.cfg | 6 + .../objects/internet/euer.krebsco.de/Ssh.cfg | 6 + .../internet/euer.krebsco.de/euer.krebsco.de.cfg | 4 + .../shinken/objects/internet/google.de/Http.cfg | 6 + .../internet/google.de/Https-Certificate.cfg | 6 + .../shinken/objects/internet/google.de/Https.cfg | 6 + .../objects/internet/google.de/google.de.cfg | 4 + .../84-23-80-172.blue.kundencontroller.de.cfg | 4 + .../objects/internet/oxberg.krebsco.de/Http.cfg | 6 + .../objects/internet/oxberg.krebsco.de/SMTP.cfg | 6 + .../objects/internet/oxberg.krebsco.de/Ssh.cfg | 6 + .../shinken/objects/internet/shackspace.de/DNS.cfg | 6 + .../objects/internet/shackspace.de/Http.cfg | 6 + .../internet/shackspace.de/Https-Certificate.cfg | 6 + .../objects/internet/shackspace.de/Https.cfg | 6 + .../objects/internet/shackspace.de/SMTP.cfg | 6 + .../shinken/objects/internet/shackspace.de/Ssh.cfg | 6 + .../internet/shackspace.de/shackspace.de.cfg | 4 + .../shinken/objects/retiolum/supernode/Http.cfg | 6 + .../shinken/objects/retiolum/supernode/SMTP.cfg | 6 + .../shinken/objects/retiolum/supernode/Ssh.cfg | 6 + .../objects/retiolum/supernode/supernode.cfg | 5 + .../objects/shackspace/10.42.0.2/10.42.0.2.cfg | 4 + .../shinken/objects/shackspace/10.42.0.2/Http.cfg | 6 + .../objects/shackspace/10.42.0.20/10.42.0.20.cfg | 4 + .../shinken/objects/shackspace/10.42.0.20/Http.cfg | 6 + .../objects/shackspace/10.42.0.3/10.42.0.3.cfg | 4 + .../shinken/objects/shackspace/10.42.0.3/Ssh.cfg | 6 + .../objects/shackspace/10.42.0.4/10.42.0.4.cfg | 4 + .../objects/shackspace/10.42.0.5/10.42.0.5.cfg | 4 + .../shinken/objects/shackspace/10.42.0.5/Http.cfg | 6 + .../objects/shackspace/10.42.0.7/10.42.0.7.cfg | 4 + .../shinken/objects/shackspace/10.42.0.7/Http.cfg | 6 + .../objects/shackspace/10.42.0.8/10.42.0.8.cfg | 4 + .../shinken/objects/shackspace/10.42.0.8/Http.cfg | 6 + .../objects/shackspace/10.42.0.9/10.42.0.9.cfg | 4 + .../shinken/objects/shackspace/10.42.0.9/Http.cfg | 6 + .../objects/shackspace/aptproxy.shack/Ssh.cfg | 6 + .../shackspace/aptproxy.shack/aptproxy.shack.cfg | 4 + .../shinken/objects/shackspace/dhcp.shack/Ssh.cfg | 6 + .../objects/shackspace/dhcp.shack/dhcp.shack.cfg | 4 + .../shinken/objects/shackspace/dns.shack/DNS.cfg | 6 + .../shinken/objects/shackspace/dns.shack/Ssh.cfg | 6 + .../objects/shackspace/dns.shack/dns.shack.cfg | 4 + .../objects/shackspace/gameds.shack/Ssh.cfg | 6 + .../shackspace/gameds.shack/gameds.shack.cfg | 4 + .../objects/shackspace/genericore.shack/Ssh.cfg | 6 + .../genericore.shack/genericore.shack.cfg | 4 + .../objects/shackspace/homepage.shack/Http.cfg | 6 + .../objects/shackspace/homepage.shack/Ssh.cfg | 6 + .../shackspace/homepage.shack/homepage.shack.cfg | 4 + .../objects/shackspace/monitoring.shack/Http.cfg | 6 + .../objects/shackspace/monitoring.shack/Ssh.cfg | 6 + .../monitoring.shack/monitoring.shack.cfg | 4 + .../shinken/objects/shackspace/node1.shack/Ssh.cfg | 6 + .../objects/shackspace/node1.shack/node1.shack.cfg | 4 + .../shinken/objects/shackspace/node2.shack/Ssh.cfg | 6 + .../objects/shackspace/node2.shack/node2.shack.cfg | 4 + .../shackspace/plattenschwein.shack/Http.cfg | 6 + .../shackspace/plattenschwein.shack/Ssh.cfg | 6 + .../plattenschwein.shack/plattenschwein.shack.cfg | 4 + .../shackspace/powerraw.shack/powerraw.shack.cfg | 4 + .../objects/shackspace/printer.shack/Http.cfg | 6 + .../objects/shackspace/printer.shack/Ssh.cfg | 6 + .../shackspace/printer.shack/printer.shack.cfg | 4 + .../shinken/objects/shackspace/pxe.shack/Ssh.cfg | 6 + .../objects/shackspace/pxe.shack/pxe.shack.cfg | 4 + .../objects/shackspace/rzdoku.shack/Http.cfg | 6 + .../objects/shackspace/rzdoku.shack/Ssh.cfg | 6 + .../shackspace/rzdoku.shack/rzdoku.shack.cfg | 4 + .../shinken/objects/shackspace/shack.shack/Ssh.cfg | 6 + .../objects/shackspace/shack.shack/shack.shack.cfg | 4 + .../objects/shackspace/shackgateway.shack/DNS.cfg | 6 + .../objects/shackspace/shackgateway.shack/Http.cfg | 6 + .../shackgateway.shack/Https-Certificate.cfg | 6 + .../shackspace/shackgateway.shack/Https.cfg | 6 + .../objects/shackspace/shackgateway.shack/Ssh.cfg | 6 + .../shackgateway.shack/shackgateway.shack.cfg | 4 + .../objects/shackspace/standby.shack/Http.cfg | 6 + .../objects/shackspace/standby.shack/Ssh.cfg | 6 + .../shackspace/standby.shack/standby.shack.cfg | 4 + .../objects/shackspace/stats.shack/Http.cfg | 6 + .../shinken/objects/shackspace/stats.shack/Ssh.cfg | 6 + .../objects/shackspace/stats.shack/stats.shack.cfg | 4 + .../objects/shackspace/tuerstatus.shack/Ssh.cfg | 6 + .../tuerstatus.shack/tuerstatus.shack.cfg | 4 + .../shinken/objects/shackspace/upm.shack/Ssh.cfg | 6 + .../objects/shackspace/upm.shack/upm.shack.cfg | 4 + .../objects/shackspace/vollepulle.shack/Http.cfg | 6 + .../vollepulle.shack/Https-Certificate.cfg | 6 + .../objects/shackspace/vollepulle.shack/Https.cfg | 6 + .../objects/shackspace/vollepulle.shack/Ssh.cfg | 6 + .../vollepulle.shack/vollepulle.shack.cfg | 4 + Monitoring/shinken/pollerd-windows.ini | 28 + Monitoring/shinken/pollerd.ini | 38 ++ Monitoring/shinken/reactionnerd-windows.ini | 28 + Monitoring/shinken/reactionnerd.ini | 28 + Monitoring/shinken/receiverd-windows.ini | 29 + Monitoring/shinken/receiverd.ini | 28 + Monitoring/shinken/resource.cfg | 34 ++ Monitoring/shinken/schedulerd-windows.ini | 27 + Monitoring/shinken/schedulerd.ini | 27 + Monitoring/shinken/servicegroups.cfg | 14 + Monitoring/shinken/services/linux_local.cfg | 44 ++ .../shinken/shinken-specific-high-availability.cfg | 275 ++++++++++ .../shinken-specific-load-balanced-only.cfg | 219 ++++++++ Monitoring/shinken/shinken-specific.cfg | 579 ++++++++++++++++++++ Monitoring/shinken/templates.cfg | 201 +++++++ Monitoring/shinken/timeperiods.cfg | 71 +++ 214 files changed, 9194 insertions(+) create mode 100755 Monitoring/plugins/check.bat create mode 100755 Monitoring/plugins/check.sh create mode 100755 Monitoring/plugins/check_apt create mode 100755 Monitoring/plugins/check_bgpstate create mode 100755 Monitoring/plugins/check_breeze create mode 100755 Monitoring/plugins/check_by_ssh create mode 120000 Monitoring/plugins/check_clamd create mode 100755 Monitoring/plugins/check_cluster create mode 100755 Monitoring/plugins/check_cpu create mode 100755 Monitoring/plugins/check_dhcp create mode 100755 Monitoring/plugins/check_dig create mode 100755 Monitoring/plugins/check_disk create mode 100755 Monitoring/plugins/check_disk_smb create mode 100755 Monitoring/plugins/check_dns create mode 100755 Monitoring/plugins/check_dummy create mode 100755 Monitoring/plugins/check_dummy.sh create mode 100755 Monitoring/plugins/check_file_age create mode 100755 Monitoring/plugins/check_flexlm create mode 100755 Monitoring/plugins/check_fping create mode 120000 Monitoring/plugins/check_ftp create mode 100755 Monitoring/plugins/check_game create mode 120000 Monitoring/plugins/check_host create mode 100755 Monitoring/plugins/check_hpjd create mode 100755 Monitoring/plugins/check_http create mode 100755 Monitoring/plugins/check_icmp create mode 100755 Monitoring/plugins/check_ide_smart create mode 100755 Monitoring/plugins/check_ifoperstatus create mode 100755 Monitoring/plugins/check_ifstatus create mode 120000 Monitoring/plugins/check_imap create mode 100755 Monitoring/plugins/check_ircd create mode 120000 Monitoring/plugins/check_jabber create mode 100755 Monitoring/plugins/check_ldap create mode 120000 Monitoring/plugins/check_ldaps create mode 100755 Monitoring/plugins/check_linux_raid create mode 100755 Monitoring/plugins/check_load create mode 100755 Monitoring/plugins/check_log create mode 100755 Monitoring/plugins/check_mailq create mode 100755 Monitoring/plugins/check_mem.pl create mode 100755 Monitoring/plugins/check_mrtg create mode 100755 Monitoring/plugins/check_mrtgtraf create mode 100755 Monitoring/plugins/check_mysql create mode 100755 Monitoring/plugins/check_mysql_query create mode 100755 Monitoring/plugins/check_nagios create mode 120000 Monitoring/plugins/check_nntp create mode 120000 Monitoring/plugins/check_nntps create mode 100755 Monitoring/plugins/check_nt create mode 100755 Monitoring/plugins/check_ntp create mode 100755 Monitoring/plugins/check_ntp_peer create mode 100755 Monitoring/plugins/check_ntp_time create mode 100755 Monitoring/plugins/check_nwstat create mode 100755 Monitoring/plugins/check_oracle create mode 100755 Monitoring/plugins/check_overcr create mode 100755 Monitoring/plugins/check_pgsql create mode 100755 Monitoring/plugins/check_ping create mode 120000 Monitoring/plugins/check_pop create mode 100755 Monitoring/plugins/check_procs create mode 100755 Monitoring/plugins/check_radius create mode 100755 Monitoring/plugins/check_real create mode 100755 Monitoring/plugins/check_rpc create mode 120000 Monitoring/plugins/check_rta_multi create mode 100755 Monitoring/plugins/check_sensors create mode 100755 Monitoring/plugins/check_shinken.py create mode 120000 Monitoring/plugins/check_simap create mode 100755 Monitoring/plugins/check_smtp create mode 100755 Monitoring/plugins/check_snmp create mode 120000 Monitoring/plugins/check_spop create mode 100755 Monitoring/plugins/check_ssh create mode 120000 Monitoring/plugins/check_ssmtp create mode 100755 Monitoring/plugins/check_swap create mode 100755 Monitoring/plugins/check_tcp create mode 100755 Monitoring/plugins/check_time create mode 120000 Monitoring/plugins/check_udp create mode 100755 Monitoring/plugins/check_ups create mode 100755 Monitoring/plugins/check_users create mode 100755 Monitoring/plugins/check_wave create mode 100755 Monitoring/plugins/getwmic.sh create mode 100755 Monitoring/plugins/link_vmware_host_vm.py create mode 100755 Monitoring/plugins/negate create mode 100755 Monitoring/plugins/nmap_discovery_runner.py create mode 100755 Monitoring/plugins/notify.sh create mode 100755 Monitoring/plugins/nsca_client.py create mode 100755 Monitoring/plugins/sendmailhost.pl create mode 100755 Monitoring/plugins/sendmailservices.pl create mode 100755 Monitoring/plugins/urlize create mode 100644 Monitoring/plugins/utils.pm create mode 100755 Monitoring/plugins/utils.sh create mode 100755 Monitoring/plugins/vmware_discovery_runner.py create mode 100644 Monitoring/shinken/brokerd-windows.ini create mode 100644 Monitoring/shinken/brokerd.ini create mode 100755 Monitoring/shinken/certs/ca.pem create mode 100755 Monitoring/shinken/certs/client.pem create mode 100644 Monitoring/shinken/certs/server.pem create mode 100644 Monitoring/shinken/commands.cfg create mode 100644 Monitoring/shinken/contactgroups.cfg create mode 100644 Monitoring/shinken/contacts.cfg create mode 100644 Monitoring/shinken/dependencies.cfg create mode 100644 Monitoring/shinken/discovery.cfg create mode 100644 Monitoring/shinken/discovery_rules.cfg create mode 100644 Monitoring/shinken/discovery_runs.cfg create mode 100644 Monitoring/shinken/escalations.cfg create mode 100644 Monitoring/shinken/hostgroups.cfg create mode 100644 Monitoring/shinken/hosts/localhost.cfg create mode 100644 Monitoring/shinken/nagios-windows.cfg create mode 100644 Monitoring/shinken/nagios.cfg create mode 100644 Monitoring/shinken/objects/groups/root_contact.cfg create mode 100644 Monitoring/shinken/objects/internet/euer.krebsco.de/Http.cfg create mode 100644 Monitoring/shinken/objects/internet/euer.krebsco.de/Ssh.cfg create mode 100644 Monitoring/shinken/objects/internet/euer.krebsco.de/euer.krebsco.de.cfg create mode 100644 Monitoring/shinken/objects/internet/google.de/Http.cfg create mode 100644 Monitoring/shinken/objects/internet/google.de/Https-Certificate.cfg create mode 100644 Monitoring/shinken/objects/internet/google.de/Https.cfg create mode 100644 Monitoring/shinken/objects/internet/google.de/google.de.cfg create mode 100644 Monitoring/shinken/objects/internet/oxberg.krebsco.de/84-23-80-172.blue.kundencontroller.de.cfg create mode 100644 Monitoring/shinken/objects/internet/oxberg.krebsco.de/Http.cfg create mode 100644 Monitoring/shinken/objects/internet/oxberg.krebsco.de/SMTP.cfg create mode 100644 Monitoring/shinken/objects/internet/oxberg.krebsco.de/Ssh.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/DNS.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/Http.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/Https-Certificate.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/Https.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/SMTP.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/Ssh.cfg create mode 100644 Monitoring/shinken/objects/internet/shackspace.de/shackspace.de.cfg create mode 100644 Monitoring/shinken/objects/retiolum/supernode/Http.cfg create mode 100644 Monitoring/shinken/objects/retiolum/supernode/SMTP.cfg create mode 100644 Monitoring/shinken/objects/retiolum/supernode/Ssh.cfg create mode 100644 Monitoring/shinken/objects/retiolum/supernode/supernode.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.2/10.42.0.2.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.2/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.20/10.42.0.20.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.20/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.3/10.42.0.3.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.3/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.4/10.42.0.4.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.5/10.42.0.5.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.5/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.7/10.42.0.7.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.7/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.8/10.42.0.8.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.8/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.9/10.42.0.9.cfg create mode 100644 Monitoring/shinken/objects/shackspace/10.42.0.9/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/aptproxy.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/aptproxy.shack/aptproxy.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/dhcp.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/dhcp.shack/dhcp.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/dns.shack/DNS.cfg create mode 100644 Monitoring/shinken/objects/shackspace/dns.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/dns.shack/dns.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/gameds.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/gameds.shack/gameds.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/genericore.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/genericore.shack/genericore.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/homepage.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/homepage.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/homepage.shack/homepage.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/monitoring.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/monitoring.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/monitoring.shack/monitoring.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/node1.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/node1.shack/node1.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/node2.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/node2.shack/node2.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/plattenschwein.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/plattenschwein.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/plattenschwein.shack/plattenschwein.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/powerraw.shack/powerraw.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/printer.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/printer.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/printer.shack/printer.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/pxe.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/pxe.shack/pxe.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/rzdoku.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/rzdoku.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/rzdoku.shack/rzdoku.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shack.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shack.shack/shack.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shackgateway.shack/DNS.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shackgateway.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shackgateway.shack/Https-Certificate.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shackgateway.shack/Https.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shackgateway.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/shackgateway.shack/shackgateway.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/standby.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/standby.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/standby.shack/standby.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/stats.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/stats.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/stats.shack/stats.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/tuerstatus.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/tuerstatus.shack/tuerstatus.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/upm.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/upm.shack/upm.shack.cfg create mode 100644 Monitoring/shinken/objects/shackspace/vollepulle.shack/Http.cfg create mode 100644 Monitoring/shinken/objects/shackspace/vollepulle.shack/Https-Certificate.cfg create mode 100644 Monitoring/shinken/objects/shackspace/vollepulle.shack/Https.cfg create mode 100644 Monitoring/shinken/objects/shackspace/vollepulle.shack/Ssh.cfg create mode 100644 Monitoring/shinken/objects/shackspace/vollepulle.shack/vollepulle.shack.cfg create mode 100644 Monitoring/shinken/pollerd-windows.ini create mode 100644 Monitoring/shinken/pollerd.ini create mode 100644 Monitoring/shinken/reactionnerd-windows.ini create mode 100644 Monitoring/shinken/reactionnerd.ini create mode 100644 Monitoring/shinken/receiverd-windows.ini create mode 100644 Monitoring/shinken/receiverd.ini create mode 100644 Monitoring/shinken/resource.cfg create mode 100644 Monitoring/shinken/schedulerd-windows.ini create mode 100644 Monitoring/shinken/schedulerd.ini create mode 100644 Monitoring/shinken/servicegroups.cfg create mode 100644 Monitoring/shinken/services/linux_local.cfg create mode 100644 Monitoring/shinken/shinken-specific-high-availability.cfg create mode 100644 Monitoring/shinken/shinken-specific-load-balanced-only.cfg create mode 100644 Monitoring/shinken/shinken-specific.cfg create mode 100644 Monitoring/shinken/templates.cfg create mode 100644 Monitoring/shinken/timeperiods.cfg (limited to 'Monitoring') diff --git a/Monitoring/plugins/check.bat b/Monitoring/plugins/check.bat new file mode 100755 index 00000000..e69de29b diff --git a/Monitoring/plugins/check.sh b/Monitoring/plugins/check.sh new file mode 100755 index 00000000..9e62fbee --- /dev/null +++ b/Monitoring/plugins/check.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "When in doubt... blow it up. | cpu=100%" +#sleep 1.5 +exit 0 diff --git a/Monitoring/plugins/check_apt b/Monitoring/plugins/check_apt new file mode 100755 index 00000000..2371c32d Binary files /dev/null and b/Monitoring/plugins/check_apt differ diff --git a/Monitoring/plugins/check_bgpstate b/Monitoring/plugins/check_bgpstate new file mode 100755 index 00000000..645d7505 --- /dev/null +++ b/Monitoring/plugins/check_bgpstate @@ -0,0 +1,215 @@ +#!/usr/bin/perl -w +# +# check_bgpstate.pl - nagios plugin +# +# Copyright (C) 2000 Christoph Kron +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# +# Report bugs to: ck@zet.net +# +# 11.01.2000 Version 1.0 + + + +use strict; + +use Net::SNMP; +use Getopt::Long; +&Getopt::Long::config('auto_abbrev'); + + +# whois programm for RIPE database queries +my $whois = '/usr/bin/whois'; +my $status; +my $TIMEOUT = 30; + +# critical bgp sessions +my %uplinks = ( 1273, 'Uplink ECRC', + 1755, 'Uplink EBONE', + 3300, 'Uplink AUCS' + ); + +my %ERRORS = ('UNKNOWN' , '-1', + 'OK' , '0', + 'WARNING', '1', + 'CRITICAL', '2'); + + +my %bgpPeerState = ( + '1',"idle", + '2',"connect", + '3',"active", + '4',"opensent", + '5',"openconfirm", + '6',"established" + ); +my $state = "UNKNOWN"; +my $answer = ""; +my $snmpkey; +my $snmpoid; +my $key; +my $community = "public"; +my $port = 161; +my @snmpoids; +my $snmpbgpPeerState = '1.3.6.1.2.1.15.3.1.2'; +my $snmpbgpPeerLocalAddr = '1.3.6.1.2.1.15.3.1.5'; +my $snmpbgpPeerRemoteAddr = '1.3.6.1.2.1.15.3.1.7'; +my $snmpbgpPeerRemoteAs = '1.3.6.1.2.1.15.3.1.9'; +my $hostname; +my $session; +my $error; +my $response; +my %bgpStatus; +my $bgpestablished =0 ; +my $bgpcritical =0; +my $bgpdown =0; +my $bgpidle =0; +my $bgpmessage; +my $asname; +my $remoteas; +my @output; + +sub usage { + printf "\nMissing arguments!\n"; + printf "\n"; + printf "Perl bgpstate plugin for Nagios\n"; + printf "monitors all BGP sessions\n"; + printf "usage: \n"; + printf "check_bgpstate.pl -c -p \n"; + printf "Copyright (C) 2000 Christoph Kron\n"; + printf "check_bgpstate.pl comes with ABSOLUTELY NO WARRANTY\n"; + printf "This programm is licensed under the terms of the "; + printf "GNU General Public License\n(check source code for details)\n"; + printf "\n\n"; + exit $ERRORS{"UNKNOWN"}; +} + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print ("ERROR: No snmp response from $hostname (alarm)\n"); + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + + +$status = GetOptions("community=s",\$community, + "port=i",\$port); +if ($status == 0) +{ + &usage; +} + + #shift; + $hostname = shift || &usage; + + +push(@snmpoids, $snmpbgpPeerState); +push(@snmpoids, $snmpbgpPeerLocalAddr); +push(@snmpoids, $snmpbgpPeerRemoteAddr); +push(@snmpoids, $snmpbgpPeerRemoteAs); + +foreach $snmpoid (@snmpoids) { + + ($session, $error) = Net::SNMP->session( + -hostname => $hostname, + -community => $community, + -port => $port + ); + + if (!defined($session)) { + $state='UNKNOWN'; + $answer=$error; + print ("$state: $answer"); + exit $ERRORS{$state}; + } + + if (!defined($response = $session->get_table($snmpoid))) { + $answer=$session->error; + $session->close; + $state = 'CRITICAL'; + print ("$state: $answer,$snmpkey"); + exit $ERRORS{$state}; + } + + foreach $snmpkey (keys %{$response}) { + $snmpkey =~ m/.*\.(\d+\.\d+\.\d+\.\d+$)/; + $key = $1; +# printf "debug: $snmpkey: $key -> $response->{$snmpkey}\n"; + $bgpStatus{$key}{$snmpoid} = $response->{$snmpkey}; + } + $session->close; +} + +foreach $key (keys %bgpStatus) { + if ($bgpStatus{$key}{$snmpbgpPeerState} == 6 ) { + $bgpestablished++; + } + elsif ($bgpStatus{$key}{$snmpbgpPeerState} == 1 ) { + $bgpidle++; + } + else { + $bgpdown++ ; + if (exists($uplinks{$bgpStatus{$key}{$snmpbgpPeerRemoteAs}}) ) { + $bgpcritical++; + } + @output = `$whois -T aut-num AS$bgpStatus{$key}{$snmpbgpPeerRemoteAs}`; + + $asname = ""; + foreach (@output) { + if (m/as-name/) { + $asname = $_; + $asname =~ s/as-name://; + last; + } + if ( $asname =~ "" && m/descr/ ) { + $asname = $_; + $asname =~ s/descr://; + } + } + $asname =~ s/^\s*//; + $asname =~ s/\s*$//; + $bgpmessage .= sprintf("Peering with AS%s not established -> %s
", + $bgpStatus{$key}{$snmpbgpPeerRemoteAs}, + $asname); + } +} + + + if ($bgpdown > 0) { + if ($bgpcritical > 0) { + $state = 'CRITICAL'; + } + else { + $state = 'WARNING'; + } + $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d
", + $hostname, + $bgpestablished, + $bgpdown, $bgpidle); + $answer = $answer . $bgpmessage . "\n"; + } + else { + $state = 'OK'; + $answer = sprintf("host '%s', sessions up: %d, down: %d, shutdown: %d\n", + $hostname, + $bgpestablished, + $bgpdown,$bgpidle); + } + +print ("$state: $answer"); +exit $ERRORS{$state}; + diff --git a/Monitoring/plugins/check_breeze b/Monitoring/plugins/check_breeze new file mode 100755 index 00000000..d0382e69 --- /dev/null +++ b/Monitoring/plugins/check_breeze @@ -0,0 +1,87 @@ +#! /usr/bin/perl -wT + + +use strict; +use Getopt::Long; +use vars qw($opt_V $opt_h $opt_w $opt_c $opt_H $opt_C $PROGNAME); +use lib "/usr/lib/nagios/plugins" ; +use utils qw(%ERRORS &print_revision &support &usage); + +$PROGNAME = "check_breeze"; + +sub print_help (); +sub print_usage (); + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "w=s" => \$opt_w, "warning=s" => \$opt_w, + "c=s" => \$opt_c, "critical=s" => \$opt_c, + "H=s" => \$opt_H, "hostname=s" => \$opt_H, + "C=s" => \$opt_C, "community=s" => \$opt_C); + +if ($opt_V) { + print_revision($PROGNAME,'1.4.15'); + exit $ERRORS{'OK'}; +} + +if ($opt_h) {print_help(); exit $ERRORS{'OK'};} + +($opt_H) || usage("Host name/address not specified\n"); +my $host = $1 if ($opt_H =~ /([-.A-Za-z0-9]+)/); +($host) || usage("Invalid host: $opt_H\n"); + +($opt_w) || usage("Warning threshold not specified\n"); +my $warning = $1 if ($opt_w =~ /([0-9]{1,2}|100)+/); +($warning) || usage("Invalid warning threshold: $opt_w\n"); + +($opt_c) || usage("Critical threshold not specified\n"); +my $critical = $1 if ($opt_c =~ /([0-9]{1,2}|100)/); +($critical) || usage("Invalid critical threshold: $opt_c\n"); + +($opt_C) || ($opt_C = "public") ; + +my $sig=0; +$sig = `snmpget $host $opt_C .1.3.6.1.4.1.710.3.2.3.1.3.0`; +my @test=split(/ /,$sig); +$sig=$test[2]; +$sig=int($sig); +if ($sig>100){$sig=100} + +print "Signal Strength at: $sig%\n"; + +exit $ERRORS{'CRITICAL'} if ($sig<$critical); +exit $ERRORS{'WARNING'} if ($sig<$warning); +exit $ERRORS{'OK'}; + + +sub print_usage () { + print "Usage: $PROGNAME -H [-C community] -w -c \n"; +} + +sub print_help () { + print_revision($PROGNAME,'1.4.15'); + print "Copyright (c) 2000 Jeffrey Blank/Karl DeBisschop + +This plugin reports the signal strength of a Breezecom wireless equipment + +"; + print_usage(); + print " +-H, --hostname=HOST + Name or IP address of host to check +-C, --community=community + SNMPv1 community (default public) +-w, --warning=INTEGER + Percentage strength below which a WARNING status will result +-c, --critical=INTEGER + Percentage strength below which a CRITICAL status will result + +"; + support(); +} diff --git a/Monitoring/plugins/check_by_ssh b/Monitoring/plugins/check_by_ssh new file mode 100755 index 00000000..5f969058 Binary files /dev/null and b/Monitoring/plugins/check_by_ssh differ diff --git a/Monitoring/plugins/check_clamd b/Monitoring/plugins/check_clamd new file mode 120000 index 00000000..e838da97 --- /dev/null +++ b/Monitoring/plugins/check_clamd @@ -0,0 +1 @@ +check_tcp \ No newline at end of file diff --git a/Monitoring/plugins/check_cluster b/Monitoring/plugins/check_cluster new file mode 100755 index 00000000..8d6dbb90 Binary files /dev/null and b/Monitoring/plugins/check_cluster differ diff --git a/Monitoring/plugins/check_cpu b/Monitoring/plugins/check_cpu new file mode 100755 index 00000000..26a93da5 --- /dev/null +++ b/Monitoring/plugins/check_cpu @@ -0,0 +1,165 @@ +#!/usr/bin/python + +import string, os, sys, re +#from optik import OptionParser +from optparse import OptionParser + + + +####################################### +### Define a set of strings to handle +### any info output requirements. + + +check_cpu_version = "check_cpu (nagios-plugins 1.5.1!?) 0.4.0a\n" + +intro = "The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\ncopies of the plugins under the terms of the GNU General Public License.\nFor more information about these matters, see the file named COPYING.\nCopyright (c) 2004 Ethan Galstad/Karl DeBisschop\n\n" + +preamble = "This plugin will check the percent of idle CPU usage on the system it is\nexecuted on and generate an alert if the percentage is below\none of the threshold values.\n\n" + +use = "Usage:\tcheck_cpu -w limit -c limit [-t timeout]\n\tcheck_cpu (-h|--help)\n\tcheck_cpu (-V|--version)\n" + +options = "\n -w, --warning=PERCENT\n\tExit with WARNING status if idle CPU percentage is less than PERCENT\n -c, --critical=PERCENT\n\tExit with CRITICAL status if idle CPU percentage is less than PERCENT\n -t, --timeout=INTEGER\n\tSeconds before check attempt times out (default: 10)\n -s, --sample=INTEGER\n\tSeconds to use as sample time. (default: 5)\n -h, --help\n\tPrint detailed help screen\n -V, --version\n\tPrint version information\n\n" + +bugs = "Bugs:\tTimeout does not do what has been documented here. Rather, it does \nnothing. The plugin seems to ignore characters that are not attached to \nparameter syntax. This has been tested on RedHat 8.0+, Fedora Core 1 & 2, \nOpenBSD 3.x and Debian. I would appreciate feedback and/or patches if it doesn't\nfunction under your chosen operating system.\n\n" + +query = "Send email to nagios-users@lists.sourceforge.net if you have questions\nregarding the use of this software. To submit patches or suggest improvements,\nsend email to nagiosplug-devel@lists.sourceforge.net.\n\nFor questions and suggestions pertaining to the check_cpu plugin,\nplease send email to nemir@hotmail.com.\n" + +fullHelp = check_cpu_version + intro + preamble + use + options + bugs + query + + + + + +def helpFunc(option, opt, value, parser): + print fullHelp + sys.exit(3) + +def verFunc(option, opt, value, parser): + print check_cpu_version + sys.exit(3) + + + + +####################################### +### Parse all the parameters. Define +### variables for later use. + + + +parser = OptionParser(add_help_option=0) + +parser.add_option("-h", "--help", action="callback", callback=helpFunc) +parser.add_option("-V", "--version", action="callback", callback=verFunc) +parser.add_option("-w", "--warning", action="store", type="int", dest="warn", default=-1) +parser.add_option("-c", "--critical", action="store", type="int", dest="crit", default=-2) +parser.add_option("-s", "--sample", action="store", type="int", dest="sample", default=5) +parser.add_option("-t", "--timeout", action="store", type="int", dest="timeout", default=10) + +(options, args) = parser.parse_args() + +critical = options.crit +warning = options.warn +sample = options.sample +timeout = options.timeout + + +if -3 > critical or 101 < critical: + print "Critical value is a percentage and must be between 0 and 100.\n" + use + sys.exit(3) + +if -2 > warning or 101 < warning: + print "Warning value is a percentage and must be between 0 and 100.\n" + use + sys.exit(3) + +if critical >= warning: + print "Critical value must be less than the warning value.\n" + use + sys.exit(3) + +if sample >= timeout -1: + print "Sample time must be 2 seconds less than timeout.\n" + use + sys.exit(3) + +strSample = str(sample) + + +####################################### +### Determine what OS we are being run +### on, to figure syntax required. + + +v = os.popen("uname", "r") +l = v.read() + +if l == "Linux\n": + vmcmd = "/usr/bin/vmstat " + strSample + " 2" +elif l == "OpenBSD\n": + vmcmd = "/usr/bin/vmstat -c 2 -w " + strSample +elif l == "FreeBSD\n": + vmcmd = "/usr/bin/vmstat -c 2 -w " + strSample +elif l == "NetBSD\n": + vmcmd = "/usr/bin/vmstat -c 2 -w " + strSample +elif l == "SunOS\n": + vmcmd = "/usr/bin/vmstat " + strSample + " 2" +else: + print "Unknown operating system, unable to continue.\n" + sys.exit(3) + + +####################################### +### Grab the CPU sample and convert the +### the relevent info to an int. + + +vmstat = os.popen( vmcmd, "r" ) +statOut = vmstat.read() + + +statLines = string.split( statOut, '\n') +lastLine = statLines[-2].strip() + +n = len(statLines) +for i in range(0, n): + idcheck = re.search("id", statLines[i]) + if idcheck: + idLine = statLines[i].strip() + + + +idStr = re.sub( "[ \t\n\r\v]+", " ", idLine ) +idList = string.split(idStr, " ") +idColumn = idList.index("id") + +valueStr = re.sub( "[ \t\n\r\v]+", " ", lastLine ) +values = string.split( valueStr, ' ') + +idleCPU = values[idColumn] +sysCPU = values[-2] +userCPU = values[-3] + +idleValue = string.atoi(idleCPU) + + +####################################### +### Finally, determine and report CPU +### state, and exit the plugin. + + +if idleValue <= critical: + status = "CPU CRITICAL" + print status + ": CPU is only " + idleCPU + "% idle" + sys.exit(2) +elif idleValue <= warning: + status = "WARNING" + print status + ": CPU is only " + idleCPU + "% idle" + sys.exit(1) +elif warning < idleValue: + status = "OK" + print status + ": CPU is " + idleCPU + "% idle" + sys.exit(0) +else: + status = "CPU STATUS UNKNOWN" + print status + ": Could not complete check." + sys.exit(3) + diff --git a/Monitoring/plugins/check_dhcp b/Monitoring/plugins/check_dhcp new file mode 100755 index 00000000..6b51224f Binary files /dev/null and b/Monitoring/plugins/check_dhcp differ diff --git a/Monitoring/plugins/check_dig b/Monitoring/plugins/check_dig new file mode 100755 index 00000000..650608dc Binary files /dev/null and b/Monitoring/plugins/check_dig differ diff --git a/Monitoring/plugins/check_disk b/Monitoring/plugins/check_disk new file mode 100755 index 00000000..43dc43a3 Binary files /dev/null and b/Monitoring/plugins/check_disk differ diff --git a/Monitoring/plugins/check_disk_smb b/Monitoring/plugins/check_disk_smb new file mode 100755 index 00000000..80fa6779 --- /dev/null +++ b/Monitoring/plugins/check_disk_smb @@ -0,0 +1,307 @@ +#! /usr/bin/perl -w +# +# +# check_disk.pl [warn] [critical] [port] +# +# Nagios host script to get the disk usage from a SMB share +# +# Changes and Modifications +# ========================= +# 7-Aug-1999 - Michael Anthon +# Created from check_disk.pl script provided with netsaint_statd (basically +# cause I was too lazy (or is that smart?) to write it from scratch) +# 8-Aug-1999 - Michael Anthon +# Modified [warn] and [critical] parameters to accept format of nnn[M|G] to +# allow setting of limits in MBytes or GBytes. Percentage settings for large +# drives is a pain in the butt +# 2-May-2002 - SGhosh fix for embedded perl +# +# + +require 5.004; +use POSIX; +use strict; +use Getopt::Long; +use vars qw($opt_P $opt_V $opt_h $opt_H $opt_s $opt_W $opt_u $opt_p $opt_w $opt_c $opt_a $verbose); +use vars qw($PROGNAME); +use lib "/usr/lib/nagios/plugins" ; +use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); + +sub print_help (); +sub print_usage (); + +$PROGNAME = "check_disk_smb"; + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("v" => \$verbose, "verbose" => \$verbose, + "P=s" => \$opt_P, "port=s" => \$opt_P, + "V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "w=s" => \$opt_w, "warning=s" => \$opt_w, + "c=s" => \$opt_c, "critical=s" => \$opt_c, + "p=s" => \$opt_p, "password=s" => \$opt_p, + "u=s" => \$opt_u, "username=s" => \$opt_u, + "s=s" => \$opt_s, "share=s" => \$opt_s, + "W=s" => \$opt_W, "workgroup=s" => \$opt_W, + "H=s" => \$opt_H, "hostname=s" => \$opt_H, + "a=s" => \$opt_a, "address=s" => \$opt_a); + +if ($opt_V) { + print_revision($PROGNAME,'1.4.15'); #' + exit $ERRORS{'OK'}; +} + +if ($opt_h) {print_help(); exit $ERRORS{'OK'};} + +my $smbclient = $utils::PATH_TO_SMBCLIENT; + +# Options checking + +($opt_H) || ($opt_H = shift @ARGV) || usage("Host name not specified\n"); +my $host = $1 if ($opt_H =~ /^([-_.A-Za-z0-9 ]+\$?)$/); +($host) || usage("Invalid host: $opt_H\n"); + +($opt_s) || ($opt_s = shift @ARGV) || usage("Share volume not specified\n"); +my $share = $1 if ($opt_s =~ /^([-_.A-Za-z0-9 ]+\$?)$/); +($share) || usage("Invalid share: $opt_s\n"); + +defined($opt_u) || ($opt_u = shift @ARGV) || ($opt_u = "guest"); +my $user = $1 if ($opt_u =~ /^([-_.A-Za-z0-9\\]*)$/); +defined($user) || usage("Invalid user: $opt_u\n"); + +defined($opt_p) || ($opt_p = shift @ARGV) || ($opt_p = ""); +my $pass = $1 if ($opt_p =~ /(.*)/); + +($opt_w) || ($opt_w = shift @ARGV) || ($opt_w = 85); +my $warn = $1 if ($opt_w =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/); +($warn) || usage("Invalid warning threshold: $opt_w\n"); + +($opt_c) || ($opt_c = shift @ARGV) || ($opt_c = 95); +my $crit = $1 if ($opt_c =~ /^([0-9]{1,2}\%?|100\%?|[0-9]+[kMG])$/); +($crit) || usage("Invalid critical threshold: $opt_c\n"); + +# Execute the given command line and return anything it writes to STDOUT and/or +# STDERR. (This might be useful for other plugins, too, so it should possibly +# be moved to utils.pm.) +sub output_and_error_of { + local *CMD; + local $/ = undef; + my $pid = open CMD, "-|"; + if (defined($pid)) { + if ($pid) { + return ; + } else { + open STDERR, ">&STDOUT" and exec @_; + exit(1); + } + } + return undef; +} + +# split the type from the unit value +#Check $warn and $crit for type (%/M/G) and set up for tests +#P = Percent, K = KBytes +my $warn_type; +my $crit_type; + +if ($opt_w =~ /^([0-9]+)\%?$/) { + $warn = "$1"; + $warn_type = "P"; +} elsif ($opt_w =~ /^([0-9]+)k$/) { + $warn_type = "K"; + $warn = $1; +} elsif ($opt_w =~ /^([0-9]+)M$/) { + $warn_type = "K"; + $warn = $1 * 1024; +} elsif ($opt_w =~ /^([0-9]+)G$/) { + $warn_type = "K"; + $warn = $1 * 1048576; +} +if ($opt_c =~ /^([0-9]+)\%?$/) { + $crit = "$1"; + $crit_type = "P"; +} elsif ($opt_c =~ /^([0-9]+)k$/) { + $crit_type = "K"; + $crit = $1; +} elsif ($opt_c =~ /^([0-9]+)M$/) { + $crit_type = "K"; + $crit = $1 * 1024; +} elsif ($opt_c =~ /^([0-9]+)G$/) { + $crit_type = "K"; + $crit = $1 * 1048576; +} + +# check if both warning and critical are percentage or size +unless( ( $warn_type eq "P" && $crit_type eq "P" ) || ( $warn_type ne "P" && $crit_type ne "P" ) ){ + $opt_w =~ s/\%/\%\%/g; + $opt_c =~ s/\%/\%\%/g; + usage("Both warning and critical should be same type- warning: $opt_w critical: $opt_c \n"); +} + +# verify warning is less than critical +if ( $warn_type eq "K") { + unless ( $warn > $crit) { + usage("Disk size: warning ($opt_w) should be greater than critical ($opt_c) \n"); + } +}else{ + unless ( $warn < $crit) { + $opt_w =~ s/\%/\%\%/g; + $opt_c =~ s/\%/\%\%/g; + usage("Percentage: warning ($opt_w) should be less than critical ($opt_c) \n"); + } +} + +my $workgroup = $1 if (defined($opt_W) && $opt_W =~ /(.*)/); + +my $address = $1 if (defined($opt_a) && $opt_a =~ /(.*)/); + +# end of options checking + + +my $state = "OK"; +my $answer = undef; +my $res = undef; +my @lines = undef; + +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print "No Answer from Client\n"; + exit $ERRORS{"UNKNOWN"}; +}; +alarm($TIMEOUT); + +# Execute an "ls" on the share using smbclient program +# get the results into $res +my @cmd = ( + $smbclient, + "//$host/$share", + "-U", "$user%$pass", + defined($workgroup) ? ("-W", $workgroup) : (), + defined($address) ? ("-I", $address) : (), + defined($opt_P) ? ("-p", $opt_P) : (), + "-c", "ls" +); + +print join(" ", @cmd) . "\n" if ($verbose); +$res = output_and_error_of(@cmd) or exit $ERRORS{"UNKNOWN"}; + +#Turn off alarm +alarm(0); + +#Split $res into an array of lines +@lines = split /\n/, $res; + +#Get the last line into $_ +$_ = $lines[$#lines]; +#print "$_\n"; + +#Process the last line to get free space. +#If line does not match required regexp, return an UNKNOWN error +if (/\s*(\d*) blocks of size (\d*)\. (\d*) blocks available/) { + + my ($avail) = ($3*$2)/1024; + my ($avail_bytes) = $avail; + my ($capper) = int(($3/$1)*100); + my ($mountpt) = "\\\\$host\\$share"; + + + if (int($avail / 1024) > 0) { + $avail = int($avail / 1024); + if (int($avail /1024) > 0) { + $avail = (int(($avail / 1024)*100))/100; + $avail = $avail ."G"; + } else { + $avail = $avail ."M"; + } + } else { + $avail = $avail ."K"; + } + +#print ":$warn:$warn_type:\n"; +#print ":$crit:$crit_type:\n"; +#print ":$avail:$avail_bytes:$capper:$mountpt:\n"; + + if ((($warn_type eq "P") && (100 - $capper) < $warn) || (($warn_type eq "K") && ($avail_bytes > $warn))) { + $answer = "Disk ok - $avail ($capper%) free on $mountpt\n"; + } elsif ((($crit_type eq "P") && (100 - $capper) < $crit) || (($crit_type eq "K") && ($avail_bytes > $crit))) { + $state = "WARNING"; + $answer = "WARNING: Only $avail ($capper%) free on $mountpt\n"; + } else { + $state = "CRITICAL"; + $answer = "CRITICAL: Only $avail ($capper%) free on $mountpt\n"; + } +} else { + $answer = "Result from smbclient not suitable\n"; + $state = "UNKNOWN"; + foreach (@lines) { + if (/(Access denied|NT_STATUS_LOGON_FAILURE|NT_STATUS_ACCESS_DENIED)/) { + $answer = "Access Denied\n"; + $state = "CRITICAL"; + last; + } + if (/(Unknown host \w*|Connection.*failed)/) { + $answer = "$1\n"; + $state = "CRITICAL"; + last; + } + if (/(You specified an invalid share name|NT_STATUS_BAD_NETWORK_NAME)/) { + $answer = "Invalid share name \\\\$host\\$share\n"; + $state = "CRITICAL"; + last; + } + } +} + + +print $answer; +print "$state\n" if ($verbose); +exit $ERRORS{$state}; + +sub print_usage () { + print "Usage: $PROGNAME -H -s -u -p + -w -c [-W ] [-P ] [-a ]\n"; +} + +sub print_help () { + print_revision($PROGNAME,'1.4.15'); + print "Copyright (c) 2000 Michael Anthon/Karl DeBisschop + +Perl Check SMB Disk plugin for Nagios + +"; + print_usage(); + print " +-H, --hostname=HOST + NetBIOS name of the server +-s, --share=STRING + Share name to be tested +-W, --workgroup=STRING + Workgroup or Domain used (Defaults to \"WORKGROUP\") +-a, --address=IP + IP-address of HOST (only necessary if HOST is in another network) +-u, --user=STRING + Username to log in to server. (Defaults to \"guest\") +-p, --password=STRING + Password to log in to server. (Defaults to an empty password) +-w, --warning=INTEGER or INTEGER[kMG] + Percent of used space at which a warning will be generated (Default: 85%) + +-c, --critical=INTEGER or INTEGER[kMG] + Percent of used space at which a critical will be generated (Defaults: 95%) +-P, --port=INTEGER + Port to be used to connect to. Some Windows boxes use 139, others 445 (Defaults to smbclient default) + + If thresholds are followed by either a k, M, or G then check to see if that + much disk space is available (kilobytes, Megabytes, Gigabytes) + + Warning percentage should be less than critical + Warning (remaining) disk space should be greater than critical. + +"; + support(); +} diff --git a/Monitoring/plugins/check_dns b/Monitoring/plugins/check_dns new file mode 100755 index 00000000..8a80b991 Binary files /dev/null and b/Monitoring/plugins/check_dns differ diff --git a/Monitoring/plugins/check_dummy b/Monitoring/plugins/check_dummy new file mode 100755 index 00000000..b66006ac Binary files /dev/null and b/Monitoring/plugins/check_dummy differ diff --git a/Monitoring/plugins/check_dummy.sh b/Monitoring/plugins/check_dummy.sh new file mode 100755 index 00000000..fe834bd0 --- /dev/null +++ b/Monitoring/plugins/check_dummy.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +echo "Return in Dummy" $1 + +exit $1 \ No newline at end of file diff --git a/Monitoring/plugins/check_file_age b/Monitoring/plugins/check_file_age new file mode 100755 index 00000000..7f20bad7 --- /dev/null +++ b/Monitoring/plugins/check_file_age @@ -0,0 +1,112 @@ +#! /usr/bin/perl -w + +# check_file_age.pl Copyright (C) 2003 Steven Grimm +# +# Checks a file's size and modification time to make sure it's not empty +# and that it's sufficiently recent. +# +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# you should have received a copy of the GNU General Public License +# along with this program (or with Nagios); if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA + +use strict; +use English; +use Getopt::Long; +use File::stat; +use vars qw($PROGNAME); +use lib "/usr/lib/nagios/plugins"; +use utils qw (%ERRORS &print_revision &support); + +sub print_help (); +sub print_usage (); + +my ($opt_c, $opt_f, $opt_w, $opt_C, $opt_W, $opt_h, $opt_V); +my ($result, $message, $age, $size, $st); + +$PROGNAME="check_file_age"; + +$opt_w = 240; +$opt_c = 600; +$opt_W = 0; +$opt_C = 0; +$opt_f = ""; + +Getopt::Long::Configure('bundling'); +GetOptions( + "V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "f=s" => \$opt_f, "file" => \$opt_f, + "w=f" => \$opt_w, "warning-age=f" => \$opt_w, + "W=f" => \$opt_W, "warning-size=f" => \$opt_W, + "c=f" => \$opt_c, "critical-age=f" => \$opt_c, + "C=f" => \$opt_C, "critical-size=f" => \$opt_C); + +if ($opt_V) { + print_revision($PROGNAME, '1.4.15'); + exit $ERRORS{'OK'}; +} + +if ($opt_h) { + print_help(); + exit $ERRORS{'OK'}; +} + +$opt_f = shift unless ($opt_f); + +if (! $opt_f) { + print "FILE_AGE UNKNOWN: No file specified\n"; + exit $ERRORS{'UNKNOWN'}; +} + +# Check that file exists (can be directory or link) +unless (-e $opt_f) { + print "FILE_AGE CRITICAL: File not found - $opt_f\n"; + exit $ERRORS{'CRITICAL'}; +} + +$st = File::stat::stat($opt_f); +$age = time - $st->mtime; +$size = $st->size; + + +$result = 'OK'; + +if (($opt_c and $age > $opt_c) or ($opt_C and $size < $opt_C)) { + $result = 'CRITICAL'; +} +elsif (($opt_w and $age > $opt_w) or ($opt_W and $size < $opt_W)) { + $result = 'WARNING'; +} + +print "FILE_AGE $result: $opt_f is $age seconds old and $size bytes\n"; +exit $ERRORS{$result}; + +sub print_usage () { + print "Usage:\n"; + print " $PROGNAME [-w ] [-c ] [-W ] [-C ] -f \n"; + print " $PROGNAME [-h | --help]\n"; + print " $PROGNAME [-V | --version]\n"; +} + +sub print_help () { + print_revision($PROGNAME, '1.4.15'); + print "Copyright (c) 2003 Steven Grimm\n\n"; + print_usage(); + print "\n"; + print " File must be no more than this many seconds old (default: warn 240 secs, crit 600)\n"; + print " File must be at least this many bytes long (default: crit 0 bytes)\n"; + print "\n"; + support(); +} diff --git a/Monitoring/plugins/check_flexlm b/Monitoring/plugins/check_flexlm new file mode 100755 index 00000000..532785ef --- /dev/null +++ b/Monitoring/plugins/check_flexlm @@ -0,0 +1,244 @@ +#! /usr/bin/perl -w +# +# usage: +# check_flexlm.pl license_file +# +# Check available flexlm license managers. +# Use lmstat to check the status of the license server +# described by the license file given as argument. +# Check and interpret the output of lmstat +# and create returncodes and output. +# +# Contrary to the nagios concept, this script takes +# a file, not a hostname as an argument and returns +# the status of hosts and services described in that +# file. Use these hosts.cfg entries as an example +# +#host[anchor]=any host will do;some.address.com;;check-host-alive;3;120;24x7;1;1;1; +#service[anchor]=yodel;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yodel_lic +#service[anchor]=yeehaw;24x7;3;5;5;unix-admin;60;24x7;1;1;1;;check_flexlm!/opt/lic/licfiles/yeehaw_lic +#command[check_flexlm]=/some/path/libexec/check_flexlm.pl $ARG1$ +# +# Notes: +# - you need the lmstat utility which comes with flexlm. +# - set the correct path in the variable $lmstat. +# +# initial version: 9-10-99 Ernst-Dieter Martin edmt@infineon.com +# +# License: GPL +# +# lmstat output patches from Steve Rigler/Cliff Rice 13-Apr-2002 +# srigler@marathonoil.com,cerice@marathonoil.com + + + +use strict; +use Getopt::Long; +use vars qw($opt_V $opt_h $opt_F $opt_t $verbose $PROGNAME); +use lib "/usr/lib/nagios/plugins"; +use utils qw(%ERRORS &print_revision &support &usage); + +$PROGNAME="check_flexlm"; + +sub print_help (); +sub print_usage (); + +$ENV{'PATH'}=''; +$ENV{'BASH_ENV'}=''; +$ENV{'ENV'}=''; + +Getopt::Long::Configure('bundling'); +GetOptions + ("V" => \$opt_V, "version" => \$opt_V, + "h" => \$opt_h, "help" => \$opt_h, + "v" => \$verbose, "verbose" => \$verbose, + "F=s" => \$opt_F, "filename=s" => \$opt_F, + "t=i" => \$opt_t, "timeout=i" => \$opt_t); + +if ($opt_V) { + print_revision($PROGNAME,'1.4.15'); + exit $ERRORS{'OK'}; +} + +unless (defined $opt_t) { + $opt_t = $utils::TIMEOUT ; # default timeout +} + + +if ($opt_h) {print_help(); exit $ERRORS{'OK'};} + +unless (defined $opt_F) { + print "Missing license.dat file\n"; + print_usage(); + exit $ERRORS{'UNKNOWN'}; +} +# Just in case of problems, let's not hang Nagios +$SIG{'ALRM'} = sub { + print "Timeout: No Answer from Client\n"; + exit $ERRORS{'UNKNOWN'}; +}; +alarm($opt_t); + +my $lmstat = $utils::PATH_TO_LMSTAT ; +unless (-x $lmstat ) { + print "Cannot find \"lmstat\"\n"; + exit $ERRORS{'UNKNOWN'}; +} + +($opt_F) || ($opt_F = shift) || usage("License file not specified\n"); +my $licfile = $1 if ($opt_F =~ /^(.*)$/); +($licfile) || usage("Invalid filename: $opt_F\n"); + +print "$licfile\n" if $verbose; + +if ( ! open(CMD,"$lmstat -c $licfile |") ) { + print "ERROR: Could not open \"$lmstat -c $licfile\" ($!)\n"; + exit exit $ERRORS{'UNKNOWN'}; +} + +my $serverup = 0; +my @upsrv; +my @downsrv; # list of servers up and down + +#my ($ls1,$ls2,$ls3,$lf1,$lf2,$lf3,$servers); + +# key off of the term "license server" and +# grab the status. Keep going until "Vendor" is found +# + +# +# Collect list of license servers by their status +# Vendor daemon status is ignored for the moment. + +while ( ) { + next if (/^lmstat/); # ignore 1st line - copyright + next if (/^Flexible/); # ignore 2nd line - timestamp + (/^Vendor/) && last; # ignore Vendor daemon status + print $_ if $verbose; + + if ($_ =~ /license server /) { # matched 1 (of possibly 3) license server + s/^\s*//; #some servers start at col 1, other have whitespace + # strip staring whitespace if any + if ( $_ =~ /UP/) { + $_ =~ /^(.*):/ ; + push(@upsrv, $1); + print "up:$1:\n" if $verbose; + } else { + $_ =~ /^(.*):/; + push(@downsrv, $1); + print "down:$1:\n" if $verbose; + } + + } + + +# if ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*),[0-9]*@([-0-9a-zA-Z_]*)/ ) { +# $ls1 = $1; +# $ls2 = $2; +# $ls3 = $3; +# $lf1 = $lf2 = $lf3 = 0; +# $servers = 3; +# } elsif ( /^License server status: [0-9]*@([-0-9a-zA-Z_]*)/ ) { +# $ls1 = $1; +# $ls2 = $ls3 = ""; +# $lf1 = $lf2 = $lf3 = 0; +# $servers = 1; +# } elsif ( / *$ls1: license server UP/ ) { +# print "$ls1 UP, "; +# $lf1 = 1 +# } elsif ( / *$ls2: license server UP/ ) { +# print "$ls2 UP, "; +# $lf2 = 1 +# } elsif ( / *$ls3: license server UP/ ) { +# print "$ls3 UP, "; +# $lf3 = 1 +# } elsif ( / *([^:]*: UP .*)/ ) { +# print " license server for $1\n"; +# $serverup = 1; +# } + +} + +#if ( $serverup == 0 ) { +# print " license server not running\n"; +# exit 2; +#} + +close CMD; + +if ($verbose) { + print "License Servers running: ".scalar(@upsrv) ."\n"; + foreach my $upserver (@upsrv) { + print "$upserver\n"; + } + print "License servers not running: ".scalar(@downsrv)."\n"; + foreach my $downserver (@downsrv) { + print "$downserver\n"; + } +} + +# +# print list of servers which are up. +# +if (scalar(@upsrv) > 0) { + print "License Servers running:"; + foreach my $upserver (@upsrv) { + print "$upserver,"; + } +} +# +# Ditto for those which are down. +# +if (scalar(@downsrv) > 0) { + print "License servers NOT running:"; + foreach my $downserver (@downsrv) { + print "$downserver,"; + } +} + +# perfdata +print "\n|flexlm::up:".scalar(@upsrv).";down:".scalar(@downsrv)."\n"; + +exit $ERRORS{'OK'} if ( scalar(@downsrv) == 0 ); +exit $ERRORS{'WARNING'} if ( (scalar(@upsrv) > 0) && (scalar(@downsrv) > 0)); + +#exit $ERRORS{'OK'} if ( $servers == $lf1 + $lf2 + $lf3 ); +#exit $ERRORS{'WARNING'} if ( $servers == 3 && $lf1 + $lf2 + $lf3 == 2 ); +exit $ERRORS{'CRITICAL'}; + + +sub print_usage () { + print "Usage: + $PROGNAME -F [-v] [-t] [-V] [-h] + $PROGNAME --help + $PROGNAME --version +"; +} + +sub print_help () { + print_revision($PROGNAME,'1.4.15'); + print "Copyright (c) 2000 Ernst-Dieter Martin/Karl DeBisschop + +Check available flexlm license managers + +"; + print_usage(); + print " +-F, --filename=FILE + Name of license file (usually \"license.dat\") +-v, --verbose + Print some extra debugging information (not advised for normal operation) +-t, --timeout + Plugin time out in seconds (default = $utils::TIMEOUT ) +-V, --version + Show version and license information +-h, --help + Show this help screen + +Flexlm license managers usually run as a single server or three servers and a +quorum is needed. The plugin return OK if 1 (single) or 3 (triple) servers +are running, CRITICAL if 1(single) or 3 (triple) servers are down, and WARNING +if 1 or 2 of 3 servers are running\n +"; + support(); +} diff --git a/Monitoring/plugins/check_fping b/Monitoring/plugins/check_fping new file mode 100755 index 00000000..3d2b16f9 Binary files /dev/null and b/Monitoring/plugins/check_fping differ diff --git a/Monitoring/plugins/check_ftp b/Monitoring/plugins/check_ftp new file mode 120000 index 00000000..e838da97 --- /dev/null +++ b/Monitoring/plugins/check_ftp @@ -0,0 +1 @@ +check_tcp \ No newline at end of file diff --git a/Monitoring/plugins/check_game b/Monitoring/plugins/check_game new file mode 100755 index 00000000..68c4bda4 Binary files /dev/null and b/Monitoring/plugins/check_game differ diff --git a/Monitoring/plugins/check_host b/Monitoring/plugins/check_host new file mode 120000 index 00000000..97878096 --- /dev/null +++ b/Monitoring/plugins/check_host @@ -0,0 +1 @@ +check_icmp \ No newline at end of file diff --git a/Monitoring/plugins/check_hpjd b/Monitoring/plugins/check_hpjd new file mode 100755 index 00000000..75af60de Binary files /dev/null and b/Monitoring/plugins/ch