diff --git a/playbooks/groups/noc.yml b/playbooks/groups/noc.yml
index ddde6658c0..d1e2e6afb6 100644
--- a/playbooks/groups/noc.yml
+++ b/playbooks/groups/noc.yml
@@ -63,7 +63,6 @@
- { role: dhcp_server, when: datacenter == 'rdu3' }
- { role: tftp_server, when: datacenter == 'rdu3' }
- { role: firmware_proxy, when: datacenter == 'rdu3' }
- - { role: nagios_server, when: datacenter == 'ibiblio' or datacenter == 'rdu3' }
- { role: zabbix/datanommer, when: datacenter == 'rdu3' }
tasks:
diff --git a/roles/nagios_server/README.rst b/roles/nagios_server/README.rst
deleted file mode 100644
index 3152303bde..0000000000
--- a/roles/nagios_server/README.rst
+++ /dev/null
@@ -1,78 +0,0 @@
-===================================
- Nagios 4 Configuration for Fedora
-===================================
-
-The Fedora Infrastructure Nagios is built on a set of configurations
-originally written for Nagios 2 and then upgraded over time to Nagios
-3 and then 4.08. With additional changes made in the 4.2 series of
-Nagios this needed a better rewrite as various parts came from
-pre-puppet and then various puppet modules added on top.
-
-In order to get this rewrite done, we will use as much of the original
-layout of the Fedora ansible nagios module but with rewrites to better
-match current Nagios configurations so that it can be maintained.
-
-Role directory layout
-=====================
-The original layout branched out from
-
- roles/nagios/client/
- roles/nagios/server/
-
-With the usual trees below this. This breaks ansible best practices
-and how most new modules are set up so the rewrite uses:
-
- roles/nagios_client/
- roles/nagios_server/
-
-=====================
- Nagios Server Files
-=====================
-
-The Nagios Server Files require a large layout change. The original
-Nagios system used multiple independant modes and files which caused
-problems when hosts were removed. The new system will use hosts set up
-from the Fedora Ansible Inventory with hostgroups set up to match
-groups.
-
- roles/nagios_server/{files,handlers,tasks,templates}
-
- r.../n.../files/httpd ==> /etc/httpd/conf.d files
- r.../n.../files/nagios ==> /etc/nagios/ files
- r.../n.../files/nagios/commands command files
- r.../n.../files/nagios/hosts host files
- r.../n.../files/nagios/hostgroups groups made from hosts
- r.../n.../files/nagios/services services
- r.../n.../files/nagios/servicegroups groups made from services
- r.../n.../files/nagios/contacts files for people
- r.../n.../files/nagios/contactgroups groups made from contacts
-
- similar layout for templates
- handlers has the ways to restart and check configuration
- tasks has the main rules for building stuff.
-
-===================
-Nagios Module Steps
-===================
-
-1. Check to see if the nagios user is configured. Someone years ago
- chose that our monitoring uses UID/GID 420. Har Har.
- Setup any other groups and permissions
-2. Install the needed packages for the server.
-3. Setup the directories on the server
- /etc/nagios/{child}
-4. Synchonise over the static files
- /etc/nagios/commands/
- /etc/nagios/services/
- /etc/nagios/servicegroups/
- /etc/nagios/contacts/
- /etc/nagios/contactgroups/
- /usr/lib64/nagios/plugins/
- /usr/local/bin
- /usr/share/nagios/html/
-5. Build template files
- /etc/nagios/commands/
- /etc/nagios/hosts/{ansible-inventory, ansible-vars, other}
- /etc/nagios/hostgroups/
-6. Fix selinux policy
-7. Restart services
diff --git a/roles/nagios_server/files/httpd/nagios-new.conf b/roles/nagios_server/files/httpd/nagios-new.conf
deleted file mode 100644
index 3aada15f6a..0000000000
--- a/roles/nagios_server/files/httpd/nagios-new.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-# noc1
-ScriptAlias /nagios/cgi-bin/ /usr/lib64/nagios/cgi-bin/
-
-ScriptAlias /tac.cgi /usr/lib64/nagios/cgi-bin/tac.cgi
-
-
- AuthName "Nagios GSSAPI Login"
- GssapiCredStore keytab:/etc/krb5.HTTP_nagios.stg.fedoraproject.org.keytab
- AuthType GSSAPI
- # This is off because Apache (and thus mod_auth_gssapi) doesn't know this is proxied over TLS
- GssapiSSLonly Off
- GssapiLocalName on
- Require valid-user
-
-
-
- Options ExecCGI
-
-
-
- Options None
-
-
-RewriteEngine on
-RewriteRule ^/$ /nagios/ [R]
-
-Alias /nagios /usr/share/nagios/html/
-
diff --git a/roles/nagios_server/files/httpd/nagios.conf b/roles/nagios_server/files/httpd/nagios.conf
deleted file mode 100644
index e552348f7f..0000000000
--- a/roles/nagios_server/files/httpd/nagios.conf
+++ /dev/null
@@ -1,28 +0,0 @@
-# noc1
-ScriptAlias /nagios/cgi-bin/ /usr/lib64/nagios/cgi-bin/
-
-ScriptAlias /tac.cgi /usr/lib64/nagios/cgi-bin/tac.cgi
-
-
- AuthName "Nagios GSSAPI Login"
- GssapiCredStore keytab:/etc/krb5.HTTP_nagios.fedoraproject.org.keytab
- AuthType GSSAPI
- # This is off because Apache (and thus mod_auth_gssapi) doesn't know this is proxied over TLS
- GssapiSSLonly Off
- GssapiLocalName on
- Require valid-user
-
-
-
- Options ExecCGI
-
-
-
- Options None
-
-
-RewriteEngine on
-RewriteRule ^/$ /nagios/ [R]
-
-Alias /nagios /usr/share/nagios/html/
-
diff --git a/roles/nagios_server/files/httpd/robots.txt b/roles/nagios_server/files/httpd/robots.txt
deleted file mode 100644
index c6742d8a8c..0000000000
--- a/roles/nagios_server/files/httpd/robots.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-User-Agent: *
-Disallow: /
diff --git a/roles/nagios_server/files/nagios/commands/disk.cfg b/roles/nagios_server/files/nagios/commands/disk.cfg
deleted file mode 100644
index 2c0bb52221..0000000000
--- a/roles/nagios_server/files/nagios/commands/disk.cfg
+++ /dev/null
@@ -1,15 +0,0 @@
-define command {
- command_name check_by_ssh_check_raid
- command_line $USER1$/check_by_ssh -t 30 -H $HOSTADDRESS$ "$USER1$/check_raid.py"
-}
-
-define command {
- command_name check_by_ssh_check_disk
- command_line $USER1$/check_by_ssh -t 30 -H $HOSTADDRESS$ "$USER1$/check_disk -w $ARG1$% -c $ARG2$% -p $ARG3$"
-}
-
-# 'check_postgres_conns' command definition
-define command{
- command_name check_postgres_conns
- command_line $USER1$/check_by_ssh -t 30 -H $HOSTADDRESS$ "$USER1$/check_procs -u postgres -w $ARG1$ -c $ARG2$ -a $ARG3$"
-}
diff --git a/roles/nagios_server/files/nagios/commands/dns.cfg b/roles/nagios_server/files/nagios/commands/dns.cfg
deleted file mode 100644
index 88b52e52b5..0000000000
--- a/roles/nagios_server/files/nagios/commands/dns.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-# 'check_dns' command definition
-define command{
- command_name check_dns
- command_line $USER1$/check_dns -H www.yahoo.com -s $HOSTADDRESS$
- }
-
-# 'check_dns_fpo' command definition
-define command{
- command_name check_dns_fpo
- command_line $USER1$/check_dns -t 30 -H fedoraproject.org -A -s $HOSTADDRESS$
- }
diff --git a/roles/nagios_server/files/nagios/commands/git.cfg b/roles/nagios_server/files/nagios/commands/git.cfg
deleted file mode 100644
index 070fcb2b2e..0000000000
--- a/roles/nagios_server/files/nagios/commands/git.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-# 'check_git' command definition
-# I'd like this to actually interact with GIT, but I can't find any
-# proper documentation on the protocol to craft send/expect/quit
-# strings.
-define command{
- command_name check_git
- command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 9418
-}
diff --git a/roles/nagios_server/files/nagios/commands/httpd.cfg b/roles/nagios_server/files/nagios/commands/httpd.cfg
deleted file mode 100644
index 81ce918485..0000000000
--- a/roles/nagios_server/files/nagios/commands/httpd.cfg
+++ /dev/null
@@ -1,89 +0,0 @@
-##
-## This file has the commands to check and restart general httpd services
-## and websites.
-##
-
-################################################################################
-# COMMAND DEFINITIONS
-#
-# SYNTAX:
-#
-# define command{
-# template
-# name
-# command_name
-# command_line
-# }
-#
-# WHERE:
-#
-# = object name of another command definition that should be
-# used as a template for this definition (optional)
-# = object name of command definition, referenced by other
-# command definitions that use it as a template (optional)
-# = name of the command, as recognized/used by Nagios
-# = command line
-#
-################################################################################
-
-# 'reload httpd'
-define command {
- command_name restart_httpd
- command_line $USER1$/restart_httpd $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" "$SERVICESTATE$"
-}
-
-
-#
-# 'check_website_publiclist' command definition
-define command{
- command_name check_website_publiclist
- command_line $USER1$/check_http -w 60 -c 80 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
-}
-
-# 'check_website' command definition
-define command{
- command_name check_website
- command_line $USER1$/check_http -w 30 -c 40 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
-}
-
-define command{
- command_name check_website_follow
- command_line $USER1$/check_http -w 30 -c 40 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow
-}
-
-define command{
- command_name check_website_ppc
- command_line $USER1$/check_http -w 300 -c 400 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
-}
-
-define command{
- command_name check_website_ssl
- command_line $USER1$/check_http -w 30 -c 40 --ssl --sni -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -s "$ARG3$"
-}
-
-define command{
- command_name check_ssl_cert
- command_line $USER1$/check_http --sni -I $HOSTADDRESS$ -H $ARG1$ -C $ARG2$
-}
-
-define command{
- command_name check_ssl_cert_otherport
- command_line $USER1$/check_http --sni -I $HOSTADDRESS$ -H $ARG1$ -C $ARG2$ -p $ARG3$
-}
-
-define command{
- command_name check_website_publiclist_ssl
- command_line $USER1$/check_http -w 40 -c 60 --ssl -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -s "$ARG3$"
-}
-
-# 'check_http' command definition
-define command{
- command_name check_http
- command_line $USER1$/check_http -H $HOSTADDRESS$
-}
-
-# 'check_https' command definition
-define command{
- command_name check_https
- command_line $USER1$/check_http -H $HOSTADDRESS$ --ssl
-}
diff --git a/roles/nagios_server/files/nagios/commands/koji.cfg b/roles/nagios_server/files/nagios/commands/koji.cfg
deleted file mode 100644
index ed71aa605d..0000000000
--- a/roles/nagios_server/files/nagios/commands/koji.cfg
+++ /dev/null
@@ -1,34 +0,0 @@
-################################################################################
-# COMMAND DEFINITIONS
-#
-# SYNTAX:
-#
-# define command{
-# template
-# name
-# command_name
-# command_line
-# }
-#
-# WHERE:
-#
-# = object name of another command definition that should be
-# used as a template for this definition (optional)
-# = object name of command definition, referenced by other
-# command definitions that use it as a template (optional)
-# = name of the command, as recognized/used by Nagios
-# = command line
-#
-################################################################################
-
-# 'check_koji'
-define command{
- command_name check_koji
- command_line $USER1$/check_koji
-}
-
-# 'check_koji_wellness'
-define command {
- command_name check_koji_wellness.py
- command_line $USER1$/check_koji_wellness.py $ARG1$ $ARG2$
-}
diff --git a/roles/nagios_server/files/nagios/commands/local.cfg b/roles/nagios_server/files/nagios/commands/local.cfg
deleted file mode 100644
index 37e7ba95d0..0000000000
--- a/roles/nagios_server/files/nagios/commands/local.cfg
+++ /dev/null
@@ -1,36 +0,0 @@
-# 'check_local_disk' command definition
-define command{
- command_name check_local_disk
- command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
- }
-
-# 'check_local_load' command definition
-define command{
- command_name check_local_load
- command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
- }
-
-# 'check_local_procs' command definition
-define command{
- command_name check_local_procs
- command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
- }
-
-# 'check_local_users' command definition
-define command{
- command_name check_local_users
- command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
- }
-
-# 'check_local_swap' command definition
-define command{
- command_name check_local_swap
- command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$
- }
-
-# 'check_local_mrtgtraf' command definition
-define command{
- command_name check_local_mrtgtraf
- command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
- }
-
diff --git a/roles/nagios_server/files/nagios/commands/mailman.cfg b/roles/nagios_server/files/nagios/commands/mailman.cfg
deleted file mode 100644
index 8d31c1b601..0000000000
--- a/roles/nagios_server/files/nagios/commands/mailman.cfg
+++ /dev/null
@@ -1,29 +0,0 @@
-################################################################################
-# COMMAND DEFINITIONS
-#
-# SYNTAX:
-#
-# define command{
-# template
-# name
-# command_name
-# command_line
-# }
-#
-# WHERE:
-#
-# = object name of another command definition that should be
-# used as a template for this definition (optional)
-# = object name of command definition, referenced by other
-# command definitions that use it as a template (optional)
-# = name of the command, as recognized/used by Nagios
-# = command line
-#
-################################################################################
-
-# 'check_mailman_api'
-define command{
- command_name check_mailman_api
- command_line $USER1$/check_http -H localhost -p 8001 -u /3.0
-}
-
diff --git a/roles/nagios_server/files/nagios/commands/misc.cfg b/roles/nagios_server/files/nagios/commands/misc.cfg
deleted file mode 100644
index 30c25b023a..0000000000
--- a/roles/nagios_server/files/nagios/commands/misc.cfg
+++ /dev/null
@@ -1,59 +0,0 @@
-################################################################################
-# COMMAND DEFINITIONS
-#
-# SYNTAX:
-#
-# define command{
-# template
-# name
-# command_name
-# command_line
-# }
-#
-# WHERE:
-#
-# = object name of another command definition that should be
-# used as a template for this definition (optional)
-# = object name of command definition, referenced by other
-# command definitions that use it as a template (optional)
-# = name of the command, as recognized/used by Nagios
-# = command line
-#
-################################################################################
-
-define command{
- command_name true
- command_line /bin/true
-}
-
-define command{
- command_name check_dummy
- command_line $USER1$/check_dummy $ARG1$ $ARG2$
-}
-
-# 'check_snmp' command definition
-define command{
- command_name check_snmp
- command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$
- }
-
-
-# 'check_nntp' command definition
-define command{
- command_name check_nntp
- command_line $USER1$/check_nntp -H $HOSTADDRESS$
- }
-
-
-# 'check_telnet' command definition
-define command{
- command_name check_telnet
- command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
- }
-
-# 'check_dhcp' command definition
-define command{
- command_name check_dhcp
- command_line $USER1$/check_dhcp $ARG1$
- }
-
diff --git a/roles/nagios_server/files/nagios/commands/notify.cfg b/roles/nagios_server/files/nagios/commands/notify.cfg
deleted file mode 100644
index 11478d8393..0000000000
--- a/roles/nagios_server/files/nagios/commands/notify.cfg
+++ /dev/null
@@ -1,86 +0,0 @@
-################################################################################
-#
-# SAMPLE NOTIFICATION COMMANDS
-#
-# These are some example notification commands. They may or may not work on
-# your system without modification. As an example, some systems will require
-# you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below.
-#
-################################################################################
-
-
-# 'host-notify-by-email' command definition
-define command{
- command_name host-notify-by-email
- command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nSource: $$(hostname)\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
- }
-
-# 'notify-by-epager' command definition
-define command{
- command_name notify-by-epager
- command_line /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nInfo: $SERVICEOUTPUT$\nSource: $$(hostname -s)\nDate: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$: $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$" $CONTACTPAGER$
- }
-
-
-# 'host-notify-by-epager' command definition
-define command{
- command_name host-notify-by-epager
- command_line /usr/bin/printf "%b" "Host '$HOSTNAME$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nSource: $$(hostname -s)\nTime: $LONGDATETIME$" | /bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTPAGER$
- }
-
-# 'host-notify-by-ircbot' command definition
-define command{
- command_name host-notify-by-ircbot
- command_line /usr/bin/printf "%b" "#fedora-noc $NOTIFICATIONTYPE$ - $HOSTNAME$ is $HOSTSTATE$: $HOSTOUTPUT$ ($$(hostname -s)) $HOSTACKAUTHOR$ $SERVICEACKAUTHOR$" | /usr/local/bin/irc-colorize.py | nc -w 1 value01 5050
- }
-
-# 'host-notify-by-matrixbot' command definition
-define command{
- command_name host-notify-by-matrixbot
- command_line /usr/bin/echo '{"notificationtype": "$NOTIFICATIONTYPE$", "hostname": "$HOSTNAME$", "servicestate": "$HOSTSTATE$", "serviceoutput": "$HOSTOUTPUT$", "hostackauthor": "$HOSTACKAUTHOR$"}' | /usr/local/bin/matrix-notify.sh false
- }
-
-# 'notify-by-email' command definition
-define command{
- command_name notify-by-email
- command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nSource: $$(hostname)\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
- }
-
-# 'notify-by-ircbot' command definition
-define command{
- command_name notify-by-ircbot
- command_line /usr/bin/printf "%b" "#fedora-noc $NOTIFICATIONTYPE$ - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$: $SERVICEOUTPUT$ ($$(hostname -s)) $HOSTACKAUTHOR$ $SERVICEACKAUTHOR$" | /usr/local/bin/irc-colorize.py | nc -w 1 value01 5050
- }
-
-# 'notify-by-matrixbot' command definition
-define command{
- command_name notify-by-matrixbot
- command_line /usr/bin/echo '{"notificationtype": "$NOTIFICATIONTYPE$", "hostname": "$HOSTNAME$", "servicedesc": "$SERVICEDESC$", "servicestate": "$SERVICESTATE$", "serviceoutput": "$SERVICEOUTPUT$", "hostackauthor": "$HOSTACKAUTHOR$", "serviceackauthor": "$SERVICEACKAUTHOR$"}' | /usr/local/bin/matrix-notify.sh true
- }
-
-# 'host-notify-by-fedora-messaging' command definition
-#define command{
-# command_name host-notify-by-fedora-messaging
-# command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTNAME$", "state": "$HOSTSTATE$", "output": "$HOSTOUTPUT$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedora-messaging-logger --cert-prefix nagios --modname nagios --topic host.state.change --json-input
-# }
-
-# 'notify-by-fedora-messaging' command definition
-#define command{
-# command_name notify-by-fedora-messaging
-# command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTNAME$", "state": "$SERVICESTATE$", "service": "$SERVICEDESC$", "output": "$SERVICEOUTPUT$", "host_ack_author" "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedora-messaging-logger --cert-prefix nagios --modname nagios --topic service.state.change --json-input
-# }
-
-
-
-# 'notify-by-xmpp' command definition
-#define command{
-# command_name notify-by-xmpp
-# command_line /usr/local/bin/xmppsend -a /etc/nagios/private/xmppnagios.ini "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nInfo: $SERVICEOUTPUT$\nDate: $LONGDATETIME$" $CONTACTEMAIL$
-# }
-
-
-# 'host-notify-by-xmpp' command definition
-#define command{
-# command_name host-notify-by-xmpp
-# command_line /usr/local/bin/xmppsend -a /etc/nagios/private/xmppnagios.ini "Host '$HOSTNAME$' is $HOSTSTATE$\nInfo: $HOSTOUTPUT$\nDate: $LONGDATETIME$" $CONTACTEMAIL$
-# }
diff --git a/roles/nagios_server/files/nagios/commands/nrpe.cfg b/roles/nagios_server/files/nagios/commands/nrpe.cfg
deleted file mode 100644
index 01bf14099a..0000000000
--- a/roles/nagios_server/files/nagios/commands/nrpe.cfg
+++ /dev/null
@@ -1,17 +0,0 @@
-# 'test nrpe'
-define command{
- command_name test_nrpe
- command_line $USER1$/check_nrpe -t 30 -H $HOSTADDRESS$
-
-}
-# 'check by nrpe'
-define command{
- command_name check_by_nrpe
- command_line $USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$
-}
-
-# 'check-host-alive-nrpe' is better for hosts that are on vpn.
-define command{
- command_name check-host-alive-nrpe
- command_line $USER1$/check_nrpe -t 30 -H $HOSTADDRESS$
- }
diff --git a/roles/nagios_server/files/nagios/commands/perfdata.cfg b/roles/nagios_server/files/nagios/commands/perfdata.cfg
deleted file mode 100644
index a3dd4f7878..0000000000
--- a/roles/nagios_server/files/nagios/commands/perfdata.cfg
+++ /dev/null
@@ -1,26 +0,0 @@
-################################################################################
-#
-# SAMPLE PERFORMANCE DATA COMMANDS
-#
-# These are sample performance data commands that can be used to send performance
-# data output to two text files (one for hosts, another for services). If you
-# plan on simply writing performance data out to a file, consider using the
-# host_perfdata_file and service_perfdata_file options in the main config file.
-#
-################################################################################
-
-
-# 'process-host-perfdata' command definition
-define command{
- command_name process-host-perfdata
- command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/log/nagios/host-perfdata.out
- }
-
-
-# 'process-service-perfdata' command definition
-define command{
- command_name process-service-perfdata
- command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/log/nagios/service-perfdata.out
- }
-
-
diff --git a/roles/nagios_server/files/nagios/commands/ping.cfg b/roles/nagios_server/files/nagios/commands/ping.cfg
deleted file mode 100644
index 86a7010eb7..0000000000
--- a/roles/nagios_server/files/nagios/commands/ping.cfg
+++ /dev/null
@@ -1,31 +0,0 @@
-# This command checks to see if a host is "alive" by pinging it
-# The check must result in a 100% packet loss or 5 second (3000ms) round trip
-# average time to produce a critical error.
-# Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
-
-# 'check-host-alive' command definition
-define command{
- command_name check-host-alive
- command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
- }
-
-define command{
- command_name check-host-alive4
- command_line $USER1$/check_ping -4 -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 2
- }
-
-define command{
- command_name check-host-alive6
- command_line $USER1$/check_ping -6 -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 2
- }
-
-# 'check_ping' command definition
-define command{
- command_name check_ping4
- command_line $USER1$/check_ping -4 -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
- }
-
-define command{
- command_name check_ping6
- command_line $USER1$/check_ping -6 -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
- }
diff --git a/roles/nagios_server/files/nagios/commands/rsyslog.cfg b/roles/nagios_server/files/nagios/commands/rsyslog.cfg
deleted file mode 100644
index df6e0b7784..0000000000
--- a/roles/nagios_server/files/nagios/commands/rsyslog.cfg
+++ /dev/null
@@ -1,28 +0,0 @@
-################################################################################
-# COMMAND DEFINITIONS
-#
-# SYNTAX:
-#
-# define command{
-# template
-# name
-# command_name
-# command_line
-# }
-#
-# WHERE:
-#
-# = object name of another command definition that should be
-# used as a template for this definition (optional)
-# = object name of command definition, referenced by other
-# command definitions that use it as a template (optional)
-# = name of the command, as recognized/used by Nagios
-# = command line
-#
-################################################################################
-
-
-define command {
- command_name restart_rsyslog
- command_line $USER1$/restart_rsyslog $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" "$SERVICESTATE$"
-}
diff --git a/roles/nagios_server/files/nagios/commands/smtp.cfg b/roles/nagios_server/files/nagios/commands/smtp.cfg
deleted file mode 100644
index c3d53adcb4..0000000000
--- a/roles/nagios_server/files/nagios/commands/smtp.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-# 'check_smtp' command definition
-define command{
- command_name check_smtp
- command_line $USER1$/check_smtp -H $HOSTADDRESS$
- }
-
-
-# 'check_email_delivery' command definition
-define command{
- command_name check_email_delivery
- command_line $USER1$/check_email_delivery_epn -H $ARG1$ --mailto $ARG2$ --mailfrom $ARG3$ --username $ARG4$ --password $ARG5$ -w $ARG6$ -c $ARG7$
-}
diff --git a/roles/nagios_server/files/nagios/commands/ssh.cfg b/roles/nagios_server/files/nagios/commands/ssh.cfg
deleted file mode 100644
index ecd5f30986..0000000000
--- a/roles/nagios_server/files/nagios/commands/ssh.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-# 'check_ssh' command definition
-define command{
- command_name check_ssh
- command_line $USER1$/check_ssh -H $HOSTADDRESS$
-}
-
-define command{
- command_name check-host-alive-ssh
- command_line $USER1$/check_ssh -H $HOSTADDRESS$
-}
diff --git a/roles/nagios_server/files/nagios/commands/tcp.cfg b/roles/nagios_server/files/nagios/commands/tcp.cfg
deleted file mode 100644
index d2268ab4de..0000000000
--- a/roles/nagios_server/files/nagios/commands/tcp.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-# 'check_tcp' command definition
-define command{
- command_name check_tcp
- command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
-}
diff --git a/roles/nagios_server/files/nagios/commands/testcloud.cfg b/roles/nagios_server/files/nagios/commands/testcloud.cfg
deleted file mode 100644
index 7e2c235343..0000000000
--- a/roles/nagios_server/files/nagios/commands/testcloud.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# 'check_testcloud'
-define command{
- command_name check_testcloud
- command_line $USER1$/check_testcloud
-}
diff --git a/roles/nagios_server/files/nagios/commands/udp.cfg b/roles/nagios_server/files/nagios/commands/udp.cfg
deleted file mode 100644
index 6c2cfbe6d6..0000000000
--- a/roles/nagios_server/files/nagios/commands/udp.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-# 'check_udp' command definition
-define command{
- command_name check_udp
- command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
- }
diff --git a/roles/nagios_server/files/nagios/configs/escalations.cfg b/roles/nagios_server/files/nagios/configs/escalations.cfg
deleted file mode 100644
index 9582de5235..0000000000
--- a/roles/nagios_server/files/nagios/configs/escalations.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-define hostescalation{
- host_name *
- hostgroup_name *
- contact_groups fedora-sysadmin-email,fedora-sysadmin-emergency,fedora-sysadmin-ircbot,fedora-sysadmin-matrixbot
- first_notification 2
- last_notification 0
- notification_interval 60
- escalation_period 24x7
- escalation_options d,u,r
-}
-
-
-define serviceescalation{
- host_name *
- service_description *
- contact_groups fedora-sysadmin-email,fedora-sysadmin-emergency,fedora-sysadmin-ircbot,fedora-sysadmin-matrixbot
- first_notification 2
- last_notification 0
- notification_interval 60
- escalation_period 24x7
- escalation_options w,u,c,r
-}
diff --git a/roles/nagios_server/files/nagios/configs/minimal.cfg b/roles/nagios_server/files/nagios/configs/minimal.cfg
deleted file mode 100644
index ebb61bcb88..0000000000
--- a/roles/nagios_server/files/nagios/configs/minimal.cfg
+++ /dev/null
@@ -1,362 +0,0 @@
-###############################################################################
-# MINIMAL.CFG
-#
-# MINIMALISTIC OBJECT CONFIG FILE (Template-Based Object File Format)
-#
-# Last Modified: 08-10-2005
-#
-#
-# NOTE: This config file is intended to be used to test a Nagios installation
-# that has been compiled with support for the template-based object
-# configuration files.
-#
-# This config file is intended to servce as an *extremely* simple
-# example of how you can create your object configuration file(s).
-# If you're interested in more complex object configuration files for
-# Nagios, look in the sample-config/template-object/ subdirectory of
-# the distribution.
-#
-###############################################################################
-
-
-
-###############################################################################
-###############################################################################
-#
-# TIME PERIODS
-#
-###############################################################################
-###############################################################################
-
-# This defines a timeperiod where all times are valid for checks,
-# notifications, etc. The classic "24x7" support nightmare. :-)
-
-define timeperiod{
- timeperiod_name 24x7
- alias 24 Hours A Day, 7 Days A Week
- sunday 00:00-24:00
- monday 00:00-24:00
- tuesday 00:00-24:00
- wednesday 00:00-24:00
- thursday 00:00-24:00
- friday 00:00-24:00
- saturday 00:00-24:00
- }
-
-
-
-
-###############################################################################
-###############################################################################
-#
-# COMMANDS
-#
-###############################################################################
-###############################################################################
-
-# This is a sample service notification command that can be used to send email
-# notifications (about service alerts) to contacts.
-# 'check_ssh' command definition
-define command{
- command_name notify-by-email
- command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
- }
-
-
-# This is a sample host notification command that can be used to send email
-# notifications (about host alerts) to contacts.
-
-define command{
- command_name host-notify-by-email
- command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
- }
-
-
-# Command to check to see if a host is "alive" (up) by pinging it
-
-define command{
- command_name check-host-alive4
- command_line $USER1$/check_ping -4 -H $HOSTADDRESS$ -w 300,99% -c 500,100% -p 2
- }
-
-
-# Generic command to check a device by pinging it
-
-define command{
- command_name check_ping
- command_line $USER1$/check_ping -4 -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
- }
-
-
-# Command used to check disk space usage on local partitions
-
-define command{
- command_name check_local_disk
- command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
- }
-
-
-# Command used to check the number of currently logged in users on the
-# local machine
-
-define command{
- command_name check_local_users
- command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
- }
-
-
-# Command to check the number of running processing on the local machine
-
-define command{
- command_name check_local_procs
- command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$
- }
-
-
-# Command to check the load on the local machine
-
-define command{
- command_name check_local_load
- command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
- }
-
-
-
-###############################################################################
-###############################################################################
-#
-# CONTACTS
-#
-###############################################################################
-###############################################################################
-
-# In this simple config file, a single contact will receive all alerts.
-# This assumes that you have an account (or email alias) called
-# "nagios-admin" on the local host.
-
-define contact{
- contact_name nagios-admin
- alias Nagios Admin
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email admin@fedoraproject.org
- }
-
-
-
-###############################################################################
-###############################################################################
-#
-# CONTACT GROUPS
-#
-###############################################################################
-###############################################################################
-
-# We only have one contact in this simple configuration file, so there is
-# no need to create more than one contact group.
-
-define contactgroup{
- contactgroup_name admins
- alias Nagios Administrators
- members nagios-admin
- }
-
-
-
-###############################################################################
-###############################################################################
-#
-# HOSTS
-#
-###############################################################################
-###############################################################################
-
-# Generic host definition template - This is NOT a real host, just a template!
-
-define host{
- name generic-host ; The name of this host template
- notifications_enabled 1 ; Host notifications are enabled
- event_handler_enabled 1 ; Host event handler is enabled
- flap_detection_enabled 1 ; Flap detection is enabled
- failure_prediction_enabled 1 ; Failure prediction is enabled
- process_perf_data 1 ; Process performance data
- retain_status_information 1 ; Retain status information across program restarts
- retain_nonstatus_information 1 ; Retain non-status information across program restarts
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
- }
-
-
-# Since this is a simple configuration file, we only monitor one host - the
-# local host (this machine).
-
-define host{
- use generic-host ; Name of host template to use
- host_name localhost
- alias localhost
- address 127.0.0.1
- check_command check-host-alive4
- max_check_attempts 10
- notification_interval 120
- notification_period 24x7
- notification_options d,r
- contact_groups admins
- }
-
-
-
-###############################################################################
-###############################################################################
-#
-# HOST GROUPS
-#
-###############################################################################
-###############################################################################
-
-# We only have one host in our simple config file, so there is no need to
-# create more than one hostgroup.
-
-define hostgroup{
- hostgroup_name test
- alias Test Servers
- members localhost
- }
-
-
-
-###############################################################################
-###############################################################################
-#
-# SERVICES
-#
-###############################################################################
-###############################################################################
-
-# Generic service definition template - This is NOT a real service, just a template!
-
-define service{
- name generic-service ; The 'name' of this service template
- active_checks_enabled 1 ; Active service checks are enabled
- passive_checks_enabled 1 ; Passive service checks are enabled/accepted
- parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
- obsess_over_service 1 ; We should obsess over this service (if necessary)
- check_freshness 0 ; Default is to NOT check service 'freshness'
- notifications_enabled 1 ; Service notifications are enabled
- event_handler_enabled 1 ; Service event handler is enabled
- flap_detection_enabled 1 ; Flap detection is enabled
- failure_prediction_enabled 1 ; Failure prediction is enabled
- process_perf_data 1 ; Process performance data
- retain_status_information 1 ; Retain status information across program restarts
- retain_nonstatus_information 1 ; Retain non-status information across program restarts
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
- }
-
-
-# Define a service to "ping" the local machine
-
-define service{
- use generic-service ; Name of service template to use
- host_name localhost
- service_description PING
- is_volatile 0
- check_period 24x7
- max_check_attempts 4
- check_interval 5
- retry_interval 1
- contact_groups admins
- notification_options w,u,c,r
- notification_interval 960
- notification_period 24x7
- check_command check_ping!100.0,20%!500.0,60%
- }
-
-
-# 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 Root Partition
- is_volatile 0
- check_period 24x7
- max_check_attempts 4
- check_interval 5
- retry_interval 1
- contact_groups admins
- notification_options w,u,c,r
- notification_interval 960
- notification_period 24x7
- check_command check_local_disk!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
- is_volatile 0
- check_period 24x7
- max_check_attempts 4
- check_interval 5
- retry_interval 1
- contact_groups admins
- notification_options w,u,c,r
- notification_interval 960
- notification_period 24x7
- check_command check_local_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 users.
-
-define service{
- use generic-service ; Name of service template to use
- host_name localhost
- service_description Total Processes
- is_volatile 0
- check_period 24x7
- max_check_attempts 4
- check_interval 5
- retry_interval 1
- contact_groups admins
- notification_options w,u,c,r
- notification_interval 960
- notification_period 24x7
- check_command check_local_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
- is_volatile 0
- check_period 24x7
- max_check_attempts 4
- check_interval 5
- retry_interval 1
- contact_groups admins
- notification_options w,u,c,r
- notification_interval 960
- notification_period 24x7
- check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
- }
-
-
-
-# EOF
diff --git a/roles/nagios_server/files/nagios/configs/nagios.cfg b/roles/nagios_server/files/nagios/configs/nagios.cfg
deleted file mode 100644
index f2ec548eeb..0000000000
--- a/roles/nagios_server/files/nagios/configs/nagios.cfg
+++ /dev/null
@@ -1,1360 +0,0 @@
-##############################################################################
-#
-# NAGIOS.CFG - Sample Main Config File for Nagios 4.2.4
-#
-# Read the documentation for more information on this configuration
-# file. I've provided some comments here, but things may not be so
-# clear without further explanation.
-#
-#
-##############################################################################
-
-
-# LOG FILE
-# This is the main log file where service and host events are logged
-# for historical purposes. This should be the first option specified
-# in the config file!!!
-
-log_file=/var/log/nagios/nagios.log
-
-
-
-# OBJECT CONFIGURATION FILE(S)
-# These are the object configuration files in which you define hosts,
-# host groups, contacts, contact groups, services, etc.
-# You can split your object definitions across several config files
-# if you wish (as shown below), or keep them all in a single config file.
-
-# You can specify individual object config files as shown below:
-#cfg_file=/etc/nagios/objects/commands.cfg
-#cfg_file=/etc/nagios/objects/contacts.cfg
-#cfg_file=/etc/nagios/timeperiods.cfg
-#cfg_file=/etc/nagios/objects/templates.cfg
-#cfg_file=/etc/nagios/escalations.cfg
-
-# Definitions for monitoring the local (Linux) host
-#cfg_file=/etc/nagios/objects/localhost.cfg
-
-# Definitions for monitoring a Windows machine
-#cfg_file=/etc/nagios/objects/windows.cfg
-
-# Definitions for monitoring a router/switch
-#cfg_file=/etc/nagios/objects/switch.cfg
-
-# Definitions for monitoring a network printer
-#cfg_file=/etc/nagios/objects/printer.cfg
-
-
-# You can also tell Nagios to process all config files (with a .cfg
-# extension) in a particular directory by using the cfg_dir
-# directive as shown below:
-
-#cfg_dir=/etc/nagios/servers
-#cfg_dir=/etc/nagios/printers
-#cfg_dir=/etc/nagios/switches
-#cfg_dir=/etc/nagios/routers
-
-cfg_dir=/etc/nagios/hosts
-cfg_dir=/etc/nagios/hostgroups
-cfg_dir=/etc/nagios/commands
-cfg_dir=/etc/nagios/contacts
-cfg_dir=/etc/nagios/contactgroups
-cfg_dir=/etc/nagios/services
-cfg_dir=/etc/nagios/servicegroups
-#cfg_dir=/etc/nagios/servicedeps
-
-cfg_dir=/etc/nagios/conf.d
-
-
-
-
-# OBJECT CACHE FILE
-# This option determines where object definitions are cached when
-# Nagios starts/restarts. The CGIs read object definitions from
-# this cache file (rather than looking at the object config files
-# directly) in order to prevent inconsistencies that can occur
-# when the config files are modified after Nagios starts.
-
-object_cache_file=/var/spool/nagios/objects.cache
-
-
-
-# PRE-CACHED OBJECT FILE
-# This options determines the location of the precached object file.
-# If you run Nagios with the -p command line option, it will preprocess
-# your object configuration file(s) and write the cached config to this
-# file. You can then start Nagios with the -u option to have it read
-# object definitions from this precached file, rather than the standard
-# object configuration files (see the cfg_file and cfg_dir options above).
-# Using a precached object file can speed up the time needed to (re)start
-# the Nagios process if you've got a large and/or complex configuration.
-# Read the documentation section on optimizing Nagios to find our more
-# about how this feature works.
-
-precached_object_file=/var/spool/nagios/objects.precache
-
-
-
-# RESOURCE FILE
-# This is an optional resource file that contains $USERx$ macro
-# definitions. Multiple resource files can be specified by using
-# multiple resource_file definitions. The CGIs will not attempt to
-# read the contents of resource files, so information that is
-# considered to be sensitive (usernames, passwords, etc) can be
-# defined as macros in this file and restrictive permissions (600)
-# can be placed on this file.
-
-resource_file=/etc/nagios/private/resource.cfg
-
-
-
-# STATUS FILE
-# This is where the current status of all monitored services and
-# hosts is stored. Its contents are read and processed by the CGIs.
-# The contents of the status file are deleted every time Nagios
-# restarts.
-
-status_file=/var/spool/nagios/status.dat
-
-
-
-# STATUS FILE UPDATE INTERVAL
-# This option determines the frequency (in seconds) that
-# Nagios will periodically dump program, host, and
-# service status data.
-
-status_update_interval=10
-
-
-
-# NAGIOS USER
-# This determines the effective user that Nagios should run as.
-# You can either supply a username or a UID.
-
-nagios_user=nagios
-
-
-
-# NAGIOS GROUP
-# This determines the effective group that Nagios should run as.
-# You can either supply a group name or a GID.
-
-nagios_group=nagios
-
-
-
-# EXTERNAL COMMAND OPTION
-# This option allows you to specify whether or not Nagios should check
-# for external commands (in the command file defined below). By default
-# Nagios will *not* check for external commands, just to be on the
-# cautious side. If you want to be able to use the CGI command interface
-# you will have to enable this.
-# Values: 0 = disable commands, 1 = enable commands
-
-check_external_commands=1
-
-
-
-# EXTERNAL COMMAND FILE
-# This is the file that Nagios checks for external command requests.
-# It is also where the command CGI will write commands that are submitted
-# by users, so it must be writeable by the user that the web server
-# is running as (usually 'nobody'). Permissions should be set at the
-# directory level instead of on the file, as the file is deleted every
-# time its contents are processed.
-
-command_file=/var/spool/nagios/cmd/nagios.cmd
-
-
-
-# QUERY HANDLER INTERFACE
-# This is the socket that is created for the Query Handler interface
-
-query_socket=/var/spool/nagios/cmd/nagios.qh
-
-
-
-# LOCK FILE
-# This is the lockfile that Nagios will use to store its PID number
-# in when it is running in daemon mode.
-
-lock_file=/var/run/nagios/nagios.pid
-
-
-
-# TEMP FILE
-# This is a temporary file that is used as scratch space when Nagios
-# updates the status log, cleans the comment file, etc. This file
-# is created, used, and deleted throughout the time that Nagios is
-# running.
-
-temp_file=/var/spool/nagios/nagios.tmp
-
-
-
-# TEMP PATH
-# This is path where Nagios can create temp files for service and
-# host check results, etc.
-
-temp_path=/tmp
-
-
-
-# EVENT BROKER OPTIONS
-# Controls what (if any) data gets sent to the event broker.
-# Values: 0 = Broker nothing
-# -1 = Broker everything
-# = See documentation
-
-event_broker_options=-1
-
-
-
-# EVENT BROKER MODULE(S)
-# This directive is used to specify an event broker module that should
-# by loaded by Nagios at startup. Use multiple directives if you want
-# to load more than one module. Arguments that should be passed to
-# the module at startup are seperated from the module path by a space.
-#
-#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING
-#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-#
-# Do NOT overwrite modules while they are being used by Nagios or Nagios
-# will crash in a fiery display of SEGFAULT glory. This is a bug/limitation
-# either in dlopen(), the kernel, and/or the filesystem. And maybe Nagios...
-#
-# The correct/safe way of updating a module is by using one of these methods:
-# 1. Shutdown Nagios, replace the module file, restart Nagios
-# 2. Delete the original module file, move the new module file into place, restart Nagios
-#
-# Example:
-#
-# broker_module= [moduleargs]
-
-#broker_module=/somewhere/module1.o
-#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0
-
-
-
-# LOG ROTATION METHOD
-# This is the log rotation method that Nagios should use to rotate
-# the main log file. Values are as follows..
-# n = None - don't rotate the log
-# h = Hourly rotation (top of the hour)
-# d = Daily rotation (midnight every day)
-# w = Weekly rotation (midnight on Saturday evening)
-# m = Monthly rotation (midnight last day of month)
-
-log_rotation_method=d
-
-
-
-# LOG ARCHIVE PATH
-# This is the directory where archived (rotated) log files should be
-# placed (assuming you've chosen to do log rotation).
-
-log_archive_path=/var/log/nagios/archives
-
-
-
-# LOGGING OPTIONS
-# If you want messages logged to the syslog facility, as well as the
-# Nagios log file set this option to 1. If not, set it to 0.
-
-use_syslog=1
-
-
-
-# NOTIFICATION LOGGING OPTION
-# If you don't want notifications to be logged, set this value to 0.
-# If notifications should be logged, set the value to 1.
-
-log_notifications=1
-
-
-
-# SERVICE RETRY LOGGING OPTION
-# If you don't want service check retries to be logged, set this value
-# to 0. If retries should be logged, set the value to 1.
-
-log_service_retries=1
-
-
-
-# HOST RETRY LOGGING OPTION
-# If you don't want host check retries to be logged, set this value to
-# 0. If retries should be logged, set the value to 1.
-
-log_host_retries=1
-
-
-
-# EVENT HANDLER LOGGING OPTION
-# If you don't want host and service event handlers to be logged, set
-# this value to 0. If event handlers should be logged, set the value
-# to 1.
-
-log_event_handlers=1
-
-
-
-# INITIAL STATES LOGGING OPTION
-# If you want Nagios to log all initial host and service states to
-# the main log file (the first time the service or host is checked)
-# you can enable this option by setting this value to 1. If you
-# are not using an external application that does long term state
-# statistics reporting, you do not need to enable this option. In
-# this case, set the value to 0.
-
-log_initial_states=0
-
-
-
-# CURRENT STATES LOGGING OPTION
-# If you don't want Nagios to log all current host and service states
-# after log has been rotated to the main log file, you can disable this
-# option by setting this value to 0. Default value is 1.
-
-log_current_states=1
-
-
-
-# EXTERNAL COMMANDS LOGGING OPTION
-# If you don't want Nagios to log external commands, set this value
-# to 0. If external commands should be logged, set this value to 1.
-# Note: This option does not include logging of passive service
-# checks - see the option below for controlling whether or not
-# passive checks are logged.
-
-log_external_commands=1
-
-
-
-# PASSIVE CHECKS LOGGING OPTION
-# If you don't want Nagios to log passive host and service checks, set
-# this value to 0. If passive checks should be logged, set
-# this value to 1.
-
-log_passive_checks=1
-
-
-
-# GLOBAL HOST AND SERVICE EVENT HANDLERS
-# These options allow you to specify a host and service event handler
-# command that is to be run for every host or service state change.
-# The global event handler is executed immediately prior to the event
-# handler that you have optionally specified in each host or
-# service definition. The command argument is the short name of a
-# command definition that you define in your host configuration file.
-# Read the HTML docs for more information.
-
-#global_host_event_handler=somecommand
-#global_service_event_handler=somecommand
-
-
-
-# SERVICE INTER-CHECK DELAY METHOD
-# This is the method that Nagios should use when initially
-# "spreading out" service checks when it starts monitoring. The
-# default is to use smart delay calculation, which will try to
-# space all service checks out evenly to minimize CPU load.
-# Using the dumb setting will cause all checks to be scheduled
-# at the same time (with no delay between them)! This is not a
-# good thing for production, but is useful when testing the
-# parallelization functionality.
-# n = None - don't use any delay between checks
-# d = Use a "dumb" delay of 1 second between checks
-# s = Use "smart" inter-check delay calculation
-# x.xx = Use an inter-check delay of x.xx seconds
-
-service_inter_check_delay_method=s
-
-
-
-# MAXIMUM SERVICE CHECK SPREAD
-# This variable determines the timeframe (in minutes) from the
-# program start time that an initial check of all services should
-# be completed. Default is 30 minutes.
-
-max_service_check_spread=30
-
-
-
-# SERVICE CHECK INTERLEAVE FACTOR
-# This variable determines how service checks are interleaved.
-# Interleaving the service checks allows for a more even
-# distribution of service checks and reduced load on remote
-# hosts. Setting this value to 1 is equivalent to how versions
-# of Nagios previous to 0.0.5 did service checks. Set this
-# value to s (smart) for automatic calculation of the interleave
-# factor unless you have a specific reason to change it.
-# s = Use "smart" interleave factor calculation
-# x = Use an interleave factor of x, where x is a
-# number greater than or equal to 1.
-
-service_interleave_factor=s
-
-
-
-# HOST INTER-CHECK DELAY METHOD
-# This is the method that Nagios should use when initially
-# "spreading out" host checks when it starts monitoring. The
-# default is to use smart delay calculation, which will try to
-# space all host checks out evenly to minimize CPU load.
-# Using the dumb setting will cause all checks to be scheduled
-# at the same time (with no delay between them)!
-# n = None - don't use any delay between checks
-# d = Use a "dumb" delay of 1 second between checks
-# s = Use "smart" inter-check delay calculation
-# x.xx = Use an inter-check delay of x.xx seconds
-
-host_inter_check_delay_method=s
-
-
-
-# MAXIMUM HOST CHECK SPREAD
-# This variable determines the timeframe (in minutes) from the
-# program start time that an initial check of all hosts should
-# be completed. Default is 30 minutes.
-
-max_host_check_spread=30
-
-
-
-# MAXIMUM CONCURRENT SERVICE CHECKS
-# This option allows you to specify the maximum number of
-# service checks that can be run in parallel at any given time.
-# Specifying a value of 1 for this variable essentially prevents
-# any service checks from being parallelized. A value of 0
-# will not restrict the number of concurrent checks that are
-# being executed.
-
-max_concurrent_checks=0
-
-
-
-# HOST AND SERVICE CHECK REAPER FREQUENCY
-# This is the frequency (in seconds!) that Nagios will process
-# the results of host and service checks.
-
-check_result_reaper_frequency=10
-
-
-
-
-# MAX CHECK RESULT REAPER TIME
-# This is the max amount of time (in seconds) that a single
-# check result reaper event will be allowed to run before
-# returning control back to Nagios so it can perform other
-# duties.
-
-max_check_result_reaper_time=30
-
-
-
-
-# CHECK RESULT PATH
-# This is directory where Nagios stores the results of host and
-# service checks that have not yet been processed.
-#
-# Note: Make sure that only one instance of Nagios has access
-# to this directory!
-
-check_result_path=/var/spool/nagios/checkresults
-
-
-
-
-# MAX CHECK RESULT FILE AGE
-# This option determines the maximum age (in seconds) which check
-# result files are considered to be valid. Files older than this
-# threshold will be mercilessly deleted without further processing.
-
-max_check_result_file_age=3600
-
-
-
-
-# CACHED HOST CHECK HORIZON
-# This option determines the maximum amount of time (in seconds)
-# that the state of a previous host check is considered current.
-# Cached host states (from host checks that were performed more
-# recently that the timeframe specified by this value) can immensely
-# improve performance in regards to the host check logic.
-# Too high of a value for this option may result in inaccurate host
-# states being used by Nagios, while a lower value may result in a
-# performance hit for host checks. Use a value of 0 to disable host
-# check caching.
-
-cached_host_check_horizon=15
-
-
-
-# CACHED SERVICE CHECK HORIZON
-# This option determines the maximum amount of time (in seconds)
-# that the state of a previous service check is considered current.
-# Cached service states (from service checks that were performed more
-# recently that the timeframe specified by this value) can immensely
-# improve performance in regards to predictive dependency checks.
-# Use a value of 0 to disable service check caching.
-
-cached_service_check_horizon=15
-
-
-
-# ENABLE PREDICTIVE HOST DEPENDENCY CHECKS
-# This option determines whether or not Nagios will attempt to execute
-# checks of hosts when it predicts that future dependency logic test
-# may be needed. These predictive checks can help ensure that your
-# host dependency logic works well.
-# Values:
-# 0 = Disable predictive checks
-# 1 = Enable predictive checks (default)
-
-enable_predictive_host_dependency_checks=1
-
-
-
-# ENABLE PREDICTIVE SERVICE DEPENDENCY CHECKS
-# This option determines whether or not Nagios will attempt to execute
-# checks of service when it predicts that future dependency logic test
-# may be needed. These predictive checks can help ensure that your
-# service dependency logic works well.
-# Values:
-# 0 = Disable predictive checks
-# 1 = Enable predictive checks (default)
-
-enable_predictive_service_dependency_checks=1
-
-
-
-# SOFT STATE DEPENDENCIES
-# This option determines whether or not Nagios will use soft state
-# information when checking host and service dependencies. Normally
-# Nagios will only use the latest hard host or service state when
-# checking dependencies. If you want it to use the latest state (regardless
-# of whether its a soft or hard state type), enable this option.
-# Values:
-# 0 = Don't use soft state dependencies (default)
-# 1 = Use soft state dependencies
-
-soft_state_dependencies=0
-
-
-
-# TIME CHANGE ADJUSTMENT THRESHOLDS
-# These options determine when Nagios will react to detected changes
-# in system time (either forward or backwards).
-
-#time_change_threshold=900
-
-
-
-# AUTO-RESCHEDULING OPTION
-# This option determines whether or not Nagios will attempt to
-# automatically reschedule active host and service checks to
-# "smooth" them out over time. This can help balance the load on
-# the monitoring server.
-# WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
-# PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY
-
-auto_reschedule_checks=0
-
-
-
-# AUTO-RESCHEDULING INTERVAL
-# This option determines how often (in seconds) Nagios will
-# attempt to automatically reschedule checks. This option only
-# has an effect if the auto_reschedule_checks option is enabled.
-# Default is 30 seconds.
-# WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
-# PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY
-
-auto_rescheduling_interval=30
-
-
-
-# AUTO-RESCHEDULING WINDOW
-# This option determines the "window" of time (in seconds) that
-# Nagios will look at when automatically rescheduling checks.
-# Only host and service checks that occur in the next X seconds
-# (determined by this variable) will be rescheduled. This option
-# only has an effect if the auto_reschedule_checks option is
-# enabled. Default is 180 seconds (3 minutes).
-# WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
-# PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY
-
-auto_rescheduling_window=180
-
-
-
-# TIMEOUT VALUES
-# These options control how much time Nagios will allow various
-# types of commands to execute before killing them off. Options
-# are available for controlling maximum time allotted for
-# service checks, host checks, event handlers, notifications, the
-# ocsp command, and performance data commands. All values are in
-# seconds.
-
-service_check_timeout=60
-host_check_timeout=30
-event_handler_timeout=30
-notification_timeout=30
-ocsp_timeout=5
-perfdata_timeout=5
-
-
-
-# RETAIN STATE INFORMATION
-# This setting determines whether or not Nagios will save state
-# information for services and hosts before it shuts down. Upon
-# startup Nagios will reload all saved service and host state
-# information before starting to monitor. This is useful for
-# maintaining long-term data on state statistics, etc, but will
-# slow Nagios down a bit when it (re)starts. Since its only
-# a one-time penalty, I think its well worth the additional
-# startup delay.
-
-retain_state_information=1
-
-
-
-# STATE RETENTION FILE
-# This is the file that Nagios should use to store host and
-# service state information before it shuts down. The state
-# information in this file is also read immediately prior to
-# starting to monitor the network when Nagios is restarted.
-# This file is used only if the retain_state_information
-# variable is set to 1.
-
-state_retention_file=/var/spool/nagios/retention.dat
-
-
-
-# RETENTION DATA UPDATE INTERVAL
-# This setting determines how often (in minutes) that Nagios
-# will automatically save retention data during normal operation.
-# If you set this value to 0, Nagios will not save retention
-# data at regular interval, but it will still save retention
-# data before shutting down or restarting. If you have disabled
-# state retention, this option has no effect.
-
-retention_update_interval=60
-
-
-
-# USE RETAINED PROGRAM STATE
-# This setting determines whether or not Nagios will set
-# program status variables based on the values saved in the
-# retention file. If you want to use retained program status
-# information, set this value to 1. If not, set this value
-# to 0.
-
-use_retained_program_state=1
-
-
-
-# USE RETAINED SCHEDULING INFO
-# This setting determines whether or not Nagios will retain
-# the scheduling info (next check time) for hosts and services
-# based on the values saved in the retention file. If you
-# If you want to use retained scheduling info, set this
-# value to 1. If not, set this value to 0.
-
-use_retained_scheduling_info=1
-
-
-
-# RETAINED ATTRIBUTE MASKS (ADVANCED FEATURE)
-# The following variables are used to specify specific host and
-# service attributes that should *not* be retained by Nagios during
-# program restarts.
-#
-# The values of the masks are bitwise ANDs of values specified
-# by the "MODATTR_" definitions found in include/common.h.
-# For example, if you do not want the current enabled/disabled state
-# of flap detection and event handlers for hosts to be retained, you
-# would use a value of 24 for the host attribute mask...
-# MODATTR_EVENT_HANDLER_ENABLED (8) + MODATTR_FLAP_DETECTION_ENABLED (16) = 24
-
-# This mask determines what host attributes are not retained
-retained_host_attribute_mask=0
-
-# This mask determines what service attributes are not retained
-retained_service_attribute_mask=0
-
-# These two masks determine what process attributes are not retained.
-# There are two masks, because some process attributes have host and service
-# options. For example, you can disable active host checks, but leave active
-# service checks enabled.
-retained_process_host_attribute_mask=0
-retained_process_service_attribute_mask=0
-
-# These two masks determine what contact attributes are not retained.
-# There are two masks, because some contact attributes have host and
-# service options. For example, you can disable host notifications for
-# a contact, but leave service notifications enabled for them.
-retained_contact_host_attribute_mask=0
-retained_contact_service_attribute_mask=0
-
-
-
-# INTERVAL LENGTH
-# This is the seconds per unit interval as used in the
-# host/contact/service configuration files. Setting this to 60 means
-# that each interval is one minute long (60 seconds). Other settings
-# have not been tested much, so your mileage is likely to vary...
-
-interval_length=60
-
-
-
-# CHECK FOR UPDATES
-# This option determines whether Nagios will automatically check to
-# see if new updates (releases) are available. It is recommend that you
-# enable this option to ensure that you stay on top of the latest critical
-# patches to Nagios. Nagios is critical to you - make sure you keep it in
-# good shape. Nagios will check once a day for new updates. Data collected
-# by Nagios Enterprises from the update check is processed in accordance
-# with our privacy policy - see https://api.nagios.org for details.
-
-check_for_updates=1
-
-
-
-# BARE UPDATE CHECK
-# This option deterines what data Nagios will send to api.nagios.org when
-# it checks for updates. By default, Nagios will send information on the
-# current version of Nagios you have installed, as well as an indicator as
-# to whether this was a new installation or not. Nagios Enterprises uses
-# this data to determine the number of users running specific version of
-# Nagios. Enable this option if you do not want this information to be sent.
-
-bare_update_check=0
-
-
-
-# AGGRESSIVE HOST CHECKING OPTION
-# If you don't want to turn on aggressive host checking features, set
-# this value to 0 (the default). Otherwise set this value to 1 to
-# enable the aggressive check option. Read the docs for more info
-# on what aggressive host check is or check out the source code in
-# base/checks.c
-
-use_aggressive_host_checking=0
-
-
-
-# SERVICE CHECK EXECUTION OPTION
-# This determines whether or not Nagios will actively execute
-# service checks when it initially starts. If this option is
-# disabled, checks are not actively made, but Nagios can still
-# receive and process passive check results that come in. Unless
-# you're implementing redundant hosts or have a special need for
-# disabling the execution of service checks, leave this enabled!
-# Values: 1 = enable checks, 0 = disable checks
-
-execute_service_checks=1
-
-
-
-# PASSIVE SERVICE CHECK ACCEPTANCE OPTION
-# This determines whether or not Nagios will accept passive
-# service checks results when it initially (re)starts.
-# Values: 1 = accept passive checks, 0 = reject passive checks
-
-accept_passive_service_checks=1
-
-
-
-# HOST CHECK EXECUTION OPTION
-# This determines whether or not Nagios will actively execute
-# host checks when it initially starts. If this option is
-# disabled, checks are not actively made, but Nagios can still
-# receive and process passive check results that come in. Unless
-# you're implementing redundant hosts or have a special need for
-# disabling the execution of host checks, leave this enabled!
-# Values: 1 = enable checks, 0 = disable checks
-
-execute_host_checks=1
-
-
-
-# PASSIVE HOST CHECK ACCEPTANCE OPTION
-# This determines whether or not Nagios will accept passive
-# host checks results when it initially (re)starts.
-# Values: 1 = accept passive checks, 0 = reject passive checks
-
-accept_passive_host_checks=1
-
-
-
-# NOTIFICATIONS OPTION
-# This determines whether or not Nagios will sent out any host or
-# service notifications when it is initially (re)started.
-# Values: 1 = enable notifications, 0 = disable notifications
-
-enable_notifications=1
-
-
-
-# EVENT HANDLER USE OPTION
-# This determines whether or not Nagios will run any host or
-# service event handlers when it is initially (re)started. Unless
-# you're implementing redundant hosts, leave this option enabled.
-# Values: 1 = enable event handlers, 0 = disable event handlers
-
-enable_event_handlers=1
-
-
-
-# PROCESS PERFORMANCE DATA OPTION
-# This determines whether or not Nagios will process performance
-# data returned from service and host checks. If this option is
-# enabled, host performance data will be processed using the
-# host_perfdata_command (defined below) and service performance
-# data will be processed using the service_perfdata_command (also
-# defined below). Read the HTML docs for more information on
-# performance data.
-# Values: 1 = process performance data, 0 = do not process performance data
-
-process_performance_data=0
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS
-# These commands are run after every host and service check is
-# performed. These commands are executed only if the
-# enable_performance_data option (above) is set to 1. The command
-# argument is the short name of a command definition that you
-# define in your host configuration file. Read the HTML docs for
-# more information on performance data.
-
-#host_perfdata_command=process-host-perfdata
-#service_perfdata_command=process-service-perfdata
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA FILES
-# These files are used to store host and service performance data.
-# Performance data is only written to these files if the
-# enable_performance_data option (above) is set to 1.
-
-#host_perfdata_file=/var/spool/nagios/host-perfdata
-#service_perfdata_file=/var/spool/nagios/service-perfdata
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA FILE TEMPLATES
-# These options determine what data is written (and how) to the
-# performance data files. The templates may contain macros, special
-# characters (\t for tab, \r for carriage return, \n for newline)
-# and plain text. A newline is automatically added after each write
-# to the performance data file. Some examples of what you can do are
-# shown below.
-
-#host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
-#service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA FILE MODES
-# This option determines whether or not the host and service
-# performance data files are opened in write ("w") or append ("a")
-# mode. If you want to use named pipes, you should use the special
-# pipe ("p") mode which avoid blocking at startup, otherwise you will
-# likely want the defult append ("a") mode.
-
-#host_perfdata_file_mode=a
-#service_perfdata_file_mode=a
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING INTERVAL
-# These options determine how often (in seconds) the host and service
-# performance data files are processed using the commands defined
-# below. A value of 0 indicates the files should not be periodically
-# processed.
-
-#host_perfdata_file_processing_interval=0
-#service_perfdata_file_processing_interval=0
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING COMMANDS
-# These commands are used to periodically process the host and
-# service performance data files. The interval at which the
-# processing occurs is determined by the options above.
-
-#host_perfdata_file_processing_command=process-host-perfdata-file
-#service_perfdata_file_processing_command=process-service-perfdata-file
-
-
-
-# HOST AND SERVICE PERFORMANCE DATA PROCESS EMPTY RESULTS
-# These options determine wether the core will process empty perfdata
-# results or not. This is needed for distributed monitoring, and intentionally
-# turned on by default.
-# If you don't require empty perfdata - saving some cpu cycles
-# on unwanted macro calculation - you can turn that off. Be careful!
-# Values: 1 = enable, 0 = disable
-
-#host_perfdata_process_empty_results=1
-#service_perfdata_process_empty_results=1
-
-
-# OBSESS OVER SERVICE CHECKS OPTION
-# This determines whether or not Nagios will obsess over service
-# checks and run the ocsp_command defined below. Unless you're
-# planning on implementing distributed monitoring, do not enable
-# this option. Read the HTML docs for more information on
-# implementing distributed monitoring.
-# Values: 1 = obsess over services, 0 = do not obsess (default)
-
-obsess_over_services=0
-
-
-
-# OBSESSIVE COMPULSIVE SERVICE PROCESSOR COMMAND
-# This is the command that is run for every service check that is
-# processed by Nagios. This command is executed only if the
-# obsess_over_services option (above) is set to 1. The command
-# argument is the short name of a command definition that you
-# define in your host configuration file. Read the HTML docs for
-# more information on implementing distributed monitoring.
-
-#ocsp_command=somecommand
-
-
-
-# OBSESS OVER HOST CHECKS OPTION
-# This determines whether or not Nagios will obsess over host
-# checks and run the ochp_command defined below. Unless you're
-# planning on implementing distributed monitoring, do not enable
-# this option. Read the HTML docs for more information on
-# implementing distributed monitoring.
-# Values: 1 = obsess over hosts, 0 = do not obsess (default)
-
-obsess_over_hosts=0
-
-
-
-# OBSESSIVE COMPULSIVE HOST PROCESSOR COMMAND
-# This is the command that is run for every host check that is
-# processed by Nagios. This command is executed only if the
-# obsess_over_hosts option (above) is set to 1. The command
-# argument is the short name of a command definition that you
-# define in your host configuration file. Read the HTML docs for
-# more information on implementing distributed monitoring.
-
-#ochp_command=somecommand
-
-
-
-# TRANSLATE PASSIVE HOST CHECKS OPTION
-# This determines whether or not Nagios will translate
-# DOWN/UNREACHABLE passive host check results into their proper
-# state for this instance of Nagios. This option is useful
-# if you have distributed or failover monitoring setup. In
-# these cases your other Nagios servers probably have a different
-# "view" of the network, with regards to the parent/child relationship
-# of hosts. If a distributed monitoring server thinks a host
-# is DOWN, it may actually be UNREACHABLE from the point of
-# this Nagios instance. Enabling this option will tell Nagios
-# to translate any DOWN or UNREACHABLE host states it receives
-# passively into the correct state from the view of this server.
-# Values: 1 = perform translation, 0 = do not translate (default)
-
-translate_passive_host_checks=0
-
-
-
-# PASSIVE HOST CHECKS ARE SOFT OPTION
-# This determines whether or not Nagios will treat passive host
-# checks as being HARD or SOFT. By default, a passive host check
-# result will put a host into a HARD state type. This can be changed
-# by enabling this option.
-# Values: 0 = passive checks are HARD, 1 = passive checks are SOFT
-
-passive_host_checks_are_soft=0
-
-
-
-# ORPHANED HOST/SERVICE CHECK OPTIONS
-# These options determine whether or not Nagios will periodically
-# check for orphaned host service checks. Since service checks are
-# not rescheduled until the results of their previous execution
-# instance are processed, there exists a possibility that some
-# checks may never get rescheduled. A similar situation exists for
-# host checks, although the exact scheduling details differ a bit
-# from service checks. Orphaned checks seem to be a rare
-# problem and should not happen under normal circumstances.
-# If you have problems with service checks never getting
-# rescheduled, make sure you have orphaned service checks enabled.
-# Values: 1 = enable checks, 0 = disable checks
-
-check_for_orphaned_services=1
-check_for_orphaned_hosts=1
-
-
-
-# SERVICE FRESHNESS CHECK OPTION
-# This option determines whether or not Nagios will periodically
-# check the "freshness" of service results. Enabling this option
-# is useful for ensuring passive checks are received in a timely
-# manner.
-# Values: 1 = enabled freshness checking, 0 = disable freshness checking
-
-check_service_freshness=1
-
-
-
-# SERVICE FRESHNESS CHECK INTERVAL
-# This setting determines how often (in seconds) Nagios will
-# check the "freshness" of service check results. If you have
-# disabled service freshness checking, this option has no effect.
-
-service_freshness_check_interval=60
-
-
-
-# SERVICE CHECK TIMEOUT STATE
-# This setting determines the state Nagios will report when a
-# service check times out - that is does not respond within
-# service_check_timeout seconds. This can be useful if a
-# machine is running at too high a load and you do not want
-# to consider a failed service check to be critical (the default).
-# Valid settings are:
-# c - Critical (default)
-# u - Unknown
-# w - Warning
-# o - OK
-
-service_check_timeout_state=c
-
-
-
-# HOST FRESHNESS CHECK OPTION
-# This option determines whether or not Nagios will periodically
-# check the "freshness" of host results. Enabling this option
-# is useful for ensuring passive checks are received in a timely
-# manner.
-# Values: 1 = enabled freshness checking, 0 = disable freshness checking
-
-check_host_freshness=0
-
-
-
-# HOST FRESHNESS CHECK INTERVAL
-# This setting determines how often (in seconds) Nagios will
-# check the "freshness" of host check results. If you have
-# disabled host freshness checking, this option has no effect.
-
-host_freshness_check_interval=60
-
-
-
-
-# ADDITIONAL FRESHNESS THRESHOLD LATENCY
-# This setting determines the number of seconds that Nagios
-# will add to any host and service freshness thresholds that
-# it calculates (those not explicitly specified by the user).
-
-additional_freshness_latency=15
-
-
-
-
-# FLAP DETECTION OPTION
-# This option determines whether or not Nagios will try
-# and detect hosts and services that are "flapping".
-# Flapping occurs when a host or service changes between
-# states too frequently. When Nagios detects that a
-# host or service is flapping, it will temporarily suppress
-# notifications for that host/service until it stops
-# flapping. Flap detection is very experimental, so read
-# the HTML documentation before enabling this feature!
-# Values: 1 = enable flap detection
-# 0 = disable flap detection (default)
-
-enable_flap_detection=1
-
-
-
-# FLAP DETECTION THRESHOLDS FOR HOSTS AND SERVICES
-# Read the HTML documentation on flap detection for
-# an explanation of what this option does. This option
-# has no effect if flap detection is disabled.
-
-low_service_flap_threshold=5.0
-high_service_flap_threshold=20.0
-low_host_flap_threshold=5.0
-high_host_flap_threshold=20.0
-
-
-
-# DATE FORMAT OPTION
-# This option determines how short dates are displayed. Valid options
-# include:
-# us (MM-DD-YYYY HH:MM:SS)
-# euro (DD-MM-YYYY HH:MM:SS)
-# iso8601 (YYYY-MM-DD HH:MM:SS)
-# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
-#
-
-date_format=us
-
-
-
-
-# TIMEZONE OFFSET
-# This option is used to override the default timezone that this
-# instance of Nagios runs in. If not specified, Nagios will use
-# the system configured timezone.
-#
-# NOTE: In order to display the correct timezone in the CGIs, you
-# will also need to alter the Apache directives for the CGI path
-# to include your timezone. Example:
-#
-#
-# SetEnv TZ "Australia/Brisbane"
-# ...
-#
-
-#use_timezone=US/Mountain
-#use_timezone=Australia/Brisbane
-
-
-
-# ILLEGAL OBJECT NAME CHARACTERS
-# This option allows you to specify illegal characters that cannot
-# be used in host names, service descriptions, or names of other
-# object types.
-
-illegal_object_name_chars=`~!$%^&*|'"<>?,()=
-
-
-
-# ILLEGAL MACRO OUTPUT CHARACTERS
-# This option allows you to specify illegal characters that are
-# stripped from macros before being used in notifications, event
-# handlers, etc. This DOES NOT affect macros used in service or
-# host check commands.
-# The following macros are stripped of the characters you specify:
-# $HOSTOUTPUT$
-# $LONGHOSTOUTPUT$
-# $HOSTPERFDATA$
-# $HOSTACKAUTHOR$
-# $HOSTACKCOMMENT$
-# $SERVICEOUTPUT$
-# $LONGSERVICEOUTPUT$
-# $SERVICEPERFDATA$
-# $SERVICEACKAUTHOR$
-# $SERVICEACKCOMMENT$
-
-illegal_macro_output_chars=`~$&|'"<>
-
-
-
-# REGULAR EXPRESSION MATCHING
-# This option controls whether or not regular expression matching
-# takes place in the object config files. Regular expression
-# matching is used to match host, hostgroup, service, and service
-# group names/descriptions in some fields of various object types.
-# Values: 1 = enable regexp matching, 0 = disable regexp matching
-
-use_regexp_matching=0
-
-
-
-# "TRUE" REGULAR EXPRESSION MATCHING
-# This option controls whether or not "true" regular expression
-# matching takes place in the object config files. This option
-# only has an effect if regular expression matching is enabled
-# (see above). If this option is DISABLED, regular expression
-# matching only occurs if a string contains wildcard characters
-# (* and ?). If the option is ENABLED, regexp matching occurs
-# all the time (which can be annoying).
-# Values: 1 = enable true matching, 0 = disable true matching
-
-use_true_regexp_matching=0
-
-
-
-# ADMINISTRATOR EMAIL/PAGER ADDRESSES
-# The email and pager address of a global administrator (likely you).
-# Nagios never uses these values itself, but you can access them by
-# using the $ADMINEMAIL$ and $ADMINPAGER$ macros in your notification
-# commands.
-
-admin_email=nagios@localhost
-admin_pager=pagenagios@localhost
-
-
-
-# DAEMON CORE DUMP OPTION
-# This option determines whether or not Nagios is allowed to create
-# a core dump when it runs as a daemon. Note that it is generally
-# considered bad form to allow this, but it may be useful for
-# debugging purposes. Enabling this option doesn't guarantee that
-# a core file will be produced, but that's just life...
-# Values: 1 - Allow core dumps
-# 0 - Do not allow core dumps (default)
-
-daemon_dumps_core=0
-
-
-
-# LARGE INSTALLATION TWEAKS OPTION
-# This option determines whether or not Nagios will take some shortcuts
-# which can save on memory and CPU usage in large Nagios installations.
-# Read the documentation for more information on the benefits/tradeoffs
-# of enabling this option.
-# Values: 1 - Enabled tweaks
-# 0 - Disable tweaks (default)
-
-use_large_installation_tweaks=0
-
-
-
-# ENABLE ENVIRONMENT MACROS
-# This option determines whether or not Nagios will make all standard
-# macros available as environment variables when host/service checks
-# and system commands (event handlers, notifications, etc.) are
-# executed.
-# Enabling this is a very bad idea for anything but very small setups,
-# as it means plugins, notification scripts and eventhandlers may run
-# out of environment space. It will also cause a significant increase
-# in CPU- and memory usage and drastically reduce the number of checks
-# you can run.
-# Values: 1 - Enable environment variable macros
-# 0 - Disable environment variable macros (default)
-
-enable_environment_macros=0
-
-
-
-# CHILD PROCESS MEMORY OPTION
-# This option determines whether or not Nagios will free memory in
-# child processes (processed used to execute system commands and host/
-# service checks). If you specify a value here, it will override
-# program defaults.
-# Value: 1 - Free memory in child processes
-# 0 - Do not free memory in child processes
-
-#free_child_process_memory=1
-
-
-
-# CHILD PROCESS FORKING BEHAVIOR
-# This option determines how Nagios will fork child processes
-# (used to execute system commands and host/service checks). Normally
-# child processes are fork()ed twice, which provides a very high level
-# of isolation from problems. Fork()ing once is probably enough and will
-# save a great deal on CPU usage (in large installs), so you might
-# want to consider using this. If you specify a value here, it will
-# program defaults.
-# Value: 1 - Child processes fork() twice
-# 0 - Child processes fork() just once
-
-#child_processes_fork_twice=1
-
-
-
-# DEBUG LEVEL
-# This option determines how much (if any) debugging information will
-# be written to the debug file. OR values together to log multiple
-# types of information.
-# Values:
-# -1 = Everything
-# 0 = Nothing
-# 1 = Functions
-# 2 = Configuration
-# 4 = Process information
-# 8 = Scheduled events
-# 16 = Host/service checks
-# 32 = Notifications
-# 64 = Event broker
-# 128 = External commands
-# 256 = Commands
-# 512 = Scheduled downtime
-# 1024 = Comments
-# 2048 = Macros
-
-debug_level=0
-
-
-
-# DEBUG VERBOSITY
-# This option determines how verbose the debug log out will be.
-# Values: 0 = Brief output
-# 1 = More detailed
-# 2 = Very detailed
-
-debug_verbosity=1
-
-
-
-# DEBUG FILE
-# This option determines where Nagios should write debugging information.
-
-debug_file=/var/spool/nagios/nagios.debug
-
-
-
-# MAX DEBUG FILE SIZE
-# This option determines the maximum size (in bytes) of the debug file. If
-# the file grows larger than this size, it will be renamed with a .old
-# extension. If a file already exists with a .old extension it will
-# automatically be deleted. This helps ensure your disk space usage doesn't
-# get out of control when debugging Nagios.
-
-max_debug_file_size=1000000
-
-
-
-# Should we allow hostgroups to have no hosts, we default this to off since
-# that was the old behavior
-
-allow_empty_hostgroup_assignment=0
-
-
-
-# Normally worker count is dynamically allocated based on 1.5 * number of cpu's
-# with a minimum of 4 workers. This value will override the defaults
-
-#check_workers=3
-
-
-
-# DISABLE SERVICE CHECKS WHEN HOST DOWN
-# This option will disable all service checks if the host is not in an UP state
-#
-# While desirable in some environments, enabling this value can distort report
-# values as the expected quantity of checks will not have been performed
-
-#host_down_disable_service_checks=0
-
-
-
-# EXPERIMENTAL load controlling options
-# To get current defaults based on your system issue a command to
-# the query handler. Please note that this is an experimental feature
-# and not meant for production use. Used incorrectly it can induce
-# enormous latency.
-# #core loadctl
-# jobs_max - The maximum amount of jobs to run at one time
-# jobs_min - The minimum amount of jobs to run at one time
-# jobs_limit - The maximum amount of jobs the current load lets us run
-# backoff_limit - The minimum backoff_change
-# backoff_change - # of jobs to remove from jobs_limit when backing off
-# rampup_limit - Minimum rampup_change
-# rampup_change - # of jobs to add to jobs_limit when ramping up
-# NOTE: The backoff_limit and rampup_limit are NOT used by anything currently,
-# so if your system is under load nothing will actively modify the jobs
-# even if you have these options enabled, they are for external
-# connector information only. However, if you change the jobs_max or
-# jobs_min manually here or through the query handler interface that
-# WILL affect your system
-#loadctl_options=jobs_max=100;backoff_limit=10;rampup_change=5
diff --git a/roles/nagios_server/files/nagios/configs/timeperiods.cfg b/roles/nagios_server/files/nagios/configs/timeperiods.cfg
deleted file mode 100644
index b7caad14f2..0000000000
--- a/roles/nagios_server/files/nagios/configs/timeperiods.cfg
+++ /dev/null
@@ -1,147 +0,0 @@
-###############################################################################
-# TIMEPERIODS.CFG - SAMPLE TIMEPERIOD DEFINITIONS
-#
-#
-# NOTES: This config file provides you with some example timeperiod definitions
-# that you can reference in host, service, contact, and dependency
-# definitions.
-#
-# You don't need to keep timeperiods in a separate file from your other
-# object definitions. This has been done just to make things easier to
-# understand.
-#
-###############################################################################
-
-
-
-###############################################################################
-###############################################################################
-#
-# TIME PERIODS
-#
-###############################################################################
-###############################################################################
-
-
-define timeperiod{
- timeperiod_name 24x7
- alias 24 Hours A Day, 7 Days A Week
- sunday 00:00-24:00
- monday 00:00-24:00
- tuesday 00:00-24:00
- wednesday 00:00-24:00
- thursday 00:00-24:00
- friday 00:00-24:00
- saturday 00:00-24:00
-}
-
-define timeperiod{
- timeperiod_name 12x7-GMT
- alias 12 Hours a day, 7 days a week
- sunday 08:00-20:00
- monday 08:00-20:00
- tuesday 08:00-20:00
- wednesday 08:00-20:00
- thursday 08:00-20:00
- friday 08:00-20:00
- saturday 08:00-20:00
- }
-
-define timeperiod{
- timeperiod_name 12x7-USET
- alias 12 Hours a day, 7 days a week
- sunday 12:00-24:00
- monday 12:00-24:00
- tuesday 12:00-24:00
- wednesday 12:00-24:00
- thursday 12:00-24:00
- friday 12:00-24:00
- saturday 12:00-24:00
- }
-
-define timeperiod{
- timeperiod_name 12x7-USPT
- alias 12 Hours a day, 7 days a week
- sunday 00:00-03:00,15:00-24:00
- monday 00:00-03:00,15:00-24:00
- tuesday 00:00-03:00,15:00-24:00
- wednesday 00:00-03:00,15:00-24:00
- thursday 00:00-03:00,15:00-24:00
- friday 00:00-03:00,15:00-24:00
- saturday 00:00-03:00,15:00-24:00
- }
-
-
-define timeperiod{
- timeperiod_name 16x7-AU
- alias 15 Hours a day, 7 days a week
- sunday 00:00-14:00,22:00-24:00
- monday 00:00-14:00,22:00-24:00
- tuesday 00:00-14:00,22:00-24:00
- wednesday 00:00-14:00,22:00-24:00
- thursday 00:00-14:00,22:00-24:00
- friday 00:00-14:00,22:00-24:00
- saturday 00:00-14:00,22:00-24:00
- }
-
-
-# Members of sysadmin-main already get nagios messages
-define timeperiod{
- timeperiod_name never
- alias Never
- }
-
-# This defines a timeperiod where all times are valid for checks,
-# notifications, etc. The classic "24x7" support nightmare. :-)
-# 'workhours' timeperiod definition
-define timeperiod{
- timeperiod_name workhours
- alias Normal Work Hours
- monday 09:00-17:00
- tuesday 09:00-17:00
- wednesday 09:00-17:00
- thursday 09:00-17:00
- friday 09:00-17:00
- }
-
-
-# 'none' timeperiod definition
-define timeperiod{
- timeperiod_name none
- alias No Time Is A Good Time
- }
-
-# Some U.S. holidays
-# Note: The timeranges for each holiday are meant to *exclude* the holidays from being
-# treated as a valid time for notifications, etc. You probably don't want your pager
-# going off on New Year's. Although you're employer might... :-)
-define timeperiod{
- name us-holidays
- timeperiod_name us-holidays
- alias U.S. Holidays
-
- january 1 00:00-00:00 ; New Years
- monday -1 may 00:00-00:00 ; Memorial Day (last Monday in May)
- july 4 00:00-00:00 ; Independence Day
- monday 1 september 00:00-00:00 ; Labor Day (first Monday in September)
- thursday 4 november 00:00-00:00 ; Thanksgiving (4th Thursday in November)
- december 25 00:00-00:00 ; Christmas
- }
-
-
-# This defines a modified "24x7" timeperiod that covers every day of the
-# year, except for U.S. holidays (defined in the timeperiod above).
-define timeperiod{
- timeperiod_name 24x7_sans_holidays
- alias 24x7 Sans Holidays
-
- use us-holidays ; Get holiday exceptions from other timeperiod
-
- sunday 00:00-24:00
- monday 00:00-24:00
- tuesday 00:00-24:00
- wednesday 00:00-24:00
- thursday 00:00-24:00
- friday 00:00-24:00
- saturday 00:00-24:00
- }
diff --git a/roles/nagios_server/files/nagios/contactgroups/copr.cfg b/roles/nagios_server/files/nagios/contactgroups/copr.cfg
deleted file mode 100644
index 1415f88813..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/copr.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-define contactgroup {
- contactgroup_name copr
- alias COPR Notifications
- members copr-sig
-}
diff --git a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-email.cfg b/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-email.cfg
deleted file mode 100644
index 443f8ce29e..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-email.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-define contactgroup{
- contactgroup_name fedora-sysadmin-email
- alias Fedora Sysadmin Email Contacts
-# sysadmin-main: @ausil @kevin
- members admin,kevin
- }
diff --git a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-ircbot.cfg b/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-ircbot.cfg
deleted file mode 100644
index 53dbef284a..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-ircbot.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-define contactgroup{
- contactgroup_name fedora-sysadmin-ircbot
- alias Fedora Sysadmin irc Contacts
- members ircbot,matrixbot
-
- }
diff --git a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-matrixbot.cfg b/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-matrixbot.cfg
deleted file mode 100644
index dec8d27e40..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-matrixbot.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-define contactgroup{
- contactgroup_name fedora-sysadmin-matrixbot
- alias Fedora Sysadmin Matrix Contacts
- members matrixbot
-
- }
diff --git a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-pager.cfg b/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-pager.cfg
deleted file mode 100644
index d3e0af7e7e..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/fedora-sysadmin-pager.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contactgroup{
- contactgroup_name fedora-sysadmin-pager
- alias Fedora Sysadmin Pager Contacts
- members kevinp
-}
-
-define contactgroup{
- contactgroup_name fedora-sysadmin-emergency
- alias Fedora Sysadmin Pager Contacts
- members kevin-emergency
-}
diff --git a/roles/nagios_server/files/nagios/contactgroups/null.cfg b/roles/nagios_server/files/nagios/contactgroups/null.cfg
deleted file mode 100644
index e9c2067b77..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/null.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-define contactgroup{
- contactgroup_name null
- alias null
- members null
-}
diff --git a/roles/nagios_server/files/nagios/contactgroups/sysadmin-qa-email.cfg b/roles/nagios_server/files/nagios/contactgroups/sysadmin-qa-email.cfg
deleted file mode 100644
index e25dfe84fa..0000000000
--- a/roles/nagios_server/files/nagios/contactgroups/sysadmin-qa-email.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-define contactgroup {
- contactgroup_name sysadmin-qa-email
- alias Fedora SysAdmin QA Email Contacts
- members sysadmin-qa
-}
diff --git a/roles/nagios_server/files/nagios/contacts/README-FIRST b/roles/nagios_server/files/nagios/contacts/README-FIRST
deleted file mode 100644
index 1ce6d6998f..0000000000
--- a/roles/nagios_server/files/nagios/contacts/README-FIRST
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory contains nagios contacts.
-
-Note that this repo is open to the world as is the nagios instance,
-so any email addresses or phone numbers here will be public.
-
-Interested parties are urged to use a email address that filters out
-all non nagios emails to avoid spam.
diff --git a/roles/nagios_server/files/nagios/contacts/admin.cfg b/roles/nagios_server/files/nagios/contacts/admin.cfg
deleted file mode 100644
index fabbb5e3f0..0000000000
--- a/roles/nagios_server/files/nagios/contacts/admin.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-define contact{
- contact_name admin
- alias Fedora Sysadmins
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email sysadmin-members@fedoraproject.org
- }
-
-
diff --git a/roles/nagios_server/files/nagios/contacts/copr-sig.cfg b/roles/nagios_server/files/nagios/contacts/copr-sig.cfg
deleted file mode 100644
index 25a6b30420..0000000000
--- a/roles/nagios_server/files/nagios/contacts/copr-sig.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contact {
- contact_name copr-sig
- alias Copr Team
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email copr-team@redhat.com
-}
diff --git a/roles/nagios_server/files/nagios/contacts/fedora-messaging.cfg b/roles/nagios_server/files/nagios/contacts/fedora-messaging.cfg
deleted file mode 100644
index 7b1c77e0c7..0000000000
--- a/roles/nagios_server/files/nagios/contacts/fedora-messaging.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-#define contact{
-# contact_name fedora-messaging
-# alias FMBUS
-# service_notification_period 24x7
-# host_notification_period 24x7
-# service_notification_options w,u,c,r
-# host_notification_options d,u,r
-# service_notification_commands notify-by-fedora-messaging
-# host_notification_commands host-notify-by-fedora-messaging
-#}
diff --git a/roles/nagios_server/files/nagios/contacts/frostyx.cfg b/roles/nagios_server/files/nagios/contacts/frostyx.cfg
deleted file mode 100644
index 21224c6884..0000000000
--- a/roles/nagios_server/files/nagios/contacts/frostyx.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contact{
- contact_name frostyx
- alias frostyx
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-epager
- host_notification_commands host-notify-by-epager
- pager jkadlcik@redhat.com
-}
diff --git a/roles/nagios_server/files/nagios/contacts/ircbot.cfg b/roles/nagios_server/files/nagios/contacts/ircbot.cfg
deleted file mode 100644
index 9f3d4fee2e..0000000000
--- a/roles/nagios_server/files/nagios/contacts/ircbot.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-define contact{
- contact_name ircbot
- alias ZOD
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-ircbot
- host_notification_commands host-notify-by-ircbot
-}
diff --git a/roles/nagios_server/files/nagios/contacts/kevin.cfg b/roles/nagios_server/files/nagios/contacts/kevin.cfg
deleted file mode 100644
index b54385f243..0000000000
--- a/roles/nagios_server/files/nagios/contacts/kevin.cfg
+++ /dev/null
@@ -1,35 +0,0 @@
-define contact{
- contact_name kevin
- alias Kevin Fenzi
- service_notification_period none
- host_notification_period none
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email kevin-pager@scrye.com
-}
-
-define contact{
- contact_name kevin-emergency
- alias Kevin Fenzi
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-epager
- host_notification_commands host-notify-by-epager
- pager kevin-urgent@scrye.com
-}
-
-define contact{
- contact_name kevinp
- alias Kevin Fenzi
- service_notification_period 12x7-USPT
- host_notification_period 12x7-USPT
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-epager
- host_notification_commands host-notify-by-epager
- pager kevin-urgent@scrye.com
-}
diff --git a/roles/nagios_server/files/nagios/contacts/matrixbot.cfg b/roles/nagios_server/files/nagios/contacts/matrixbot.cfg
deleted file mode 100644
index 59e31c98ca..0000000000
--- a/roles/nagios_server/files/nagios/contacts/matrixbot.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-define contact{
- contact_name matrixbot
- alias NON
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-matrixbot
- host_notification_commands host-notify-by-matrixbot
-}
diff --git a/roles/nagios_server/files/nagios/contacts/msuchy.cfg b/roles/nagios_server/files/nagios/contacts/msuchy.cfg
deleted file mode 100644
index 0fe98dcb4c..0000000000
--- a/roles/nagios_server/files/nagios/contacts/msuchy.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contact{
- contact_name msuchy
- alias msuchy
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-epager
- host_notification_commands host-notify-by-epager
- pager msuchy@redhat.com
-}
diff --git a/roles/nagios_server/files/nagios/contacts/nb.cfg b/roles/nagios_server/files/nagios/contacts/nb.cfg
deleted file mode 100644
index ccf2dcd937..0000000000
--- a/roles/nagios_server/files/nagios/contacts/nb.cfg
+++ /dev/null
@@ -1,38 +0,0 @@
-define contact{
- contact_name nb
- alias Nick Bebout
- service_notification_period never
- host_notification_period never
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email nick@bebout.net
-}
-
-#define contact{
-# contact_name nb-emergency
-# alias Nick Bebout
-# service_notification_period never
-# host_notification_period never
-# service_notification_options w,u,c,r
-# host_notification_options d,u,r
-# service_notification_commands notify-by-epager
-# host_notification_commands host-notify-by-epager
-# email nb5@txt.att.net
-# pager nb5@txt.att.net
-#}
-
-#define contact{
-# contact_name nbp
-# alias Nick Bebout
-# service_notification_period never
-# host_notification_period never
-# service_notification_options w,u,c,r
-# host_notification_options d,u,r
-# service_notification_commands notify-by-epager
-# host_notification_commands host-notify-by-epager
-# email nb5@txt.att.net
-# pager nb5@txt.att.net
-#}
-
diff --git a/roles/nagios_server/files/nagios/contacts/nikromen.cfg b/roles/nagios_server/files/nagios/contacts/nikromen.cfg
deleted file mode 100644
index 83ca03c1a6..0000000000
--- a/roles/nagios_server/files/nagios/contacts/nikromen.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contact{
- contact_name nikromen
- alias nikromen
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-epager
- host_notification_commands host-notify-by-epager
- pager jkyjovsk@redhat.com
-}
diff --git a/roles/nagios_server/files/nagios/contacts/null.cfg b/roles/nagios_server/files/nagios/contacts/null.cfg
deleted file mode 100644
index 792c5e9b5a..0000000000
--- a/roles/nagios_server/files/nagios/contacts/null.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contact{
- contact_name null
- alias null
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email nobody@fedoraproject.org
-}
diff --git a/roles/nagios_server/files/nagios/contacts/praiskup.cfg b/roles/nagios_server/files/nagios/contacts/praiskup.cfg
deleted file mode 100644
index 9766951066..0000000000
--- a/roles/nagios_server/files/nagios/contacts/praiskup.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define contact{
- contact_name praiskup
- alias praiskup
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-epager
- host_notification_commands host-notify-by-epager
- pager praiskup@redhat.com
-}
diff --git a/roles/nagios_server/files/nagios/contacts/smooge.cfg b/roles/nagios_server/files/nagios/contacts/smooge.cfg
deleted file mode 100644
index dba186f3db..0000000000
--- a/roles/nagios_server/files/nagios/contacts/smooge.cfg
+++ /dev/null
@@ -1,12 +0,0 @@
-define contact{
- contact_name smooge
- alias Stephen Smoogen
- service_notification_period never
- host_notification_period never
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email smooge+nagios@smoogespace.com
-}
-
diff --git a/roles/nagios_server/files/nagios/contacts/sysadmin-qa.cfg b/roles/nagios_server/files/nagios/contacts/sysadmin-qa.cfg
deleted file mode 100644
index d4ed945f0e..0000000000
--- a/roles/nagios_server/files/nagios/contacts/sysadmin-qa.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-define contact {
- contact_name sysadmin-qa
- alias Fedora QA SysAdmins
- service_notification_period 24x7
- host_notification_period 24x7
- service_notification_options w,u,c,r
- host_notification_options d,u,r
- service_notification_commands notify-by-email
- host_notification_commands host-notify-by-email
- email sysadmin-qa-members@fedoraproject.org
-}
-
-
diff --git a/roles/nagios_server/files/nagios/hosts/templates.cfg b/roles/nagios_server/files/nagios/hosts/templates.cfg
deleted file mode 100644
index 27496434c6..0000000000
--- a/roles/nagios_server/files/nagios/hosts/templates.cfg
+++ /dev/null
@@ -1,99 +0,0 @@
-define host {
- name defaulttemplate
- #check_command check-host-alive4
- check_command check-host-alive-nrpe
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define host {
- name aws
- check_command check-host-alive-ssh
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
- register 0
-}
-
-define host {
- name mincheck
- check_command check-host-alive4
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
- register 0
-}
-
-define host {
- name mincheck6
- check_command check-host-alive6
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
- register 0
-}
-
-define host {
- name ppc-secondarytemplate
- check_command check-host-alive4
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
- register 0
-}
-
-define host {
- name retracetemplate
- check_command check-host-alive4
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
- register 0
-}
-
-define host {
- name defaultbuilders
- max_check_attempts 8
- checks_enabled 1
- retain_status_information 1
- retain_nonstatus_information 1
- notification_interval 15
- notifications_enabled 1
- notification_options d,r
- contact_groups fedora-sysadmin-ircbot
- register 0
-}
-
diff --git a/roles/nagios_server/files/nagios/plugins/check_datanommer_timesince.py b/roles/nagios_server/files/nagios/plugins/check_datanommer_timesince.py
deleted file mode 100755
index 4833f6f4d4..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_datanommer_timesince.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/python3
-""" NRPE check for datanommer/fedora-messaging health.
-Given a category like 'bodhi', 'buildsys', or 'git', return an error if
-datanommer hasn't seen a message of that type in such and such time.
-You can alternatively provide a 'topic' which might look like
-org.fedoraproject.prod.bodhi.update.comment.
-
-Requires: python-requests
-Requires: python-dateutil
-
-Usage:
-
- $ check_datanommer_timesince CATEGORY WARNING_THRESH CRITICAL_THRESH
-
-:Author: Aurelien Bompard
-
-"""
-
-import sys
-from datetime import datetime, timezone
-
-import requests
-import dateutil.parser
-
-
-DATAGREPPER_URL = "https://apps.fedoraproject.org/datagrepper"
-
-
-def query_messages(identifier, delta):
- params = {"delta": delta, "rows_per_page": 1, "page": 1}
- # If it has a '.', then assume it is a topic.
- if "." in identifier:
- params["topic"] = identifier
- else:
- params["category"] = identifier
- response = requests.get(f"{DATAGREPPER_URL}/v2/search", params=params)
- if not response.ok:
- print(
- f"UNKNOWN: Could not query {DATAGREPPER_URL}: error {response.status_code}"
- )
- sys.exit(3)
- result = response.json()
- return result
-
-
-def parse_args():
- def _usage():
- print(f"Usage: {sys.argv[0]} CATEGORY WARNING_THRESHOLD CRITICAL_THRESHOLD")
- sys.exit(3)
-
- if len(sys.argv) != 4:
- _usage()
- try:
- int(sys.argv[2])
- int(sys.argv[3])
- except ValueError:
- _usage()
- if int(sys.argv[2]) > int(sys.argv[3]):
- _usage()
- return sys.argv[1], int(sys.argv[2]), int(sys.argv[3])
-
-
-def main():
- identifier, warning_threshold, critical_threshold = parse_args()
- result = query_messages(identifier, critical_threshold)
-
- if result["total"] == 0:
- print(f"CRIT: no {identifier} messages in {critical_threshold} seconds")
- sys.exit(2)
-
- last_timestamp = result["raw_messages"][0]["headers"]["sent-at"]
- last_timestamp = dateutil.parser.parse(last_timestamp)
- seconds_since = int((datetime.now(timezone.utc) - last_timestamp).total_seconds())
- reason = f"last {identifier} message was {seconds_since} seconds ago"
-
- if seconds_since > warning_threshold:
- print(f"WARN: {reason}")
- sys.exit(1)
-
- print(f"OK: {reason}")
- sys.exit(0)
-
-
-if __name__ == "__main__":
- try:
- main()
- except Exception as e:
- print(f"UNKNOWN: {e}")
- sys.exit(3)
diff --git a/roles/nagios_server/files/nagios/plugins/check_dig_ssl b/roles/nagios_server/files/nagios/plugins/check_dig_ssl
deleted file mode 100644
index 7b9bdffd1c..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_dig_ssl
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-#
-# 29-02-2012
-# Author: Christos Triantafyllidis
-#
-
-# Default values
-STUNNEL_EXEC=${STUNNEL_EXEC:-/usr/bin/stunnel}
-CHECK_DIG_EXEC=${CHECK_DIG_EXEC:-/usr/lib64/nagios/plugins/check_dig}
-lport=8443
-
-ARGS=""
-while getopts "L:H:p:l:T:a:A:w:c:t:v" options
-do
- case $options in
- L ) lport=$OPTARG ;;
- H ) host=$OPTARG ;;
- p ) port=$OPTARG ;;
- * ) ARGS="$ARGS -$options $OPTARG";;
- esac
-done
-
-# Create a ssl tunnel to the request socket
-TMPFILE=`mktemp /tmp/$(basename $0)_${host}_${port}_XXXXX`
-echo "
-client = yes
-verify = 0
-syslog = no
-pid=$TMPFILE.pid
-[${host}_${port}]
-accept=${lport}
-connect=${host}:${port}
-sslVersion = TLSv1.2
-" > $TMPFILE
-
-$STUNNEL_EXEC $TMPFILE
-
-# Use check_dig via the stunnel
-$CHECK_DIG_EXEC -H localhost -p ${lport} $ARGS
-e_status=$?
-
-# cleanup
-kill -9 `cat $TMPFILE.pid`
-rm -f $TMPFILE $TMPFILE.pid
-exit $e_status
diff --git a/roles/nagios_server/files/nagios/plugins/check_email_delivery_epn b/roles/nagios_server/files/nagios/plugins/check_email_delivery_epn
deleted file mode 100644
index a097f20988..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_email_delivery_epn
+++ /dev/null
@@ -1,472 +0,0 @@
-#!/usr/bin/perl
-use strict;
-my $VERSION = '0.6.2';
-my $COPYRIGHT = 'Copyright (C) 2005-2008 Jonathan Buhacoff ';
-my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
-my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
-
-# look for required modules
-exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long/);
-
-# get options from command line
-Getopt::Long::Configure("bundling");
-my $verbose = 0;
-my $help = "";
-my $help_usage = "";
-my $show_version = "";
-my $host = "";
-my $smtp_server = "";
-my $smtp_port = "";
-my $imap_server = "";
-my $smtp_username = "";
-my $smtp_password = "";
-my $smtp_tls = "";
-my $imap_port = "";
-my $imap_username = "";
-my $imap_password = "";
-my $username = "";
-my $password = "";
-my $ssl = "";
-my $imap_ssl = "";
-my $mailto = "";
-my $mailfrom = "";
-my @header = ();
-my $body = "";
-my $warnstr = "";
-my $critstr = "";
-my $waitstr = "";
-my $delay_warn = 95;
-my $delay_crit = 300;
-my $smtp_warn = 15;
-my $smtp_crit = 30;
-my $imap_warn = 15;
-my $imap_crit = 30;
-my $timeout = "";
-my @alert_plugins = ();
-my $imap_interval = 5;
-my $imap_retries = 5;
-my @plugins = ();
-my @token_formats = ();
-my $tokenfile = "";
-my $default_crit = 30;
-my $default_warn = 15;
-my $default_wait = 5;
-my $default_timeout = 60;
-#my $libexec = "/usr/local/nagios/libexec";
-my $libexec = "/usr/lib64/nagios/plugins";
-my $ok;
-$ok = Getopt::Long::GetOptions(
- "V|version"=>\$show_version,
- "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
- "w|warning=s"=>\$warnstr,"c|critical=s"=>\$critstr, "t|timeout=s"=>\$timeout,
- "libexec=s"=>\$libexec,
- # plugin settings
- "p|plugin=s"=>\@plugins, "T|token=s"=>\@token_formats,
- "A|alert=i"=>\@alert_plugins,
- "F|file=s"=>\$tokenfile,
- # common settings
- "H|hostname=s"=>\$host,
- "U|username=s"=>\$username,"P|password=s"=>\$password,
- # smtp settings
- "smtp-server=s"=>\$smtp_server,"smtp-port=i"=>\$smtp_port,
- "mailto=s"=>\$mailto, "mailfrom=s",\$mailfrom,
- "header=s"=>\@header, "body=s"=>\$body,
- # smtp-tls settings
- "smtptls!"=>\$smtp_tls,
- "smtp-username=s"=>\$smtp_username,"smtp-password=s"=>\$smtp_password,
- # delay settings
- "wait=s"=>\$waitstr,
- # imap settings
- "imap-server=s"=>\$imap_server,"imap-port=i"=>\$imap_port,
- "imap-username=s"=>\$imap_username,"imap-password=s"=>\$imap_password,
- "imap-check-interval=i"=>\$imap_interval,"imap-retries=i"=>\$imap_retries,
- "imapssl!"=>\$imap_ssl,
- );
-
-if( $show_version ) {
- print "$VERSION\n";
- if( $verbose ) {
- print "Warning threshold: $delay_warn seconds\n";
- print "Critical threshold: $delay_crit seconds\n";
- print "Default wait: $default_wait seconds\n";
- print "Default timeout: $default_timeout seconds\n";
- }
- exit $status{UNKNOWN};
-}
-
-if( $help ) {
- exec "perldoc", $0 or print "Try `perldoc $0`\n";
- exit $status{UNKNOWN};
-}
-
-if( $host ) {
- $smtp_server = $host if $smtp_server eq "";
- $imap_server = $host if $imap_server eq "";
-}
-
-if( $username ) {
- $smtp_username = $username if $smtp_username eq "";
- $imap_username = $username if $imap_username eq "";
-}
-
-if( $password ) {
- $smtp_password = $password if $smtp_password eq "";
- $imap_password = $password if $imap_password eq "";
-}
-
-if( $ssl ) {
- $imap_ssl = $ssl if $imap_ssl eq "";
- $smtp_tls = $ssl if $smtp_tls eq "";
-}
-
-if( $help_usage
- ||
- (
- scalar(@plugins) == 0
- &&
- (
- $smtp_server eq "" || $mailto eq "" || $mailfrom eq ""
- || $imap_server eq "" || $username eq "" || $password eq ""
- )
- )
- ) {
- print "Usage 1: $0 -H host \n\t".
- "--mailto recipient\@your.net --mailfrom sender\@your.net --body 'message' \n\t".
- "--username username --password password \n\t".
- "[-w ] [-c ]\n\t" .
- "[--imap-check-interval ] [--imap-retries ]\n";
- print "Usage 2: $0 \n\t".
- "-p 'first plugin command with %TOKEN1% embedded' \n\t".
- "-p 'second plugin command with %TOKEN1% embedded' \n\t".
- "[-w ,] [-c ,] \n";
- exit $status{UNKNOWN};
-}
-
-# determine thresholds
-my @warning_times = split(",", $warnstr);
-my @critical_times = split(",", $critstr);
-my @alarm_times = split(",", $timeout);
-my @wait_times = split(",", $waitstr);
-my ($dw,$sw,$rw) = split(",", $warnstr);
-my ($dc,$sc,$rc) = split(",", $critstr);
-my ($wait) = split(",", $waitstr);
-$delay_warn = $dw if defined $dw and $dw ne "";
-$smtp_warn = $sw if defined $sw and $sw ne "";
-$imap_warn = $rw if defined $rw and $rw ne "";
-$delay_crit = $dc if defined $dc and $dc ne "";
-$smtp_crit = $sc if defined $sc and $sc ne "";
-$imap_crit = $rc if defined $rc and $rc ne "";
-my $smtp_thresholds = "";
-$smtp_thresholds .= "-w $smtp_warn " if defined $smtp_warn and $smtp_warn ne "";
-$smtp_thresholds .= "-c $smtp_crit " if defined $smtp_crit and $smtp_crit ne "";
-my $imap_thresholds = "";
-$imap_thresholds .= "-w $imap_warn " if defined $imap_warn and $imap_warn ne "";
-$imap_thresholds .= "-c $imap_crit " if defined $imap_crit and $imap_crit ne "";
-$imap_thresholds .= "--imap-check-interval $imap_interval " if defined $imap_interval and $imap_interval ne "";
-$imap_thresholds .= "--imap-retries $imap_retries " if defined $imap_retries and $imap_retries ne "";
-if( scalar(@alarm_times) == 1 ) {
- $default_timeout = shift(@alarm_times);
-}
-
-# determine which other options to include
-my $smtp_options = "";
-$smtp_options .= "-H $smtp_server " if defined $smtp_server and $smtp_server ne "";
-$smtp_options .= "-p $smtp_port " if defined $smtp_port and $smtp_port ne "";
-$smtp_options .= "--tls " if defined $smtp_tls and $smtp_tls;
-$smtp_options .= "-U $username " if defined $smtp_username and $smtp_username ne "";
-$smtp_options .= "-P $password " if defined $smtp_password and $smtp_password ne "";
-$smtp_options .= "--mailto $mailto " if defined $mailto and $mailto ne "";
-$smtp_options .= "--mailfrom $mailfrom " if defined $mailfrom and $mailfrom ne "";
-my $imap_options = "";
-$imap_options .= "-H $imap_server " if defined $imap_server and $imap_server ne "";
-$imap_options .= "-p $imap_port " if defined $imap_port and $imap_port ne "";
-$imap_options .= "-U $username " if defined $imap_username and $imap_username ne "";
-$imap_options .= "-P $password " if defined $imap_password and $imap_password ne "";
-$imap_options .= "--ssl " if defined $imap_ssl and $imap_ssl;
-
-# create the report object
-my $report = new PluginReport;
-my @report_plugins = (); # populated later with either (smtp,imap) or (plugin1,plugin2,...)
-my $time_start; # initialized later with time the work actually starts
-
-# create token formats for use with the plugins
-my @alpha = qw/a b c d e f g h i j k l m n o p q r s t u v w x y z/;
-my @numeric = qw/0 1 2 3 4 5 6 7 8 9/;
-my @hex = qw/0 1 2 3 4 5 6 7 8 9 a b c d e f/;
-my @pgp_even = qw/aardvark absurd accrue acme adrift adult afflict ahead aimless Algol allow alone ammo ancient apple artist assume Athens atlas Aztec baboon backfield backward banjo beaming bedlamp beehive beeswax befriend Belfast berserk billiard bison blackjack blockade blowtorch bluebird bombast bookshelf brackish breadline breakup brickyard briefcase Burbank button buzzard cement chairlift chatter checkup chisel choking chopper Christmas clamshell classic classroom cleanup clockwork cobra commence concert cowbell crackdown cranky crowfoot crucial crumpled crusade cubic dashboard deadbolt deckhand dogsled dragnet drainage dreadful drifter dropper drumbeat drunken Dupont dwelling eating edict egghead eightball endorse endow enlist erase escape exceed eyeglass eyetooth facial fallout flagpole flatfoot flytrap fracture framework freedom frighten gazelle Geiger glitter glucose goggles goldfish gremlin guidance hamlet highchair hockey indoors indulge inverse involve island jawbone keyboard kickoff kiwi klaxon locale lockup merit minnow miser Mohawk mural music necklace Neptune newborn nightbird Oakland obtuse offload optic orca payday peachy pheasant physique playhouse Pluto preclude prefer preshrunk printer prowler pupil puppy python quadrant quiver quota ragtime ratchet rebirth reform regain reindeer rematch repay retouch revenge reward rhythm ribcage ringbolt robust rocker ruffled sailboat sawdust scallion scenic scorecard Scotland seabird select sentence shadow shamrock showgirl skullcap skydive slingshot slowdown snapline snapshot snowcap snowslide solo southward soybean spaniel spearhead spellbind spheroid spigot spindle spyglass stagehand stagnate stairway standard stapler steamship sterling stockman stopwatch stormy sugar surmount suspense sweatband swelter tactics talon tapeworm tempest tiger tissue tonic topmost tracker transit trauma treadmill Trojan trouble tumor tunnel tycoon uncut unearth unwind uproot upset upshot vapor village virus Vulcan waffle wallet watchword wayside willow woodlark Zulu/;
-my @pgp_odd = qw/adroitness adviser aftermath aggregate alkali almighty amulet amusement antenna applicant Apollo armistice article asteroid Atlantic atmosphere autopsy Babylon backwater barbecue belowground bifocals bodyguard bookseller borderline bottomless Bradbury bravado Brazilian breakaway Burlington businessman butterfat Camelot candidate cannonball Capricorn caravan caretaker celebrate cellulose certify chambermaid Cherokee Chicago clergyman coherence combustion commando company component concurrent confidence conformist congregate consensus consulting corporate corrosion councilman crossover crucifix cumbersome customer Dakota decadence December decimal designing detector detergent determine dictator dinosaur direction disable disbelief disruptive distortion document embezzle enchanting enrollment enterprise equation equipment escapade Eskimo everyday examine existence exodus fascinate filament finicky forever fortitude frequency gadgetry Galveston getaway glossary gossamer graduate gravity guitarist hamburger Hamilton handiwork hazardous headwaters hemisphere hesitate hideaway holiness hurricane hydraulic impartial impetus inception indigo inertia infancy inferno informant insincere insurgent integrate intention inventive Istanbul Jamaica Jupiter leprosy letterhead liberty maritime matchmaker maverick Medusa megaton microscope microwave midsummer millionaire miracle misnomer molasses molecule Montana monument mosquito narrative nebula newsletter Norwegian October Ohio onlooker opulent Orlando outfielder Pacific pandemic Pandora paperweight paragon paragraph paramount passenger pedigree Pegasus penetrate perceptive performance pharmacy phonetic photograph pioneer pocketful politeness positive potato processor provincial proximate puberty publisher pyramid quantity racketeer rebellion recipe recover repellent replica reproduce resistor responsive retraction retrieval retrospect revenue revival revolver sandalwood sardonic Saturday savagery scavenger sensation sociable souvenir specialist speculate stethoscope stupendous supportive surrender suspicious sympathy tambourine telephone therapist tobacco tolerance tomorrow torpedo tradition travesty trombonist truncated typewriter ultimate undaunted underfoot unicorn unify universe unravel upcoming vacancy vagabond vertigo Virginia visitor vocalist voyager warranty Waterloo whimsical Wichita Wilmington Wyoming yesteryear Yucatan/;
-my %formats = (
- 'a' => sub { pick_random(@alpha) },
- 'n' => sub { pick_random(@numeric) },
- 'c' => sub { pick_random(@alpha,@numeric) },
- 'h' => sub { pick_random(@hex) },
- 'U' => sub { time },
- 'X' => sub { pick_random(@pgp_even) },
- 'Y' => sub { pick_random(@pgp_odd) },
-);
-if( scalar(@plugins) ) {
- # scan the plugin commands for use of tokens to count how many we need
- my $token_count = 0;
- foreach my $p (@plugins) {
- my @matches = sort ($p =~ m/%TOKEN(\d+)%/g);
- my $max = pop @matches;
- $token_count = $max if defined($max) && $max > $token_count;
- }
- # create the tokens
- my @tokens = ();
- foreach my $t (1..$token_count) {
- my $format = shift @token_formats;
- $format = "U-X-Y" unless $format;
- my @format_characters = split(//, $format);
- my $token = "";
- foreach my $c (@format_characters) {
- if( defined $formats{$c} ) {
- $token .= &{$formats{$c}};
- }
- else {
- $token .= $c;
- }
- }
- push @tokens, $token;
- }
- # substitute the tokens into each plugin command
- foreach my $p (@plugins) {
- foreach my $t (1..$token_count) {
- my $token = $tokens[$t-1];
- $p =~ s/%TOKEN$t%/$token/g;
- }
- }
- # mark plugins that are allowed to generate alerts. default behavior is to alert for all plugins.
- my %alert_plugins = ();
- if( scalar(@alert_plugins) > 0 ) {
- %alert_plugins = map { $_ => 1 } @alert_plugins;
- }
- else {
- %alert_plugins = map { $_ => 1 } (1..scalar(@plugins));
- }
- # run each plugin and store its output in a report
- $time_start = time;
- my $i = 0;
- foreach my $p( @plugins ) {
- $i++;
- my $plugin_timeout = shift(@alarm_times) || $default_timeout;
- # run the plugin
- eval {
- local $SIG{ALRM} = sub { die "exceeded timeout $plugin_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
- alarm $plugin_timeout;
- my $output = `$p`;
- chomp $output;
- if( $output !~ m/OK|WARNING|CRITICAL/ ) {
- print "EMAIL DELIVERY UNKNOWN - plugin $i error: $output\n";
- print "Plugin $i: $p\n" if $verbose;
- # record tokens in a file if option is enabled
- record_tokens($tokenfile,\@tokens,$time_start,undef,'UNKNOWN',$i,$output) if $tokenfile;
- exit $status{UNKNOWN};
- }
- if( $output =~ m/CRITICAL/ && $alert_plugins{$i} ) {
- print "EMAIL DELIVERY CRITICAL - plugin $i failed: $output\n";
- print "Plugin $i: $p" if $verbose;
- # record tokens in a file if option is enabled
- record_tokens($tokenfile,\@tokens,$time_start,undef,'CRITICAL',$i,$output) if $tokenfile;
- exit $status{CRITICAL};
- }
- if( $output =~ m/WARNING/ && $alert_plugins{$i} ) {
- print "EMAIL DELIVERY WARNING - plugin $i warning: $output\n";
- print "Plugin $i: $p\n" if $verbose;
- # record tokens in a file if option is enabled
- record_tokens($tokenfile,\@tokens,$time_start,undef,'WARNING',$i,$output) if $tokenfile;
- exit $status{WARNING};
- }
- $report->{"plugin".$i} = $output;
- alarm 0;
- };
- if( $@ && $alert_plugins{$i} ) {
- print "EMAIL DELIVERY CRITICAL - Could not run plugin $i: $@\n";
- print "Plugin $i: $p\n" if $verbose;
- exit $status{CRITICAL};
- }
- # if this wasn't the last plugin, wait before continuing
- if( $i < scalar(@plugins) ) {
- my $wait = shift(@wait_times) || $default_wait;
- sleep $wait;
- }
- # compatibility with the "not using plugins" method... pretend to calculate the total round trip time (the delay) using data from the plugins ...
- $report->{max} = 0;
- $report->{delay} = 0;
- }
- # register the list of reports
- foreach my $r ( 1..scalar(@plugins)) {
- push @report_plugins, "plugin".$r;
- }
- # record tokens in a file if option is enabled
- my $tmp_long_report = join(", ", map { "$_: $report->{$_}" } @report_plugins ) if $tokenfile;
- record_tokens($tokenfile,\@tokens,$time_start,time,'OK',scalar(@plugins),$tmp_long_report) if $tokenfile;
-}
-else {
- # not using plugins.
- $time_start = time;
-
- # send email via SMTP
- my $id = $time_start; # XXX should include localhost name maybe or some random number in case the same mailbox is used for multiple delivery tests
-
- my $smtp_plugin = "$libexec/check_smtp_send";
- $smtp_plugin = "$libexec/check_smtp_send.pl" unless -e $smtp_plugin;
- my $smtp_timeout = shift(@alarm_times) || $default_timeout;
- eval {
- local $SIG{ALRM} = sub { die "exceeded timeout $smtp_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
- alarm $smtp_timeout;
- my $smtp = `$smtp_plugin $smtp_options --header 'Subject: Nagios Message SMTP $smtp_server ID $id.' --body 'Nagios Email Delivery Plugin\n$body' $smtp_thresholds`;
- if( $smtp !~ m/OK|WARNING|CRITICAL/ ) {
- print "EMAIL DELIVERY UNKNOWN - smtp unknown: $smtp\n";
- exit $status{UNKNOWN};
- }
- if( $smtp =~ m/CRITICAL/ ) {
- print "EMAIL DELIVERY CRITICAL - smtp failed: $smtp\n";
- exit $status{CRITICAL};
- }
- chomp $smtp;
- $report->{smtp} = $smtp;
- alarm 0;
- };
- if( $@ ) {
- print "EMAIL DELIVERY CRITICAL - Could not connect to SMTP server $smtp_server: $@\n";
- exit $status{CRITICAL};
- }
-
- # wait before checking the delivery
- $wait = shift(@wait_times) || $default_wait;
- sleep $wait;
-
- # check email via IMAP
- my $imap_plugin = "$libexec/check_imap_receive";
- $imap_plugin = "$libexec/check_imap_receive.pl" unless -e $imap_plugin;
- my $imap_timeout = shift(@alarm_times) || $default_timeout;
- eval {
- local $SIG{ALRM} = sub { die "exceeded timeout $imap_timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
- alarm $imap_timeout;
- my $imap = `$imap_plugin $imap_options -s SUBJECT -s 'Nagios Message SMTP $smtp_server ID' --capture-max 'Nagios Message SMTP $smtp_server ID (\\d+)' --nodelete-captured $imap_thresholds`;
- if( $imap !~ m/OK|WARNING|CRITICAL/ ) {
- print "EMAIL DELIVERY UNKNOWN - imap unknown: $imap\n";
- exit $status{UNKNOWN};
- }
- if( $imap =~ m/CRITICAL/ ) {
- print "EMAIL DELIVERY CRITICAL - imap failed: $imap\n";
- exit $status{CRITICAL};
- }
- if( $imap =~ m/ (\d+) max/ ) {
- my $last_received = $1;
- $report->{max} = $1;
- my $delay = time - $last_received;
- $report->{delay} = $delay;
- }
- chomp $imap;
- $report->{imap} = $imap;
- alarm 0;
- };
- if( $@ ) {
- print "EMAIL DELIVERY CRITICAL - Could not connect to IMAP server $imap_server: $@\n";
- exit $status{CRITICAL};
- }
- # register the list of reports
- push @report_plugins, ("smtp","imap");
-}
-
-
-# calculate elapsed time and issue warnings
-my $time_end = time;
-my $elapsedtime = $time_end - $time_start;
-$report->{seconds} = $elapsedtime;
-
-my @warning = ();
-my @critical = ();
-
-push @warning, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_warn );
-push @critical, "most recent received $report->{delay} seconds ago" if( defined($report->{delay}) && $report->{delay} > $delay_crit );
-push @warning, "no emails found" if( !defined($report->{delay}) );
-
-# print report and exit with known status
-my $short_report = $report->text(qw/seconds delay/);
-my $long_report = join("", map { "$_: $report->{$_}\n" } @report_plugins );
-if( scalar @critical ) {
- my $alerts = join(", ", @critical);
- print "EMAIL DELIVERY CRITICAL - $alerts; $short_report\n";
- print $long_report if $verbose;
- exit $status{CRITICAL};
-}
-if( scalar @warning ) {
- my $alerts = join(", ", @warning);
- print "EMAIL DELIVERY WARNING - $alerts; $short_report\n";
- print $long_report if $verbose;
- exit $status{WARNING};
-}
-print "EMAIL DELIVERY OK - $short_report\n";
-print $long_report if $verbose;
-exit $status{OK};
-
-# utility to load required modules. exits if unable to load one or more of the modules.
-sub load_modules {
- my @missing_modules = ();
- foreach( @_ ) {
- eval "require $_";
- push @missing_modules, $_ if $@;
- }
- if( @missing_modules ) {
- print "Missing perl modules: @missing_modules\n";
- return 0;
- }
- return 1;
-}
-
-# returns one random character from a set of characters
-sub pick_random {
- my @set = @_;
- my $size = scalar @set;
- my $string = $set[int(rand($size))];
- return $string;
-}
-
-# appens tokens and times to a tab-separated value file
-sub record_tokens {
- my ($tokenfile,$tokens,$time_start,$time_end,$status,$plugin_num,$output) = @_;
- if( $tokenfile ) {
- my @tokens = @$tokens;
- $time_end = "" unless defined $time_end;
- $status = "" unless defined $status;
- $plugin_num = "" unless defined $plugin_num;
- $output = "" unless defined $output;
- print "saving ".scalar(@tokens)." tokens into $tokenfile\n" if $verbose;
- open(TOKENFILE,">>$tokenfile");
- foreach(@tokens) {
- print TOKENFILE "$_\t$time_start\t$time_end\t$status\t$plugin_num\t$output\n";
- }
- close(TOKENFILE);
- }
-}
-
-# NAME
-# PluginReport
-# SYNOPSIS
-# $report = new PluginReport;
-# $report->{label1} = "value1";
-# $report->{label2} = "value2";
-# print $report->text(qw/label1 label2/);
-package PluginReport;
-
-sub new {
- my ($proto,%p) = @_;
- my $class = ref($proto) || $proto;
- my $self = bless {}, $class;
- $self->{$_} = $p{$_} foreach keys %p;
- return $self;
-}
-
-sub text {
- my ($self,@labels) = @_;
- my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
- my $text = join(", ", @report);
- return $text;
-}
-
-package main;
-1;
-
diff --git a/roles/nagios_server/files/nagios/plugins/check_fcomm_queue b/roles/nagios_server/files/nagios/plugins/check_fcomm_queue
deleted file mode 100644
index ff494662c7..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_fcomm_queue
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/python
-from __future__ import print_function
-from builtins import str
-import sys
-
-try:
- import retask.queue
-
- queue = retask.queue.Queue('fedora-packages')
- queue.connect()
-
- items = queue.length
- if items > 500:
- print("CRITICAL: %i tasks in fcomm queue" % items)
- sys.exit(2)
- elif items > 250:
- print("WARNING: %i tasks in fcomm queue" % items)
- sys.exit(1)
- else:
- print("OK: %i tasks in fcomm queue" % items)
- sys.exit(0)
-
-except Exception as e:
- print("UNKNOWN:", str(e))
- sys.exit(3)
diff --git a/roles/nagios_server/files/nagios/plugins/check_haproxy_conns.py b/roles/nagios_server/files/nagios/plugins/check_haproxy_conns.py
deleted file mode 100755
index 177658aa5f..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_haproxy_conns.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/python3
-""" Nagios check for haproxy over-subscription.
-
-fedmsg-gateway is the primary concern as it can eat up a ton of simultaneous
-connections.
-
-:Author: Ralph Bean
-"""
-
-import socket
-import sys
-
-
-def _numeric(value):
- """ Type casting utility """
- try:
- return int(value)
- except ValueError:
- try:
- return float(value)
- except ValueError:
- return value
-
-
-def query(sockname):
- """ Read stats from the haproxy socket and return a dict """
- sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- sock.connect(sockname)
- send_string = 'show info\n'
- sock.send(send_string.encode())
- try:
- response = sock.recv(2048).strip().decode()
- lines = response.split('\n')
- data = dict(map(str.strip, line.split(':')) for line in lines)
- data = {k:_numeric(v) for (k, v) in data.items()}
- return data
- except Exception as err:
- print(str(err))
- finally:
- sock.close()
-
- return None
-
-
-def nagios_check(data):
- """ Print warnings and return nagios exit codes. """
- current = data['CurrConns']
- maxconn = data['Maxconn']
- percent = 100 * float(current) / float(maxconn)
- details = "%.2f%% subscribed. %i current of %i maxconn." % (
- percent, current, maxconn,
- )
-
- if percent < 50:
- print("HAPROXY SUBS OK: " + details)
- return 0
-
- if percent < 75:
- print("HAPROXY SUBS WARN: " + details)
- return 1
-
- if percent <= 100:
- print("HAPROXY SUBS CRIT: " + details)
- return 2
-
- print("HAPROXY SUBS UNKNOWN: " + details)
- return 3
-
-
-if __name__ == '__main__':
- try:
- data = query(sockname="/var/run/haproxy-stat")
- except Exception as err:
- print("HAPROXY SUBS UNKNOWN: " + str(err))
- sys.exit(3)
- sys.exit(nagios_check(data))
diff --git a/roles/nagios_server/files/nagios/plugins/check_imap_receive_epn b/roles/nagios_server/files/nagios/plugins/check_imap_receive_epn
deleted file mode 100644
index d490cd006f..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_imap_receive_epn
+++ /dev/null
@@ -1,387 +0,0 @@
-#!/usr/bin/perl
-use strict;
-my $VERSION = '0.6.0';
-my $COPYRIGHT = 'Copyright (C) 2005-2008 Jonathan Buhacoff ';
-my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
-my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
-
-# look for required modules
-exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Mail::IMAPClient/);
-
-# get options from command line
-Getopt::Long::Configure("bundling");
-my $verbose = 0;
-my $help = "";
-my $help_usage = "";
-my $show_version = "";
-my $imap_server = "";
-my $default_imap_port = "143";
-my $default_imap_ssl_port = "993";
-my $imap_port = "";
-my $username = "";
-my $password = "";
-my $mailbox = "INBOX";
-my @search = ();
-my $search_critical_min = 1;
-my $capture_max = "";
-my $capture_min = "";
-my $delete = 1;
-my $no_delete_captured = "";
-my $warntime = 15;
-my $criticaltime = 30;
-my $timeout = 60;
-my $interval = 5;
-my $max_retries = 10;
-my $download = "";
-my $download_max = "";
-my $ssl = 0;
-my $tls = 0;
-my $ok;
-$ok = Getopt::Long::GetOptions(
- "V|version"=>\$show_version,
- "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
- "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
- # imap settings
- "H|hostname=s"=>\$imap_server,"p|port=i"=>\$imap_port,
- "U|username=s"=>\$username,"P|password=s"=>\$password, "m|mailbox=s"=>\$mailbox,
- "imap-check-interval=i"=>\$interval,"imap-retries=i"=>\$max_retries,
- "ssl!"=>\$ssl, "tls!"=>\$tls,
- # search settings
- "s|search=s"=>\@search,
- "search-critical-min=i"=>\$search_critical_min,
- "capture-max=s"=>\$capture_max, "capture-min=s"=>\$capture_min,
- "delete!"=>\$delete, "nodelete-captured"=>\$no_delete_captured,
- "download!"=>\$download, "download_max=i"=>\$download_max,
- );
-
-if( $show_version ) {
- print "$VERSION\n";
- if( $verbose ) {
- print "Default warning threshold: $warntime seconds\n";
- print "Default critical threshold: $criticaltime seconds\n";
- print "Default timeout: $timeout seconds\n";
- }
- exit $status{UNKNOWN};
-}
-
-if( $help ) {
- exec "perldoc", $0 or print "Try `perldoc $0`\n";
- exit $status{UNKNOWN};
-}
-
-my @required_module = ();
-push @required_module, 'IO::Socket::SSL' if ($ssl or $tls);
-push @required_module, 'Email::Simple' if ($download);
-exit $status{UNKNOWN} unless load_modules(@required_module);
-
-if( $help_usage
- ||
- ( $imap_server eq "" || $username eq "" || $password eq "" || scalar(@search)==0 )
- ) {
- print "Usage: $0 -H host [-p port] -U username -P password -s HEADER -s X-Nagios -s 'ID: 1234.' [-w ] [-c ] [--imap-check-interval ] [--imap-retries ]\n";
- exit $status{UNKNOWN};
-}
-
-# initialize
-my $report = new PluginReport;
-my $time_start = time;
-
-# connect to IMAP server
-my $imap;
-eval {
- local $SIG{ALRM} = sub { die "exceeded timeout $timeout seconds\n" }; # NB: \n required, see `perldoc -f alarm`
- alarm $timeout;
-
- if( $ssl ) {
- $imap_port = $default_imap_ssl_port unless $imap_port;
- my $socket = IO::Socket::SSL->new("$imap_server:$imap_port");
- die IO::Socket::SSL::errstr() unless $socket;
- $socket->autoflush(1);
- $imap = Mail::IMAPClient->new(Socket=>$socket, Debug => 0 );
- $imap->State(Mail::IMAPClient->Connected);
- $imap->_read_line() if "$Mail::IMAPClient::VERSION" le "2.2.9"; # necessary to remove the server's "ready" line from the input buffer for old versions of Mail::IMAPClient. Using string comparison for the version check because the numeric didn't work on Darwin and for Mail::IMAPClient the next version is 2.3.0 and then 3.00 so string comparison works
- $imap->User($username);
- $imap->Password($password);
- $imap->login() or die "$@";
- }
- elsif( $tls ) {
- # XXX THIS PART IS NOT DONE YET ... NEED TO OPEN A REGULAR IMAP CONNECTION, THEN ISSUE THE "STARTTLS" COMMAND MANUALLY, SWITCHING THE SOCKET TO IO::SOCKET::SSL, AND THEN GIVING IT BACK TO MAIL::IMAPCLIENT ...
- $imap_port = $default_imap_port unless $imap_port;
- $imap = Mail::IMAPClient->new(Debug => 0 );
- $imap->Server("$imap_server:$imap_port");
- $imap->User($username);
- $imap->Password($password);
- $imap->connect() or die "$@";
- }
- else {
- $imap_port = $default_imap_port unless $imap_port;
- $imap = Mail::IMAPClient->new(Debug => 0 );
- $imap->Server("$imap_server:$imap_port");
- $imap->User($username);
- $imap->Password($password);
- $imap->connect() or die "$@";
- }
-
- alarm 0;
-};
-if( $@ ) {
- chomp $@;
- print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
- exit $status{CRITICAL};
-}
-unless( $imap ) {
- print "IMAP RECEIVE CRITICAL - Could not connect to $imap_server port $imap_port: $@\n";
- exit $status{CRITICAL};
-}
-my $time_connected = time;
-
-# select a mailbox
-unless( $imap->select($mailbox) ) {
- print "IMAP RECEIVE CRITICAL - Could not select $mailbox: $@ $!\n";
- $imap->logout();
- exit $status{CRITICAL};
-}
-
-
-# search for messages
-my $tries = 0;
-my @msgs;
-until( scalar(@msgs) != 0 || $tries >= $max_retries ) {
- eval {
- $imap->select( $mailbox );
- # if download flag is on, we download recent messages and search ourselves
- if( $download ) {
- @msgs = download_and_search($imap,@search);
- }
- else {
- @msgs = $imap->search(@search);
- die "Invalid search parameters: $@" if $@;
- }
- };
- if( $@ ) {
- chomp $@;
- print "Cannot search messages: $@\n";
- $imap->close();
- $imap->logout();
- exit $status{UNKNOWN};
- }
- $report->{found} = scalar(@msgs);
- $tries++;
- sleep $interval unless (scalar(@msgs) != 0 || $tries >= $max_retries);
-}
-
-sub download_and_search {
- my ($imap,@search) = @_;
- my $ims = new ImapMessageSearch;
- $ims->querytokens(@search);
- my @found = ();
- @msgs = $imap->messages or die "Cannot list messages: $@\n";
- @msgs = @msgs[0..$download_max-1] if $download_max;
- foreach my $m (@msgs) {
- my $message = $imap->message_string($m);
- push @found, $m if $ims->match($message);
- }
- return @found;
-}
-
-
-
-# capture data in messages
-my $captured_max_id = "";
-my $captured_min_id = "";
-if( $capture_max || $capture_min ) {
- my $max = undef;
- my $min = undef;
- my %captured = ();
- for (my $i=0;$i < scalar(@msgs); $i++) {
- my $message = $imap->message_string($msgs[$i]);
- if( $message =~ m/$capture_max/ ) {
- if( !defined($max) || $1 > $max ) {
- $captured{ $i } = 1;
- $max = $1;
- $captured_max_id = $msgs[$i];
- }
- }
- if( $message =~ m/$capture_min/ ) {
- if( !defined($min) || $1 < $min ) {
- $captured{ $i } = 1;
- $min = $1;
- $captured_min_id = $msgs[$i];
- }
- }
- print $message if $verbose > 1;
- }
- $report->{captured} = scalar keys %captured;
- $report->{max} = $max if defined $max;
- $report->{min} = $min if defined $min;
-}
-
-# delete messages
-if( $delete ) {
- my $deleted = 0;
- for (my $i=0;$i < scalar(@msgs); $i++) {
- next if ($no_delete_captured && ($captured_max_id eq $msgs[$i]));
- next if ($no_delete_captured && ($captured_min_id eq $msgs[$i]));
- $imap->delete_message($msgs[$i]);
- $deleted++;
- }
- $report->{deleted} = $deleted;
- $imap->expunge() if $deleted;
-}
-
-# deselect the mailbox
-$imap->close();
-
-# disconnect from IMAP server
-$imap->logout();
-
-# calculate elapsed time and issue warnings
-my $time_end = time;
-my $elapsedtime = $time_end - $time_start;
-$report->{seconds} = $elapsedtime;
-
-my @warning = ();
-my @critical = ();
-
-push @warning, "no messages" if( scalar(@msgs) == 0 );
-push @critical, "found less than $search_critical_min" if ( scalar(@msgs) < $search_critical_min );
-push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime );
-push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime );
-
-# print report and exit with known status
-my $short_report = $report->text(qw/seconds found captured max min deleted/);
-if( scalar @critical ) {
- my $crit_alerts = join(", ", @critical);
- print "IMAP RECEIVE CRITICAL - $crit_alerts; $short_report\n";
- exit $status{CRITICAL};
-}
-if( scalar @warning ) {
- my $warn_alerts = join(", ", @warning);
- print "IMAP RECEIVE WARNING - $warn_alerts; $short_report\n";
- exit $status{WARNING};
-}
-print "IMAP RECEIVE OK - $short_report\n";
-exit $status{OK};
-
-
-# utility to load required modules. exits if unable to load one or more of the modules.
-sub load_modules {
- my @missing_modules = ();
- foreach( @_ ) {
- eval "require $_";
- push @missing_modules, $_ if $@;
- }
- if( @missing_modules ) {
- print "Missing perl modules: @missing_modules\n";
- return 0;
- }
- return 1;
-}
-
-
-# NAME
-# PluginReport
-# SYNOPSIS
-# $report = new PluginReport;
-# $report->{label1} = "value1";
-# $report->{label2} = "value2";
-# print $report->text(qw/label1 label2/);
-package PluginReport;
-
-sub new {
- my ($proto,%p) = @_;
- my $class = ref($proto) || $proto;
- my $self = bless {}, $class;
- $self->{$_} = $p{$_} foreach keys %p;
- return $self;
-}
-
-sub text {
- my ($self,@labels) = @_;
- my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
- my $text = join(", ", @report);
- return $text;
-}
-
-package ImapMessageSearch;
-
-require Email::Simple;
-
-sub new {
- my ($proto,%p) = @_;
- my $class = ref($proto) || $proto;
- my $self = bless {}, $class;
- $self->{querystring} = [];
- $self->{querytokens} = [];
- $self->{queryfnlist} = [];
- $self->{mimemessage} = undef;
- $self->{$_} = $p{$_} foreach keys %p;
- return $self;
-}
-
-sub querystring {
- my ($self,$string) = @_;
- $self->{querystring} = $string;
- return $self->querytokens( parseimapsearch($string) );
-}
-
-sub querytokens {
- my ($self,@tokens) = @_;
- $self->{querytokens} = [@tokens];
- $self->{queryfnlist} = [create_search_expressions(@search)];
- return $self;
-}
-
-sub match {
- my ($self,$message_string) = @_;
- my $message_mime = Email::Simple->new($message_string);
- return $self->matchmime($message_mime);
-}
-
-sub matchmime {
- my ($self,$message_mime) = @_;
- my $match = 1;
- foreach my $x (@{$self->{queryfnlist}}) {
- $match = $match and $x->($message_mime);
- }
- return $match;
-}
-
-# this should probably become its own Perl module... see also Net::IMAP::Server::Command::Search
-sub create_search_expressions {
- my (@search) = @_;
- return () unless scalar(@search);
- my $token = shift @search;
- if( $token eq 'TEXT' ) {
- my $value = shift @search;
- return (sub {shift->as_string =~ /\Q$value\E/i},create_search_expressions(@search));
- }
- if( $token eq 'BODY' ) {
- my $value = shift @search;
- return (sub {shift->body =~ /\Q$value\E/i},create_search_expressions(@search));
- }
- if( $token eq 'SUBJECT' ) {
- my $value = shift @search;
- return (sub {shift->header('Subject') =~ /\Q$value\E/i},create_search_expressions(@search));
- }
- if( $token eq 'HEADER' ) {
- my $name = shift @search;
- my $value = shift @search;
- return (sub {shift->header($name) =~ /\Q$value\E/i},create_search_expressions(@search));
- }
- if( $token eq 'NOT' ) {
- my @exp = create_search_expressions(@search);
- my $next = shift @exp;
- return (sub { ! $next->(@_) }, @exp);
- }
- if( $token eq 'OR' ) {
- my @exp = create_search_expressions(@search);
- my $next1 = shift @exp;
- my $next2 = shift @exp;
- return (sub { $next1->(@_) or $next2->(@_) }, @exp);
- }
-}
-
-package main;
-1;
-
diff --git a/roles/nagios_server/files/nagios/plugins/check_ipmi b/roles/nagios_server/files/nagios/plugins/check_ipmi
deleted file mode 100755
index f85397e1f8..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_ipmi
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/python
-# mmcgrath#redhat.com
-# Aug 08 2007
-# License: GPL
-from optparse import OptionParser
-import commands
-import sys
-
-parser = OptionParser(version='0.1')
-parser.add_option('-t', '--temperature',
- dest = 'temp',
- default = False,
- action = 'store_true',
- help = 'Check Temperatures')
-parser.add_option('-f', '--fans',
- dest = 'fans',
- default = False,
- action = 'store_true',
- help = 'Check Fans')
-
-
-
-(opts, args) = parser.parse_args()
-
-class ipmiValue:
- def __init__(self, param='', value='', status=''):
- self.param = param
- try:
- self.value = (int(value.split(' ')[0], 10) * 9) / 5 + 32
- except ValueError:
- self.value = value
- self.status = status
-
-class ipmi:
- def __init__(self):
- self.rawOutput = commands.getstatusoutput('/usr/bin/ipmitool sdr')[1].split('\n')
- self.sdr = []
- for i in self.rawOutput:
- try:
- param = i.split('|')[0].strip()
- value = i.split('|')[1].strip()
- status = i.split('|')[2].strip()
- self.sdr.append(ipmiValue(param, value, status))
- except IndexError:
- print "ERROR - Invalid output from ipmi tool (is it installed? /usr/bin/ipmitool)"
- sys.exit(3)
-
- def temps(self):
- ''' Return Known Temperatures '''
- temps = []
- for i in self.sdr:
- if i.param.find('Temp') != -1 and i.status.find('ns') == -1:
- temps.append(i)
- return temps
-
- def fans(self):
- ''' Return Known Fan Speeds '''
- temps = []
- for i in self.sdr:
- if i.param.find('FAN') != -1 and i.status.find('ns') == -1:
- temps.append(i)
- return temps
-
-str = False
-exitCode = 0
-if opts.temp:
- ok=True
- str='Temps (F)'
- i = ipmi()
- for temp in i.temps():
- str = '%s:%s' % (str, temp.value)
- if temp.status != 'ok':
- ok=temp.status
- if ok:
- str = str + ' OK!'
- else:
- str = str + ' %s' % ok
- exitCode = 2
-
-if opts.fans:
- ok=True
- str='Fans (RPM)'
- i = ipmi()
- for fan in i.fans():
- str = '%s:%s' % (str, fan.value)
- if fan.status != 'ok':
- ok=fan.status
- if ok:
- str = str + ' OK!'
- else:
- str = str + ' %s' % ok
- exitCode = 2
-
-if str:
- print str
- sys.exit(0)
-else:
- print 'Please see -h for help'
- sys.exit(2)
diff --git a/roles/nagios_server/files/nagios/plugins/check_koji_wellness.py b/roles/nagios_server/files/nagios/plugins/check_koji_wellness.py
deleted file mode 100755
index 08a576bb6a..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_koji_wellness.py
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python
-import sys
-import re
-
-import requests
-
-koji_host = sys.argv[1]
-try:
- koji_pkg = sys.argv[2]
-except IndexError:
- koji_pkg = 'koji'
-
-NAGIOS = {
- 'OK': 0,
- 'WARN': 1,
- 'CRIT': 2
-}
-
-TARGETS = {
- 'web': 'https://%s/koji/' % koji_host,
- 'hub': 'https://%s/kojihub/' % koji_host,
- 'pkg': 'https://%s/packages/%s/' % (koji_host, koji_pkg)
-}
-
-
-def do_request(url, method='GET', headers=None, body=None):
- try:
- res = getattr(requests, method.lower())(url, headers=headers, data=body)
- except requests.exceptions.ConnectionError as e:
- return (500, e.message)
- return (res.status_code, res.text)
-
-
-def check_web():
- url = TARGETS['web']
- (status_code, data) = do_request(url)
- if status_code != 200:
- return (NAGIOS['CRIT'], 'Unable to access "%s"' % url)
- if not re.search(r'', data):
- return (NAGIOS['WARN'], 'Unable to match content from "%s"' % url)
- return (NAGIOS['OK'], '')
-
-
-def check_hub(method='system.listMethods'):
- url = TARGETS['hub']
- xmlrpc = '''
-
- %s
-
- ''' % method
- headers = {
- 'Content-Type': 'text/xml'
- }
- (status_code, data) = do_request(url, method='POST', headers=headers, body=xmlrpc)
- if status_code != 200:
- return (NAGIOS['CRIT'], 'Unable to access "%s"' % url)
- if len(re.findall(r'[a-zA-Z0-9\._]+', data)) == 0:
- return (NAGIOS['WARN'], 'Unable to parse content from "%s"' % url)
- return (NAGIOS['OK'], None)
-
-
-def check_pkg():
- url = TARGETS['pkg']
- (status_code, data) = do_request(url)
- if status_code != 200:
- return (NAGIOS['CRIT'], 'Unable to access "%s"' % url)
- if len(re.findall(r'
[0-9.\/]+', data)) == 0:
- return (NAGIOS['WARN'], 'Unable to match content from "%s"' % url)
- return (NAGIOS['OK'], None)
-
-
-def main():
- ok = NAGIOS['OK']
- for (code, msg) in (check_web(), check_hub(), check_pkg()):
- if code != ok:
- return (code, msg)
- return (ok, None)
-
-
-if __name__ == '__main__':
- (code, reason) = main()
- if code != NAGIOS['OK']:
- sys.stderr.write('%s\n' % reason)
- else:
- sys.stdout.write('All checks passed.\n')
- sys.exit(code)
diff --git a/roles/nagios_server/files/nagios/plugins/check_lock b/roles/nagios_server/files/nagios/plugins/check_lock
deleted file mode 100755
index 6ed259f4f5..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_lock
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/python
-
-from __future__ import print_function
-import fcntl
-import sys
-
-try:
- f = open('/mnt/koji/.nagios_test', 'r')
- f.close()
- f = open('/mnt/koji/.nagios_test', 'w')
-except IOError as e:
- print(e)
- print("Could not create file")
- sys.exit(2)
-
-fcntl.flock(f, fcntl.LOCK_EX)
-f.close()
-print("File Locked Successfully")
-sys.exit(0)
diff --git a/roles/nagios_server/files/nagios/plugins/check_lock_file_age b/roles/nagios_server/files/nagios/plugins/check_lock_file_age
deleted file mode 100755
index f5abaa9e11..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_lock_file_age
+++ /dev/null
@@ -1,123 +0,0 @@
-#! /usr/bin/perl -w
-
-# check_lock_file_age.pl Copyright (C) 2010 Ricky Elrod
-#
-# Fork of check_file_age.pl
-#
-# Checks a lock 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/lib64/nagios/plugins";
-use utils qw (%ERRORS &print_revision &support);
-
-sub print_help ();
-sub print_usage ();
-
-my ($opt_c, $opt_f, $opt_w, $opt_h, $opt_V);
-my ($result, $message, $age, $size, $st);
-
-$PROGNAME="check_lock_file_age";
-
-$opt_w = 1;
-$opt_c = 5;
-$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,
- "c=f" => \$opt_c, "critical-age=f" => \$opt_c);
-
-if ($opt_V) {
- print_revision($PROGNAME, '1.4.14');
- exit $ERRORS{'OK'};
-}
-
-if ($opt_h) {
- print_help();
- exit $ERRORS{'OK'};
-}
-
-if (($opt_c and $opt_w) and ($opt_c < $opt_w)) {
- print "Warning time must be less than Critical time.\n";
- exit $ERRORS{'UNKNOWN'};
-}
-
-$opt_f = shift unless ($opt_f);
-
-if (! $opt_f) {
- print "LOCK_FILE_AGE UNKNOWN: No file specified\n";
- exit $ERRORS{'UNKNOWN'};
-}
-
-# Check that file exists (can be directory or link)
-unless (-e $opt_f) {
- print "LOCK_FILE_AGE OK: File not found (Lock file removed) - $opt_f\n";
- exit $ERRORS{'OK'};
-}
-
-$st = File::stat::stat($opt_f);
-$age = time - $st->mtime;
-
-$result = 'OK';
-
-# Convert minutes to seconds
-if($opt_c) { $opt_c *= 60; }
-if($opt_w) { $opt_w *= 60; }
-
-if ($opt_c and $age > $opt_c) {
- $result = 'CRITICAL';
-}
-elsif ($opt_w and $age > $opt_w) {
- $result = 'WARNING';
-}
-
-# If the age is higher than 2 minutes, convert seconds -> minutes
-# If it's higher than a day, use days.
-# Just a nicety, to make people not have to do math ;)
-if($age > 86400) { $age = int(($age/86400))." days"; }
-elsif($age > 120) { $age = int(($age/60))." minutes"; }
-else { $age = "$age seconds"; }
-
-print "LOCK_FILE_AGE $result: $opt_f is $age old.\n";
-exit $ERRORS{$result};
-
-sub print_usage () {
- print "Usage:\n";
- print " $PROGNAME [-w ] [-c ] -f \n";
- print " $PROGNAME [-h | --help]\n";
- print " $PROGNAME [-V | --version]\n";
-}
-
-sub print_help () {
- print_revision($PROGNAME, '1.4.14');
- print "Copyright (c) 2010 Ricky Elrod\n\n";
- print_usage();
- print "\n";
- print " File must be no more than this many minutes old (default: warn 1m, crit 5m)\n";
- print "\n";
- support();
-}
diff --git a/roles/nagios_server/files/nagios/plugins/check_postfix_queue b/roles/nagios_server/files/nagios/plugins/check_postfix_queue
deleted file mode 100755
index 44ab4445f9..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_postfix_queue
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-#
-# 19-07-2010
-# Author: Cherwin Nooitmeer
-#
-
-# exit codes
-e_ok=0
-e_warning=1
-e_critical=2
-e_unknown=3
-
-# regular expression that matches queue IDs (e.g. D71EF7AC80F8)
-queue_id='^[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]'
-
-usage="Invalid command line usage"
-
-if [ -z $1 ]; then
- echo $usage
- exit $e_unknown
-fi
-
-while getopts ":w:c:" options
-do
- case $options in
- w ) warning=$OPTARG ;;
- c ) critical=$OPTARG ;;
- * ) echo $usage
- exit $e_unknown ;;
- esac
-done
-
-# determine queue size
-qsize=$(mailq | egrep -c $queue_id)
-if [ -z $qsize ]
-then
- exit $e_unknown
-fi
-
-if [ $qsize -ge $critical ]; then
- retval=$e_critical
-elif [ $qsize -ge $warning ]; then
- retval=$e_warning
-elif [ $qsize -lt $warning ]; then
- retval=$e_ok
-fi
-
-echo "$qsize mail(s) in queue | mail_queue=$qsize"
-exit $retval
diff --git a/roles/nagios_server/files/nagios/plugins/check_raid.py b/roles/nagios_server/files/nagios/plugins/check_raid.py
deleted file mode 100755
index b53cc48939..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_raid.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/python2
-#
-# very simple python script to parse out /proc/mdstat
-# and give results for nagios to monitor
-#
-
-import sys
-import string
-
-devices = []
-
-try:
- mdstat = string.split(open('/proc/mdstat').read(), '\n')
-except IOError:
- # seems we have no software raid on this machines
- sys.exit(0)
-
-error = ""
-i = 0
-for line in mdstat:
- if line[0:2] == 'md':
- device = string.split(line)[0]
- devices.append(device)
- status = string.split(mdstat[i+1])[3]
- if string.count(status, "_"):
- # see if we can figure out what's going on
- err = string.split(mdstat[i+2])
- msg = "device=%s status=%s" % (device, status)
- if len(err) > 0:
- msg = msg + " rebuild=%s" % err[0]
-
- if not error:
- error = msg
- else:
- error = error + ", " + msg
- i = i + 1
-
-if not error:
- print "DEVICES %s OK" % " ".join(devices)
- sys.exit(0)
-
-else:
- print error
- sys.exit(2)
-
diff --git a/roles/nagios_server/files/nagios/plugins/check_readonly_fs b/roles/nagios_server/files/nagios/plugins/check_readonly_fs
deleted file mode 100755
index cd2b1973a7..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_readonly_fs
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-# check_readonlyfs: Check for readonly filesystems
-# Copyright (C) 2010 Davide Madrisan
-
-PROGNAME=`/bin/basename $0`
-PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
-REVISION=`echo '$Revision: 1 $' | sed -e 's/[^0-9.]//g'`
-
-. $PROGPATH/utils.sh
-
-print_usage() {
- echo "Usage: $PROGNAME --no-network-fs"
- echo "Usage: $PROGNAME --help"
- echo "Usage: $PROGNAME --version"
-}
-
-print_help() {
- print_revision $PROGNAME $REVISION
- echo ""
- print_usage
- echo ""
- echo "readonly filesystem checker plugin for Nagios"
- echo ""
- support
-}
-
-NETFS=1
-
-# Grab the command line arguments
-
-exitstatus=$STATE_WARNING #default
-
-while test -n "$1"; do
- case "$1" in
- --help|-h)
- print_help
- exit $STATE_OK
- ;;
- --version|-V)
- print_revision $PROGNAME $REVISION
- exit $STATE_OK
- ;;
- --no-network-fs|-n)
- NETFS="0"
- ;;
- *)
- echo "Unknown argument: $1"
- print_usage
- exit $STATE_UNKNOWN
- ;;
- esac
- shift
-done
-
-[ -r /proc/mounts ] || { echo "cannot read /proc/mounts!"; exit $STATE_UNKNOWN; }
-
-nerr=0
-IFS_SAVE="$IFS"
-
-rofs_list=""
-while read dev mp fs mopt ignore; do
- [ "$dev" = none ] && continue
- case $fs in binfmt_misc|devpts|iso9660|proc|selinuxfs|rpc_pipefs|sysfs|tmpfs|usbfs)
- continue ;;
- esac
- case $fs in autofs|nfs|nfs4|smbfs)
- # skip the network filesystems
- [ "$NETFS" = 0 ] && continue ;;
- esac
-
- IFS=","; set -- $mopt; IFS="$IFS_SAVE"
- while :; do
- case "$1" in
- ro) rofs_list="$rofs_list $mp"; nerr=$(( $nerr + 1 )) ;;
- "") shift; break ;;
- esac
- shift
- done
-done < <(LC_ALL=C /bin/cat /proc/mounts 2>/dev/null)
-
-[ $nerr -eq 0 ] && { echo OK; exit $STATE_OK; } || echo "$rofs_list: read only fs"
-
-exit $exitstatus
diff --git a/roles/nagios_server/files/nagios/plugins/check_smtp_send_epn b/roles/nagios_server/files/nagios/plugins/check_smtp_send_epn
deleted file mode 100644
index db0354ce6e..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_smtp_send_epn
+++ /dev/null
@@ -1,290 +0,0 @@
-#!/usr/bin/perl
-use strict;
-my $VERSION = '0.4.5';
-my $COPYRIGHT = 'Copyright (C) 2005-2008 Jonathan Buhacoff ';
-my $LICENSE = 'http://www.gnu.org/licenses/gpl.txt';
-my %status = ( 'OK' => 0, 'WARNING' => 1, 'CRITICAL' => 2, 'UNKNOWN' => 3 );
-
-# look for required modules
-exit $status{UNKNOWN} unless load_modules(qw/Getopt::Long Net::SMTP/);
-
-Getopt::Long::Configure("bundling");
-my $verbose = 0;
-my $help = "";
-my $help_usage = "";
-my $show_version = "";
-my $smtp_server = "";
-my $default_smtp_port = "25";
-my $default_smtp_ssl_port = "465";
-my $default_smtp_tls_port = "587";
-my $smtp_port = "";
-my @mailto = ();
-my $mailfrom = "";
-my @header = ();
-my $body = "";
-my $stdin = "";
-my $expect_response = "250";
-my $warntime = 15;
-my $criticaltime = 30;
-my $timeout = 60;
-my $tls = 0;
-my $ssl = 0;
-my $auth_method = undef;
-my $username = "";
-my $password = "";
-my $ok;
-$ok = Getopt::Long::GetOptions(
- "V|version"=>\$show_version,
- "v|verbose+"=>\$verbose,"h|help"=>\$help,"usage"=>\$help_usage,
- "w|warning=i"=>\$warntime,"c|critical=i"=>\$criticaltime,"t|timeout=i"=>\$timeout,
- # smtp settings
- "H|hostname=s"=>\$smtp_server,"p|port=i"=>\$smtp_port,
- "mailto=s"=>\@mailto, "mailfrom=s",\$mailfrom,
- "header=s"=>\@header, "body=s"=>\$body, "stdin"=>\$stdin,
- # SSL/TLS/auth options
- "tls!"=>\$tls, "ssl!"=>\$ssl, "auth=s"=>\$auth_method,
- "U|username=s"=>\$username,"P|password=s"=>\$password,
- # Server response
- "E|expect-response=s"=>\$expect_response,
- );
-
-if( $show_version ) {
- print "$VERSION\n";
- if( $verbose ) {
- print "Default warning threshold: $warntime seconds\n";
- print "Default critical threshold: $criticaltime seconds\n";
- print "Default timeout: $timeout seconds\n";
- }
- exit $status{UNKNOWN};
-}
-
-if( $help ) {
- exec "perldoc", $0 or print "Try `perldoc $0`\n";
- exit $status{UNKNOWN};
-}
-
-my @required_module = ();
-push @required_module, 'Net::SMTP::SSL' if $ssl;
-push @required_module, ('MIME::Base64','Authen::SASL') if $ssl && $username;
-push @required_module, 'Net::SMTP::TLS' if $tls;
-push @required_module, 'Net::SMTP_auth' if $auth_method;
-exit $status{UNKNOWN} unless load_modules(@required_module);
-
-
-# split up @mailto if commas were used instead of multiple options
-@mailto = split(/,/,join(',',@mailto));
-
-if( $help_usage ||
- (
- $smtp_server eq "" || scalar(@mailto)==0 || $mailfrom eq ""
- )
- ) {
- print "Usage: $0 -H host [-p port] --mailto recipient\@your.net [--mailto recipient2\@your.net ...] --mailfrom sender\@your.net --body 'some text' [-w ] [-c ]\n";
- exit $status{UNKNOWN};
-}
-
-# initialize
-my $report = new PluginReport;
-my $time_start = time;
-my $actual_response = undef;
-my @warning = ();
-my @critical = ();
-
-
-# connect to SMTP server
-# create the smtp handle using Net::SMTP, Net::SMTP::SSL, or Net::SMTP::TLS
-my $smtp;
-eval {
- if( $tls ) {
- $smtp_port = $default_smtp_tls_port unless $smtp_port;
- $smtp = Net::SMTP::TLS->new($smtp_server, Timeout=>$timeout, Port=>$smtp_port, User=>$username, Password=>$password);
- }
- elsif( $ssl ) {
- $smtp_port = $default_smtp_ssl_port unless $smtp_port;
- $smtp = Net::SMTP::SSL->new($smtp_server, Port => $smtp_port, Timeout=>$timeout,Debug=>0);
- if( $smtp && $username ) {
- $smtp->auth($username, $password);
- }
- }
- elsif( $auth_method ) {
- $smtp_port = $default_smtp_port unless $smtp_port;
- $smtp = Net::SMTP_auth->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>0);
- if( $smtp ) {
- $smtp->auth($auth_method, $username, $password);
- }
- }
- else {
- $smtp_port = $default_smtp_port unless $smtp_port;
- $smtp = Net::SMTP->new($smtp_server, Port=>$smtp_port, Timeout=>$timeout,Debug=>0);
- if( $smtp && $username ) {
- $smtp->auth($username, $password);
- }
- }
-};
-if( $@ ) {
- $@ =~ s/\n/ /g; # the error message can be multiline but we want our output to be just one line
- print "SMTP SEND CRITICAL - $@\n";
- exit $status{CRITICAL};
-}
-unless( $smtp ) {
- print "SMTP SEND CRITICAL - Could not connect to $smtp_server port $smtp_port\n";
- exit $status{CRITICAL};
-}
-my $time_connected = time;
-
-# add the monitored server's banner to the report
-if( $tls ) {
- $report->{banner} = "";
-}
-elsif( $ssl ) {
- $report->{banner} = $smtp->banner || "";
- chomp $report->{banner};
-}
-else {
- $report->{banner} = $smtp->banner || "";
- chomp $report->{banner};
-}
-
-
-# send email
-if( $stdin ) {
- $body = "";
- while() {
- $body .= $_;
- }
-}
-$smtp->mail($mailfrom);
-foreach( @mailto ) {
- # the two SMTP modules have different error reporting mechanisms:
- if( $tls ) {
- # Net::SMTP::TLS croaks when the recipient is rejected
- eval {
- $smtp->to($_);
- };
- if( $@ ) {
- print "SMTP SEND CRITICAL - Could not send to $_\n";
- exit $status{CRITICAL};
- }
- }
- else {
- # Net::SMTP returns false when the recipient is rejected
- my $to_returned = $smtp->to($_);
- if( !$to_returned ) {
- print "SMTP SEND CRITICAL - Could not send to $_\n";
- exit $status{CRITICAL};
- }
- }
-}
-
-# Net::SMTP::TLS doesn't implement code() so we need to wrap calls in eval to get our error messages
-
- # start data transfer (expect response 354)
- $smtp->data();
-
- # send data
- $smtp->datasend("To: ".join(", ",@mailto)."\n");
- $smtp->datasend("From: $mailfrom\n");
- foreach( @header ) {
- $smtp->datasend("$_\n");
- }
- $smtp->datasend("\n");
- $smtp->datasend($body);
- $smtp->datasend("\n");
-
-eval {
- # end data transfer (expect response 250)
- $smtp->dataend();
-};
-if( $@ ) {
- $actual_response = $tls ? get_tls_error($@) : $smtp->code();
-}
-else {
- $actual_response = $tls ? "250" : $smtp->code(); # no error means we got 250
-}
-
-eval {
- # disconnect from SMTP server (expect response 221)
- $smtp->quit();
-};
-if( $@ ) {
- push @warning, "Error while disconnecting from $smtp_server";
-}
-
-# calculate elapsed time and issue warnings
-my $time_end = time;
-my $elapsedtime = $time_end - $time_start;
-$report->{seconds} = $elapsedtime;
-
-push @warning, "connection time more than $warntime" if( $time_connected - $time_start > $warntime );
-push @critical, "connection time more than $criticaltime" if( $time_connected - $time_start > $criticaltime );
-push @critical, "response was $actual_response but expected $expect_response" if ( $actual_response ne $expect_response );
-
-# print report and exit with known status
-my $short_report = $report->text(qw/seconds/);
-my $long_report = join("", map { "$_: $report->{$_}\n" } qw/banner/ );
-if( scalar @critical ) {
- my $crit_alerts = join(", ", @critical);
- print "SMTP SEND CRITICAL - $crit_alerts; $short_report\n";
- print $long_report if $verbose;
- exit $status{CRITICAL};
-}
-if( scalar @warning ) {
- my $warn_alerts = join(", ", @warning);
- print "SMTP SEND WARNING - $warn_alerts; $short_report\n";
- print $long_report if $verbose;
- exit $status{WARNING};
-}
-print "SMTP SEND OK - $short_report\n";
-print $long_report if $verbose;
-exit $status{OK};
-
-
-# utility to load required modules. exits if unable to load one or more of the modules.
-sub load_modules {
- my @missing_modules = ();
- foreach( @_ ) {
- eval "require $_";
- push @missing_modules, $_ if $@;
- }
- if( @missing_modules ) {
- print "Missing perl modules: @missing_modules\n";
- return 0;
- }
- return 1;
-}
-
-# utility to extract error codes out of Net::SMTP::TLS croak messages
-sub get_tls_error {
- my ($errormsg) = @_;
- $errormsg =~ m/: (\d+) (.+)/;
- my $code = $1;
- return $code;
-}
-
-# NAME
-# PluginReport
-# SYNOPSIS
-# $report = new PluginReport;
-# $report->{label1} = "value1";
-# $report->{label2} = "value2";
-# print $report->text(qw/label1 label2/);
-package PluginReport;
-
-sub new {
- my ($proto,%p) = @_;
- my $class = ref($proto) || $proto;
- my $self = bless {}, $class;
- $self->{$_} = $p{$_} foreach keys %p;
- return $self;
-}
-
-sub text {
- my ($self,@labels) = @_;
- my @report = map { "$self->{$_} $_" } grep { defined $self->{$_} } @labels;
- my $text = join(", ", @report);
- return $text;
-}
-
-package main;
-1;
-
diff --git a/roles/nagios_server/files/nagios/plugins/check_systemd_units b/roles/nagios_server/files/nagios/plugins/check_systemd_units
deleted file mode 100755
index accdc9ab20..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_systemd_units
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-
-# Description : script to check the status of systemd units
-# if they failed, try to restart the service once !!
-
-# Author : Seddik Alaoui Ismaili
-# Version : 1.0
-
-
-# Exits code
-warning_exit="1"
-ok_exit="0"
-
-# Unit list
-unit_list=(pagure_ci
-pagure_ev
-pagure_fast_worker
-pagure_loadjson
-pagure_logcom
-pagure_medium_worker
-pagure_milter
-pagure_mirror
-pagure_slow_worker
-pagure_webhook
-pagure_worker
-pagure_mirror_project_in.timer)
-
-#Element's arrays
-failed_array=()
-active_array=()
-
-# Check units's status
- echo -e "here the lenght of array : ${#active_array[@]}"
-for element in ${unit_list[@]}; do
- status=$(systemctl status ${element} |grep -E "Active:" | awk '{ print $2 }')
- if [ $status == failed ]; then
- systemctl restart ${element} && active_array+=($element) || failed_array+=($element)
- fi
-done
-
-# check the lenght of array and print result/exit code for nagios
-if [ ${#failed_array[@]} -ne "0" ]; then
- echo -e "WARNING - Failed systemd units after restart : ${failed_array[@]}"
- exit ${warning_exit}
-elif [ ${#failed_array[@]} -eq "0" ]; then
- echo -e "OK - Systemd units are active"
- exit ${ok_exit}
-fi
diff --git a/roles/nagios_server/files/nagios/plugins/check_testcloud b/roles/nagios_server/files/nagios/plugins/check_testcloud
deleted file mode 100644
index 2b4ee9bcf8..0000000000
--- a/roles/nagios_server/files/nagios/plugins/check_testcloud
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-RUNNING_VMS=`testcloud instance list | grep -i 'running' | wc -l`
-CRITICAL=30
-WARNING=25
-
-
-if [ $RUNNING_VMS -gt $CRITICAL ]
-then
- echo "Testcloud: CRITICAL Number of VMs running: $RUNNING_VMS"
- exit 2
-elif [ $RUNNING_VMS -gt $WARNING ]
-then
- echo "Testcloud: WARNING Number of VMs running: $RUNNING_VMS"
- exit 1
-else
- echo "Testcloud: OK Number of VMs running: $RUNNING_VMS"
- exit 0
-fi
diff --git a/roles/nagios_server/files/nagios/plugins/restart_httpd b/roles/nagios_server/files/nagios/plugins/restart_httpd
deleted file mode 100755
index f461f45553..0000000000
--- a/roles/nagios_server/files/nagios/plugins/restart_httpd
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# Event handler script for restarting the web server on the local machine
-#
-# Note: This script will only restart the web server if the service is
-# retried 3 times (in a "soft" state) or if the web service somehow
-# manages to fall into a "hard" error state.
-#
-
-servicestate=$1
-servicestatetype=$2
-serviceattempt=$3
-remotehost=$4
-hostalias=$5
-servicedesc=$6
-servicestate=$7
-
-# What state is the HTTP service in?
-case "$servicestate" in
-OK)
- # The service just came back up, so don't do anything...
- ;;
-WARNING)
- # We don't really care about warning states, since the service is probably still running...
- ;;
-UNKNOWN)
- # We don't know what might be causing an unknown error, so don't do anything...
- ;;
-CRITICAL)
- # Aha! The HTTP service appears to have a problem - perhaps we should restart the server...
-
- # Is this a "soft" or a "hard" state?
- case "$servicestatetype" in
-
- # We're in a "soft" state, meaning that Nagios is in the middle of retrying the
- # check before it turns into a "hard" state and contacts get notified...
- SOFT)
-
- # What check attempt are we on? We don't want to restart the web server on the first
- # check, because it may just be a fluke!
- case "$serviceattempt" in
-
- # Wait until the check has been tried 2 times before reloading the web server.
- # If the check fails on the 4th time (after we restart the web server), the state
- # type will turn to "hard" and contacts will be notified of the problem.
- # Hopefully this will restart the web server successfully, so the 4th check will
- # result in a "soft" recovery. If that happens no one gets notified because we
- # fixed the problem!
- 2)
- echo -n "Restarting HTTP service (3rd soft critical state)..."
- # Call the init script to restart the HTTPD server
- echo "#fedora-noc $hostalias - Attempting to reload httpd. $servicedesc is $servicestate (2nd check)" | /usr/bin/nc -w 1 value01 5050
- /usr/lib64/nagios/plugins/check_nrpe -H $remotehost -c service_httpd_reload
- ;;
- esac
- ;;
-
- # The HTTP service somehow managed to turn into a hard error without getting fixed.
- # It should have been restarted by the code above, but for some reason it didn't.
- # Let's give it one last try, shall we?
- # Note: Contacts have already been notified of a problem with the service at this
- # point (unless you disabled notifications for this service)
- HARD)
- echo -n "Restarting HTTP service..."
- echo "#fedora-noc $hostalias - Attempting to reload httpd. $servicedesc is $servicestate" | /usr/bin/nc -w 1 value01 5050
- # Call the init script to restart the HTTPD server
- /usr/lib64/nagios/plugins/check_nrpe -H $remotehost -c service_httpd_restart
- ;;
- esac
- ;;
-esac
-exit 0
-
diff --git a/roles/nagios_server/files/nagios/plugins/restart_rsyslog b/roles/nagios_server/files/nagios/plugins/restart_rsyslog
deleted file mode 100755
index 2ece8a3e42..0000000000
--- a/roles/nagios_server/files/nagios/plugins/restart_rsyslog
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-#
-# Event handler script for restarting the rsyslog server on the local machine
-#
-# Note: This script will only restart the web server if the service is
-# retried 3 times (in a "soft" state) or if the web service somehow
-# manages to fall into a "hard" error state.
-#
-
-servicestate=$1
-servicestatetype=$2
-serviceattempt=$3
-remotehost=$4
-hostalias=$5
-servicedesc=$6
-servicestate=$7
-
-# What state is the HTTP service in?
-case "$servicestate" in
-OK)
- # The service just came back up, so don't do anything...
- ;;
-WARNING)
- # We don't really care about warning states, since the service is probably still running...
- ;;
-UNKNOWN)
- # We don't know what might be causing an unknown error, so don't do anything...
- ;;
-CRITICAL)
- # Aha! The rsyslog service appears to have a problem - perhaps we should restart the server...
-
- # Is this a "soft" or a "hard" state?
- case "$servicestatetype" in
-
- # We're in a "soft" state, meaning that Nagios is in the middle of retrying the
- # check before it turns into a "hard" state and contacts get notified...
- SOFT)
-
- # What check attempt are we on? We don't want to restart the web server on the first
- # check, because it may just be a fluke!
- case "$serviceattempt" in
-
- # Wait until the check has been tried 2 times before reloading the web server.
- # If the check fails on the 4th time (after we restart the web server), the state
- # type will turn to "hard" and contacts will be notified of the problem.
- # Hopefully this will restart the web server successfully, so the 4th check will
- # result in a "soft" recovery. If that happens no one gets notified because we
- # fixed the problem!
- 2)
- echo -n "Restarting rsyslog service (3rd soft critical state)..."
- # Call the init script to restart the rsyslog server
- echo "#fedora-noc $hostalias - Attempting to reload rsyslog. $servicedesc is $servicestate (2nd check)" | /usr/bin/nc -w 1 value01 5050
- /usr/lib64/nagios/plugins/check_nrpe -H $remotehost -c service_rsyslog_reload
- ;;
- esac
- ;;
-
- # The HTTP service somehow managed to turn into a hard error without getting fixed.
- # It should have been restarted by the code above, but for some reason it didn't.
- # Let's give it one last try, shall we?
- # Note: Contacts have already been notified of a problem with the service at this
- # point (unless you disabled notifications for this service)
- HARD)
- echo -n "Restarting rsyslog service..."
- echo "#fedora-noc $hostalias - Attempting to restart rsyslog. $servicedesc is $servicestate" | /usr/bin/nc -w 1 value01 5050
- # Call the init script to restart the HTTPD server
- /usr/lib64/nagios/plugins/check_nrpe -H $remotehost -c service_rsyslog_restart
- ;;
- esac
- ;;
-esac
-exit 0
-
diff --git a/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py b/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py
deleted file mode 100755
index d5c796a818..0000000000
--- a/roles/nagios_server/files/nagios/scripts/check_nagios_notifications.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/python3
-#
-# A script to read the Nagios status file and send email for notifications
-# off, but have recovered.
-#
-# Written by Athmane Madjoudj , 2011-11-15
-# based on tummy.com's work , 2010-11-16
-# Minimally ported to Python 3 by Adam Williamson , 2023-08-14
-# Released under the GPLv2.
-
-import re
-from smtplib import SMTP
-from email.mime.text import MIMEText
-from socket import gethostname
-
-# Settings
-debug = 0
-EMAIL_FROM = "nagios@fedoraproject.org"
-EMAIL_TO = "sysadmin-noc-members@fedoraproject.org"
-# EMAIL_TO="athmane@fedoraproject.org"
-nagios_status_file = "/var/spool/nagios/status.dat"
-
-
-class NagiosStatus:
- def __init__(self, filename):
- self.filename = filename
- self.hosts = {}
- self.load_status_file()
-
- def load_status_file(self):
- fp = open(self.filename, "r")
- while True:
- line = fp.readline()
- if not line:
- break
-
- m = re.match(r"^hoststatus\s+{\s*$", line)
- if m:
- if debug >= 2:
- print("START OF HOST")
- data = {"services": []}
- while True:
- line = fp.readline()
- if not line:
- break
- if debug >= 2:
- print("host: %s" % line.rstrip())
- m2 = re.match(r"^\s+([^=]+)=(\S.*)*$", line.rstrip())
- if not m2:
- break
- data[m2.group(1)] = m2.group(2)
- self.hosts[data["host_name"]] = data
- if debug >= 2:
- print("END OF HOST")
-
- m = re.match(r"^servicestatus\s+{\s*$", line)
- if m:
- if debug >= 2:
- print("START OF SERVICE")
- data = {}
- while True:
- line = fp.readline()
- if not line:
- break
- if debug >= 2:
- print("service: %s" % line.rstrip())
- m2 = re.match(r"^\s+([^=]+)=(.*)$", line.rstrip())
- if not m2:
- break
- data[m2.group(1)] = m2.group(2)
- self.hosts[data["host_name"]]["services"].append(data)
- if debug >= 2:
- print("END OF SERVICE")
-
-
-def main():
- status = NagiosStatus(nagios_status_file)
- output = ""
- for host in sorted(status.hosts.keys()):
- host = status.hosts[host]
- if host.get("notifications_enabled", None) == None:
- output += "Host %s has no notifications_enabled line \n" % host["host_name"]
- continue
-
- # are there any hard states that aren't 0 or 1?
- hard_states = [
- x
- for x in [int(x["last_hard_state"]) for x in host["services"]]
- if x not in [0, 1]
- ]
- need_newline = False
- if host["notifications_enabled"] == "0" and not hard_states:
- output += (
- "Host %s has notifications disabled and all services ok \n"
- % host["host_name"]
- )
- need_newline = True
-
- for service in host["services"]:
- if debug:
- print("%s@%s" % (service["check_command"], host["host_name"]))
- print(
- " notifications_enabled: %(notifications_enabled)s last_hard_state: %(last_hard_state)s"
- % service
- )
- if int(service["notifications_enabled"]) == 0 and int(
- service["last_hard_state"]
- ) in [0, 1]:
- output += (
- "Service %(check_command)s@%(host_name)s\n"
- " has notifications disabled, but is ok\n"
- ) % service
- need_newline = True
-
- if need_newline:
- output += "\n\n"
-
- if output.strip() != "":
- msg_body = (
- "List of notifications off for recovered hosts/services: \n\n" + output
- )
- msg = MIMEText(msg_body)
- msg["Subject"] = "Notifications status on %s" % gethostname()
- msg["From"] = EMAIL_FROM
- msg["To"] = EMAIL_TO
- smtp_conn = SMTP()
- smtp_conn.connect("localhost")
- smtp_conn.sendmail(EMAIL_FROM, EMAIL_TO, msg.as_string())
- smtp_conn.quit()
-
-
-if __name__ == "__main__":
- main()
diff --git a/roles/nagios_server/files/nagios/scripts/irc-colorize.py b/roles/nagios_server/files/nagios/scripts/irc-colorize.py
deleted file mode 100755
index 6a903fd341..0000000000
--- a/roles/nagios_server/files/nagios/scripts/irc-colorize.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/python3
-""" Reads a string from stdin and prints it to stdout with irc colors
-
-:license: LGPLv2+
-:author: Ralph Bean
-"""
-
-import sys
-
-mirc_colors = {
- "white": 0,
- "black": 1,
- "blue": 2,
- "green": 3,
- "red": 4,
- "brown": 5,
- "purple": 6,
- "orange": 7,
- "yellow": 8,
- "light green": 9,
- "teal": 10,
- "light cyan": 11,
- "light blue": 12,
- "pink": 13,
- "grey": 14,
- "light grey": 15,
-}
-
-mapping = {
- 'RECOVERY': 'green',
- 'OK': 'green',
- 'ACKNOWLEDGEMENT': 'yellow',
- 'UNKNOWN': 'purple',
- 'WARNING': 'teal',
- # 'red' probably makes the most sense here, but it behaved oddly
- 'PROBLEM': 'brown',
- 'CRITICAL': 'brown',
-}
-
-
-def markup(string, color):
- return "\x02\x03%i%s\x03\x02" % (mirc_colors[color], string)
-
-
-def colorize(word):
- suffix = ''
- if word.endswith(':'):
- word, suffix = word[:-1], word[-1]
-
- if word in mapping:
- word = markup(word, mapping[word])
-
- return word + suffix
-
-
-if __name__ == '__main__':
- lines = sys.stdin.readlines()
- for line in lines:
- print(" ".join([colorize(word) for word in line.strip().split()]))
diff --git a/roles/nagios_server/files/nagios/servicedeps/nrpe.cfg b/roles/nagios_server/files/nagios/servicedeps/nrpe.cfg
deleted file mode 100644
index 6143ecf01a..0000000000
--- a/roles/nagios_server/files/nagios/servicedeps/nrpe.cfg
+++ /dev/null
@@ -1,143 +0,0 @@
-#define servicedependency {
-# host_name hosted03
-# service_description nrpe
-# dependent_host_name hosted03
-# dependent_service_description Disk Space /srv, Disk Space /, Total Processes, Zombie Processes, Cron Daemon, Check Raid, Swap
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-
-#define servicedependency {
-# host_name hosted04
-# service_description nrpe
-# dependent_host_name hosted04
-# dependent_service_description Disk Space /srv, Disk Space /, Total Processes, Zombie Processes, Cron Daemon, Check Raid, Swap
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-#
-#define servicedependency {
-# host_name pkgdb01
-# service_description nrpe
-# dependent_host_name pkgdb01
-# dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-#
-#define servicedependency {
-# host_name pkgdb02
-# service_description nrpe
-# dependent_host_name pkgdb02
-# dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-#
-#define servicedependency {
-# host_name pkgdb01.stg
-# service_description nrpe
-# dependent_host_name pkgdb01.stg
-# dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-
-#define servicedependency {
-# host_name bapp02
-# service_description nrpe
-# dependent_host_name bapp02
-# dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-
-define servicedependency {
- host_name bastion02
- service_description nrpe
- dependent_host_name bastion02
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name bastion-vpn
- service_description nrpe
- dependent_host_name bastion-vpn
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name sundries01
- service_description nrpe
- dependent_host_name sundries01
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-# define servicedependency {
-# host_name sundries01.stg
-# service_description nrpe
-# dependent_host_name sundries01.stg
-# dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-# }
-
-define servicedependency {
- host_name sundries02
- service_description nrpe
- dependent_host_name sundries02
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name wiki01
- service_description nrpe
- dependent_host_name wiki01
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name wiki01.stg
- service_description nrpe
- dependent_host_name wiki01.stg
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name wiki02
- service_description nrpe
- dependent_host_name wiki02
- dependent_service_description Check Raid, Cron Daemon, Disk Space /, Swap, Total Processes, Zombie Processes
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-#define servicedependency {
-# host_name packages03
-# service_description packages-internal
-# dependent_host_name packages03
-# dependent_service_description packages-internal-bugstab
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
-#
-#define servicedependency {
-# host_name packages04
-# service_description packages-internal
-# dependent_host_name packages04
-# dependent_service_description packages-internal-bugstab
-# notification_failure_criteria w,c
-# execution_failure_criteria w,c
-#}
diff --git a/roles/nagios_server/files/nagios/servicedeps/websitedeps.cfg b/roles/nagios_server/files/nagios/servicedeps/websitedeps.cfg
deleted file mode 100644
index 8a97ba64aa..0000000000
--- a/roles/nagios_server/files/nagios/servicedeps/websitedeps.cfg
+++ /dev/null
@@ -1,72 +0,0 @@
-
-define servicedependency {
- host_name proxy03.rdu3.fedoraproject.org
- service_description https
- dependent_host_name proxy03.rdu3.fedoraproject.org
- dependent_service_description bodhi, elections, accounts, mirrors.fedoraproject.org - mirrorlist, mirrors.fedoraproject.org - publiclist, docs.fedoraproject.org
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 38.145.32.20-rdu3
- service_description https
- dependent_host_name 38.145.32.20-rdu3
- dependent_service_description bodhi, elections, docs.fedoraproject.org, mirrors.fedoraproject.org - mirrorlist, mirrors.fedoraproject.org - publiclist, fedoraproject.org, fedoraproject.org - wiki
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 152.19.134.142-ibiblio
- service_description https
- dependent_host_name 152.19.134.142-ibiblio
- dependent_service_description bodhi, elections, accounts, mirrors.fedoraproject.org - mirrorlist, mirrors.fedoraproject.org - publiclist, docs.fedoraproject.org
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 152.19.134.198-ibiblio
- service_description https
- dependent_host_name 152.19.134.198-ibiblio
- dependent_service_description bodhi, elections, accounts, mirrors.fedoraproject.org - mirrorlist, mirrors.fedoraproject.org - publiclist, docs.fedoraproject.org
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 85.236.55.6-internetx
- service_description https
- dependent_host_name 85.236.55.6-internetx
- dependent_service_description bodhi, elections, accounts, mirrors.fedoraproject.org - mirrorlist, mirrors.fedoraproject.org - publiclist, docs.fedoraproject.org
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 152.19.134.142-ibiblio
- service_description http
- dependent_host_name 152.19.134.142-ibiblio
- dependent_service_description fedoraproject.org, fedoraproject.org - wiki
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 152.19.134.198-ibiblio
- service_description http
- dependent_host_name 152.19.134.198-ibiblio
- dependent_service_description fedoraproject.org, fedoraproject.org - wiki
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
-
-define servicedependency {
- host_name 85.236.55.6-internetx
- service_description http
- dependent_host_name 85.236.55.6-internetx
- dependent_service_description fedoraproject.org, fedoraproject.org - wiki
- notification_failure_criteria w,c
- execution_failure_criteria w,c
-}
diff --git a/roles/nagios_server/files/nagios/servicegroups/bodhi.cfg b/roles/nagios_server/files/nagios/servicegroups/bodhi.cfg
deleted file mode 100644
index f6e999751c..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/bodhi.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-define servicegroup {
- servicegroup_name bodhi
- alias Bodhi
-}
diff --git a/roles/nagios_server/files/nagios/servicegroups/fas.cfg b/roles/nagios_server/files/nagios/servicegroups/fas.cfg
deleted file mode 100644
index aa6b9dbce2..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/fas.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-define servicegroup {
- servicegroup_name fas
- alias Fedora Account System
-
-}
diff --git a/roles/nagios_server/files/nagios/servicegroups/fp-wiki.cfg b/roles/nagios_server/files/nagios/servicegroups/fp-wiki.cfg
deleted file mode 100644
index 4bb48bcd6b..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/fp-wiki.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-define servicegroup {
- servicegroup_name fp-wiki
- alias Fedora Project Wiki
-}
-
-define servicegroup {
- servicegroup_name fp-wiki-non-cached
- alias Fedora Project Wiki
-
-}
-
diff --git a/roles/nagios_server/files/nagios/servicegroups/freemedia.cfg b/roles/nagios_server/files/nagios/servicegroups/freemedia.cfg
deleted file mode 100644
index e4b0ac1c28..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/freemedia.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-define servicegroup {
- servicegroup_name freemedia
- alias FreeMedia
-}
-
diff --git a/roles/nagios_server/files/nagios/servicegroups/ipa.cfg b/roles/nagios_server/files/nagios/servicegroups/ipa.cfg
deleted file mode 100644
index 1439a6049e..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/ipa.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-define servicegroup {
- servicegroup_name ipa
- alias IPA Servers
-}
diff --git a/roles/nagios_server/files/nagios/servicegroups/mirrorlist.cfg b/roles/nagios_server/files/nagios/servicegroups/mirrorlist.cfg
deleted file mode 100644
index 3e6a67a027..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/mirrorlist.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-define servicegroup {
- servicegroup_name mirrorlist
- alias Mirrorlist
-
-}
-
diff --git a/roles/nagios_server/files/nagios/servicegroups/rdu3-mgmt-http.cfg b/roles/nagios_server/files/nagios/servicegroups/rdu3-mgmt-http.cfg
deleted file mode 100644
index 3e9daa2cfa..0000000000
--- a/roles/nagios_server/files/nagios/servicegroups/rdu3-mgmt-http.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-define servicegroup {
- servicegroup_name mgmt-http
- alias mgmt interfaces on http
-}
-
-define servicegroup {
- servicegroup_name mgmt-https
- alias mgmt interfaces on https
-}
diff --git a/roles/nagios_server/files/nagios/servicegroups/template.cfg b/roles/nagios_server/files/nagios/servicegroups/template.cfg
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/roles/nagios_server/files/nagios/services/koschei.cfg b/roles/nagios_server/files/nagios/services/koschei.cfg
deleted file mode 100644
index 3930c8db6e..0000000000
--- a/roles/nagios_server/files/nagios/services/koschei.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# TODO: define Koschei backend services here
diff --git a/roles/nagios_server/files/nagios/services/nagios.cfg b/roles/nagios_server/files/nagios/services/nagios.cfg
deleted file mode 100644
index cfc629ad25..0000000000
--- a/roles/nagios_server/files/nagios/services/nagios.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-define service {
- host_name noc02.fedoraproject.org
- service_description Check Nagios
- check_command check_by_nrpe!check_nagios
- use criticaltemplate
-}
-
diff --git a/roles/nagios_server/files/nagios/services/ping-ipv6.cfg b/roles/nagios_server/files/nagios/services/ping-ipv6.cfg
deleted file mode 100644
index 000062216b..0000000000
--- a/roles/nagios_server/files/nagios/services/ping-ipv6.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
- define service {
- host_name ipv6-noc02.fedoraproject.org
- service_description ICMP-Ping6-check
- check_command check-host-alive6!fedorapeople.org!1500.0,20%!2500.0,80%
- use criticaltemplate
- }
diff --git a/roles/nagios_server/files/nagios/services/raid.cfg b/roles/nagios_server/files/nagios/services/raid.cfg
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/roles/nagios_server/files/nagios/services/rdu3_internal/fedora_messaging.cfg b/roles/nagios_server/files/nagios/services/rdu3_internal/fedora_messaging.cfg
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/roles/nagios_server/files/nagios/services/rdu3_internal/nrpe.cfg b/roles/nagios_server/files/nagios/services/rdu3_internal/nrpe.cfg
deleted file mode 100644
index 989806f282..0000000000
--- a/roles/nagios_server/files/nagios/services/rdu3_internal/nrpe.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-define service {
- host_name bastion01.rdu3.fedoraproject.org, sundries01.rdu3.fedoraproject.org, wiki01.rdu3.fedoraproject.org
- service_description nrpe
- check_command test_nrpe
- max_check_attempts 2
- check_interval 2
- use defaulttemplate
-}
diff --git a/roles/nagios_server/files/nagios/services/swap.cfg b/roles/nagios_server/files/nagios/services/swap.cfg
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/roles/nagios_server/files/nagios/services/templates.cfg b/roles/nagios_server/files/nagios/services/templates.cfg
deleted file mode 100644
index c10d8888a4..0000000000
--- a/roles/nagios_server/files/nagios/services/templates.cfg
+++ /dev/null
@@ -1,187 +0,0 @@
-###############################################################################
-###############################################################################
-#
-# SERVICE TEMPLATES
-#
-###############################################################################
-###############################################################################
-
-# Generic service definition template - This is NOT a real service, just a template!
-
-define service{
- name generic-service ; The 'name' of this service template
- active_checks_enabled 1 ; Active service checks are enabled
- passive_checks_enabled 1 ; Passive service checks are enabled/accepted
- parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
- obsess_over_service 1 ; We should obsess over this service (if necessary)
- check_freshness 0 ; Default is to NOT check service 'freshness'
- notifications_enabled 1 ; Service notifications are enabled
- event_handler_enabled 1 ; Service event handler is enabled
- flap_detection_enabled 1 ; Flap detection is enabled
- process_perf_data 1 ; Process performance data
- retain_status_information 1 ; Retain status information across program restarts
- retain_nonstatus_information 1 ; Retain non-status information across program restarts
- is_volatile 0 ; The service is not volatile
- check_period 24x7 ; The service can be checked at any time of the day
- max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
- check_interval 10 ; Check the service every 10 minutes under normal conditions
- retry_interval 2 ; Re-check the service every two minutes until a hard state can be determined
- contact_groups admins ; Notifications get sent out to everyone in the 'admins' group
- notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
- notification_interval 60 ; Re-notify about service problems every hour
- notification_period 24x7 ; Notifications can be sent out at any time
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
- }
-
-
-# Local service definition template - This is NOT a real service, just a template!
-
-define service{
- name local-service ; The name of this service template
- use generic-service ; Inherit default values from the generic-service definition
- max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state
- check_interval 5 ; Check the service every 5 minutes under normal conditions
- retry_interval 1 ; Re-check the service every minute until a hard state can be determined
- register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
- }
-
-
-
-define service {
- name criticaltemplate
- max_check_attempts 4
- check_interval 5
- retry_interval 1
- check_period 24x7
- notification_interval 15
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-
-define service {
- name defaulttemplate
- max_check_attempts 3
- check_interval 10
- retry_interval 1
- check_period 24x7
- notification_interval 15
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- name disktemplate
- max_check_attempts 3
- check_interval 30
- retry_interval 1
- check_period 24x7
- notification_interval 40
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- name builderdisktemplate
- max_check_attempts 12
- check_interval 30
- retry_interval 1
- check_period 24x7
- notification_interval 40
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- name lighttemplate
- max_check_attempts 3
- check_interval 480
- retry_interval 5
- check_period 12x7-USET
- notification_interval 490
- notification_period 12x7-USET
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- name websitetemplate
- max_check_attempts 3
- check_interval 5
- retry_interval 1
- check_period 24x7
- notification_interval 15
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- name internalwebsitetemplate
- max_check_attempts 3
- check_interval 5
- retry_interval 1
- check_period 24x7
- notification_interval 15
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- use defaulttemplate
- name passivetemplate
- active_checks_enabled 0
- passive_checks_enabled 1
- check_command check_dummy!0
- check_period 24x7
- check_freshness 0
-
- register 0
-}
-
-define service {
- name ppc-secondarytemplate
- max_check_attempts 3
- check_interval 10
- retry_interval 1
- check_period 24x7
- notification_interval 15
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
-
-define service {
- name retracetemplate
- max_check_attempts 3
- check_interval 10
- retry_interval 1
- check_period 24x7
- notification_interval 15
- notification_period 24x7
- notification_options w,u,c,r
- contact_groups fedora-sysadmin-ircbot
-
- register 0
-}
diff --git a/roles/nagios_server/files/selinux/Makefile b/roles/nagios_server/files/selinux/Makefile
deleted file mode 100644
index 9f2c724098..0000000000
--- a/roles/nagios_server/files/selinux/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-module:
- checkmodule -Mmo nagios_hostname.mod nagios_hostname.te
- semodule_package -o nagios_hostname.pp -m nagios_hostname.mod
- rm nagios_hostname.mod
diff --git a/roles/nagios_server/files/selinux/nagios_hostname.pp b/roles/nagios_server/files/selinux/nagios_hostname.pp
deleted file mode 100644
index 4064cf79d8..0000000000
Binary files a/roles/nagios_server/files/selinux/nagios_hostname.pp and /dev/null differ
diff --git a/roles/nagios_server/files/selinux/nagios_hostname.te b/roles/nagios_server/files/selinux/nagios_hostname.te
deleted file mode 100644
index a8029f453a..0000000000
--- a/roles/nagios_server/files/selinux/nagios_hostname.te
+++ /dev/null
@@ -1,11 +0,0 @@
-
-module nagios_hostname 1.0;
-
-require {
- type nagios_t;
- type hostname_exec_t;
- class file { read getattr open execute execute_no_trans };
-}
-
-#============= nagios_t ==============
-allow nagios_t hostname_exec_t:file { read getattr open execute execute_no_trans };
diff --git a/roles/nagios_server/files/selinux/nagios_nrpe.mod b/roles/nagios_server/files/selinux/nagios_nrpe.mod
deleted file mode 100644
index 80aff88beb..0000000000
Binary files a/roles/nagios_server/files/selinux/nagios_nrpe.mod and /dev/null differ
diff --git a/roles/nagios_server/files/selinux/nagios_nrpe.pp b/roles/nagios_server/files/selinux/nagios_nrpe.pp
deleted file mode 100644
index 857c18b557..0000000000
Binary files a/roles/nagios_server/files/selinux/nagios_nrpe.pp and /dev/null differ
diff --git a/roles/nagios_server/files/selinux/nagios_nrpe.te b/roles/nagios_server/files/selinux/nagios_nrpe.te
deleted file mode 100644
index 098dd49488..0000000000
--- a/roles/nagios_server/files/selinux/nagios_nrpe.te
+++ /dev/null
@@ -1,32 +0,0 @@
-module nagios_nrpe 1.0;
-
-require {
- type nagios_t;
- type nagios_checkdisk_plugin_t;
- type nagios_unconfined_plugin_t;
- type nrpe_t;
- type system_mail_t;
- class process { noatsecure rlimitinh siginh };
- class tcp_socket { read write };
-}
-
-#============= nagios_checkdisk_plugin_t ==============
-# src="nagios_checkdisk_plugin_t" tgt="nrpe_t" class="tcp_socket", perms="{ read write }"
-# comm="check_disk" exe="" path="socket:[270138836]"
-allow nagios_checkdisk_plugin_t nrpe_t:tcp_socket { read write };
-
-#============= nagios_t ==============
-# src="nagios_t" tgt="nagios_unconfined_plugin_t" class="process", perms="{ noatsecure rlimitinh siginh }"
-# comm="check_ping" exe="" path=""
-allow nagios_t nagios_unconfined_plugin_t:process { noatsecure rlimitinh siginh };
-# src="nagios_t" tgt="system_mail_t" class="process", perms="{ noatsecure rlimitinh siginh }"
-# comm="sendmail" exe="" path=""
-allow nagios_t system_mail_t:process { noatsecure rlimitinh siginh };
-
-#============= nrpe_t ==============
-# src="nrpe_t" tgt="nagios_checkdisk_plugin_t" class="process", perms="{ noatsecure rlimitinh siginh }"
-# comm="check_disk" exe="" path=""
-allow nrpe_t nagios_checkdisk_plugin_t:process { noatsecure rlimitinh siginh };
-# src="nrpe_t" tgt="nagios_unconfined_plugin_t" class="process", perms="{ noatsecure rlimitinh siginh }"
-# comm="check_swap" exe="" path=""
-allow nrpe_t nagios_unconfined_plugin_t:process { noatsecure rlimitinh siginh };
diff --git a/roles/nagios_server/handlers/main.yml b/roles/nagios_server/handlers/main.yml
deleted file mode 100644
index fa63196832..0000000000
--- a/roles/nagios_server/handlers/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- name: Restart nrpe
- service: name=nrpe state=restarted
diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml
deleted file mode 100644
index 2cd55822d6..0000000000
--- a/roles/nagios_server/tasks/main.yml
+++ /dev/null
@@ -1,78 +0,0 @@
-##
-## A playbook to set up a Nagios 4 server
-##
-
-## Setup the initial user and groups.
----
-
-- name: Stop and disable the nagios service
- service: name=nagios.service state=stopped enabled=no
- check_mode: no
- failed_when: false
- tags:
- - nagios_server
-
-- name: Remove nagios user
- user: name=nagios state=absent
- tags:
- - nagios_server
-
-- name: Remove nagios group
- group: name=nagios state=absent
- tags:
- - nagios_server
-
-## Remove the initial packages for the group. Leave some more generic ones like php
-- name: Remove nagios packages
- ansible.builtin.package:
- state: absent
- name:
- #- php
- - nagios.x86_64
- - nagios-selinux
- - nrpe-selinux
- - nagios-plugins
- - nagios-plugins-dig
- - nagios-plugins-disk
- - nagios-plugins-dns
- - nagios-plugins-dummy
- - nagios-plugins-file_age
- - nagios-plugins-http
- - nagios-plugins-load
- - nagios-plugins-nagios
- - nagios-plugins-nrpe
- - nagios-plugins-perl
- - nagios-plugins-pgsql
- - nagios-plugins-ping
- - nagios-plugins-procs
- - nagios-plugins-smtp
- - nagios-plugins-ssh
- - nagios-plugins-swap
- - nagios-plugins-tcp
- - nagios-plugins-users
- #- stunnel
- #- mod_auth_gssapi
- #- ipmitool
- tags:
- - nagios_server
-
-## Remove Nagios directories & files
-- name: Remove directories for Nagios
- ansible.builtin.file: dest={{item}} state=absent
- with_items:
- # homedir
- - /var/spool/nagios
- # the rest
- - /etc/nagios
- - /usr/lib64/nagios
- - /usr/local/share/nagios-policy
- # leftovers
- - /usr/local/bin/irc-colorize.py
- - /usr/local/bin/check_nagios_notifications.py
- - /etc/httpd/conf.d/nagios.conf
- - /etc/httpd/conf.d/0_nagios-external.conf
- - /usr/share/nagios/html/config.inc.php
- - /usr/local/bin/matrix-notify.sh
- tags:
- - nagios_server
-
diff --git a/roles/nagios_server/templates/httpd/0_nagios-external.conf.j2 b/roles/nagios_server/templates/httpd/0_nagios-external.conf.j2
deleted file mode 100644
index 4fb5b38850..0000000000
--- a/roles/nagios_server/templates/httpd/0_nagios-external.conf.j2
+++ /dev/null
@@ -1,20 +0,0 @@
-
- ServerName nagios-external.fedoraproject.org
- ProxyPass "/.well-known/acme-challenge" "http://certgetter01/.well-known/acme-challenge"
- Redirect permanent / https://nagios-external.fedoraproject.org/
-
-
-
- ServerName nagios-external.fedoraproject.org:443
-
- SSLEngine on
- SSLProtocol {{ ssl_protocols }}
- SSLCipherSuite {{ ssl_ciphers }}
- Header always add Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
-
- SSLCertificateFile /etc/pki/tls/certs/nagios-external.fedoraproject.org.cert
- SSLCertificateChainFile /etc/pki/tls/certs/nagios-external.fedoraproject.org.intermediate.cert
- SSLCertificateKeyFile /etc/pki/tls/private/nagios-external.fedoraproject.org.key
-
- ProxyPass "/.well-known/acme-challenge" "http://certgetter01/.well-known/acme-challenge"
-
diff --git a/roles/nagios_server/templates/httpd/nagios.conf.j2 b/roles/nagios_server/templates/httpd/nagios.conf.j2
deleted file mode 100644
index b4f6917925..0000000000
--- a/roles/nagios_server/templates/httpd/nagios.conf.j2
+++ /dev/null
@@ -1,63 +0,0 @@
-# Set up the script aliases
-ScriptAlias /nagios/cgi-bin/ /usr/lib64/nagios/cgi-bin/
-ScriptAlias /tac.cgi /usr/lib64/nagios/cgi-bin/tac.cgi
-
-Alias /robots.txt /var/www/robots.txt
-
-# Set up the authorization
-
-
- AuthName "Nagios GSSAPI Login"
-{% if datacenter != 'ibiblio' %}
- GssapiCredStore keytab:/etc/krb5.HTTP_nagios{{env_suffix}}.fedoraproject.org.keytab
- # This is off because Apache (and thus mod_auth_gssapi) doesn't know this is proxied over TLS
- GssapiSSLonly Off
-{% else %}
- GssapiCredStore keytab:/etc/krb5.HTTP_nagios-external{{env_suffix}}.fedoraproject.org.keytab
- GssapiSSLonly On
-{% endif %}
- GssapiLocalName on
- AuthType GSSAPI
-
- Require all granted
-
-
- Require valid-user
-
-
-
-
- Options ExecCGI
-
-
-
- Require valid-user
-
-
- Require valid-user
-
-
-
- SetHandler server-status
-{% if vars['nagios_location'] == 'external' %}
- Require ip 2600:2701:4000:5211:dead:beef:00fe:fed9
-{% else %}
- Require ip 10.16.163.10
-{% endif %}
- Require ip 127.0.0.1
- Require ip ::1
-
-
-RewriteEngine on
-RewriteRule ^/$ /nagios/ [R]
-
-# Spiders-gone-wild
-# These spiders may not follow robots.txt and will
-# hit admin sections which consume large amounts of CPU
-RewriteCond %{HTTP_USER_AGENT} "(Bytespider|ClaudeBot|Amazonbot|YandexBot|ChatGLM-Spider|GPTBot|Barkrowler|YisouSpider|MJ12bot)" [NC]
-RewriteRule .* - [F,L]
-
-Alias /nagios /usr/share/nagios/html/
-
- Options None
-
diff --git a/roles/nagios_server/templates/nagios/commands/postgres.cfg.j2 b/roles/nagios_server/templates/nagios/commands/postgres.cfg.j2
deleted file mode 100644
index 6a4a6217f7..0000000000
--- a/roles/nagios_server/templates/nagios/commands/postgres.cfg.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-# 'pgsql'
-define command{
- command_name check_pgsql
- command_line $USER1$/check_pgsql -H $HOSTADDRESS$ -d $ARG1$ -p '{{nagios_db_user_password}}' --logname 'nagiosuser'
-}
diff --git a/roles/nagios_server/templates/nagios/config.inc.php.j2 b/roles/nagios_server/templates/nagios/config.inc.php.j2
deleted file mode 100644
index f6e7cff844..0000000000
--- a/roles/nagios_server/templates/nagios/config.inc.php.j2
+++ /dev/null
@@ -1,13 +0,0 @@
-=
-#
-# Note: All audio files must be placed in the /media subdirectory
-# under the HTML path (i.e. /usr/local/nagios/share/media/).
-
-#host_unreachable_sound=hostdown.wav
-#host_down_sound=hostdown.wav
-#service_critical_sound=critical.wav
-#service_warning_sound=warning.wav
-#service_unknown_sound=warning.wav
-#normal_sound=noproblem.wav
-
-
-
-# URL TARGET FRAMES
-# These options determine the target frames in which notes and
-# action URLs will open.
-
-action_url_target=_blank
-notes_url_target=_blank
-
-
-
-
-# LOCK AUTHOR NAMES OPTION
-# This option determines whether users can change the author name
-# when submitting comments, scheduling downtime. If disabled, the
-# author names will be locked into their contact name, as defined in Nagios.
-# Values: 0 = allow editing author names
-# 1 = lock author names (disallow editing)
-
-lock_author_names=1
-
-
-
-
-# SPLUNK INTEGRATION OPTIONS
-# These options allow you to enable integration with Splunk
-# in the web interface. If enabled, you'll be presented with
-# "Splunk It" links in various places in the CGIs (log file,
-# alert history, host/service detail, etc). Useful if you're
-# trying to research why a particular problem occurred.
-# For more information on Splunk, visit http://www.splunk.com/
-
-# This option determines whether the Splunk integration is enabled
-# Values: 0 = disable Splunk integration
-# 1 = enable Splunk integration
-
-#enable_splunk_integration=1
-
-
-# This option should be the URL used to access your instance of Splunk
-
-#splunk_url=http://127.0.0.1:8000/
-
-
-
-
-# NAVIGATION BAR SEARCH OPTIONS
-# The following options allow to configure the navbar search. Default
-# is to search for hostnames. With enabled navbar_search_for_addresses,
-# the navbar search queries IP addresses as well. It's also possible
-# to enable search for aliases by setting navbar_search_for_aliases=1.
-
-navbar_search_for_addresses=1
-navbar_search_for_aliases=1
-
-
-
-
-
-# DEFAULTS FOR CHECKBOXES FOR ACKNOWLEDGEMENTS
-# Enabling ack_no_sticky will default the "Sticky Acknowledgement" to
-# be unchecked.
-# Enabling ack_no_send will default the "Send Notification" to
-# be unchecked.
-
-#ack_no_sticky=0
-#ack_no_send=0
diff --git a/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2
deleted file mode 100644
index c0c969559f..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/all-external.cfg.j2
+++ /dev/null
@@ -1,40 +0,0 @@
-define hostgroup {
- hostgroup_name dns
- alias DNS Servers
- members {% for host in vars['dns_external']|sort %}{{ host }}{% if not loop.last %}, {% endif %} {% endfor %}
-
-}
-
-define hostgroup {
- hostgroup_name smtp_mm
- alias SMTP MailMan Servers
- members {% for host in groups["smtp_mm"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
-
-}
-
-define hostgroup {
- hostgroup_name proxies
- alias Web Servers
- members {% for host in groups["proxies_external"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
-
-}
-
-define hostgroup {
- hostgroup_name proxies_ocp4
- alias OCP Web Servers
- members {% for host in groups["proxies_ocp4"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
-
-}
-
-{% for key, value in groups.items()|sort %}
-{% if groups[key] != [] and key.startswith('copr') %}
-define hostgroup {
- hostgroup_name {{ key }}
- alias {{ key }}
-{%- for host in groups[key]|sort if hostvars[host].nagios_Can_Connect == true and hostvars[host].datacenter != 'rdu3' %}
-{% if loop.first +%}
- members {{ host }}{% else %}, {{ host }}{% endif %}
-{% endfor +%}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/all-rdu3.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all-rdu3.cfg.j2
deleted file mode 100644
index 6c92221ab5..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/all-rdu3.cfg.j2
+++ /dev/null
@@ -1,39 +0,0 @@
-###############
-# All Servers and associated devices (rdu3)
-###############
-## {{ env }}
-{% for key, value in groups.items()|sort %}
-{% if groups[key] != [] and key not in vars['exclude_rdu3_hostgroups'] %}
-define hostgroup{
- hostgroup_name {{ key }}
- alias {{ key }}
- members {% for host in groups[key]|sort %}{% if hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
-}
-{% endif %}
-{% endfor %}
-
-define hostgroup{
- hostgroup_name no_ping
- alias no_ping
- members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['ping'] == true or hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
-}
-
-## Services with minimal monitoring
-
-define hostgroup{
- hostgroup_name cloud_aws_group
- alias cloud_aws_group
- members {% for host in groups['cloud_aws']|sort %}{{host}}, {% endfor %}
-}
-
-define hostgroup{
- hostgroup_name mincheckgrp
- alias mincheckgrp
- members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['nrpe'] != true and hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
-}
-
-define hostgroup{
- hostgroup_name routers
- alias routers
- members ibiblio-gw, dedicated-gw, host1plus-gw, internetx-gw, osuosl-gw, rdu-gw, rdu3-gw
-}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2
deleted file mode 100644
index 679dcaa1e3..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2
+++ /dev/null
@@ -1,56 +0,0 @@
-###############
-# All Servers and associated devices
-###############
-## {{ env }}
-{% for key, value in groups.items()|sort %}
-{% if groups[key] != [] and key not in vars['exclude_rdu3_hostgroups'] %}
-define hostgroup{
- hostgroup_name {{ key }}
- alias {{ key }}
-{%- for host in groups[key]|sort if hostvars[host].nagios_Can_Connect == true %}
-{% if loop.first +%}
- members {{ host }}{% else %}, {{ host }}{% endif %}
-{% endfor +%}
-}
-{% endif %}
-{% endfor %}
-
-define hostgroup{
- hostgroup_name no_ping
- alias no_ping
- members {% for host in groups['all']|sort %}{% if hostvars[host].datacenter == datacenter and ( hostvars[host].nagios_Check_Services['ping'] == true or hostvars[host].nagios_Can_Connect == true ) %}{{host}}, {% endif %}{% endfor %}
-}
-
-## Services with minimal monitoring
-
-define hostgroup{
- hostgroup_name cloud_aws_group
- alias cloud_aws_group
- members {% for host in groups['cloud_aws']|sort %}{{host}}, {% endfor %}
-}
-
-
-define hostgroup{
- hostgroup_name mincheckgrp
- alias mincheckgrp
- members {% for host in groups['all']|sort %}{% if hostvars[host].datacenter == datacenter and hostvars[host].nagios_Check_Services['nrpe'] != true and hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
-
-}
-
-define hostgroup{
- hostgroup_name routers
- alias routers
- members ibiblio-gw, dedicated-gw, host1plus-gw, internetx-gw, osuosl-gw, rdu-gw, rdu3-gw
-}
-
-
-#
-# Management hardware
-#
-define hostgroup {
- hostgroup_name {{datacenter}}_mgmt_systems
- alias {{datacenter}}_mgmt_systems
- members {% for host in vars[datacenter+'_management_hosts']|sort %}{{host}}{% if not loop.last %},{% endif %} {% endfor %}
-
-}
-
diff --git a/roles/nagios_server/templates/nagios/hostgroups/checkraid.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/checkraid.cfg.j2
deleted file mode 100644
index 100b907681..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/checkraid.cfg.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-define hostgroup {
- hostgroup_name CheckRaid
- alias Raid-Issue
- members {% for host in groups['all']|sort %}{% if hostvars[host].datacenter == datacenter and hostvars[host].nagios_Check_Services['raid'] == true and hostvars[host].nagios_Can_Connect == true %}{{host}}{% if not loop.last %},{% endif %} {% endif %} {% endfor %}
-
-}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2
deleted file mode 100644
index 8f18c51ff3..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/checkswap.cfg.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-define hostgroup {
- hostgroup_name CheckSwap
- alias Swap-Is-Low
- members {% for host in groups['all']|sort %}{% if hostvars[host].datacenter == datacenter and hostvars[host].nagios_Can_Connect == true and hostvars[host].nagios_Check_Services['swap'] == true %}{{host}}{% if not loop.last %}, {% endif %}{% endif %}{% endfor %}
-
-}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/kvmHosts.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/kvmHosts.cfg.j2
deleted file mode 100644
index 169ea86669..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/kvmHosts.cfg.j2
+++ /dev/null
@@ -1,11 +0,0 @@
-###############
-# KVM Servers
-###############
-
-define hostgroup {
- hostgroup_name virtservers
- alias Virtual ServiceGroup
- members {% for host in groups['virtservers']|sort %} {{host}}, Disk space /, {{host}}, Total Processes, {{host}}, Check Raid, {{host}}, Swap, {{host}}, SSH,{% endif %}{% endfor %}
-
-}
-
diff --git a/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2
deleted file mode 100644
index 09f5a470dc..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/nomail.cfg.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-define hostgroup {
- hostgroup_name nomail
- alias Detect For 0 Mail In Queue
- members {% for host in groups['all']|sort %}{% if hostvars[host].datacenter == datacenter and hostvars[host].nagios_Can_Connect == true and hostvars[host].nagios_Check_Services['nrpe'] == true and hostvars[host].nagios_Check_Services['mail'] == true%}{{host}}, {% endif %}{% endfor %}
-
-}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/other.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/other.cfg.j2
deleted file mode 100644
index 7be0996b30..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/other.cfg.j2
+++ /dev/null
@@ -1,29 +0,0 @@
-{% if datacenter == 'rdu3' %}
-define hostgroup {
- hostgroup_name oneproxy
- alias just one proxy
- members proxy01.rdu3.fedoraproject.org
-
-}
-
-define hostgroup {
- hostgroup_name oneproxy-stg
- alias just one proxy in staging
- members proxy01.stg.rdu3.fedoraproject.org
-
-}
-{% elif datacenter == 'rdu3' %}
-define hostgroup {
- hostgroup_name oneproxy
- alias just one proxy
- members proxy01.rdu3.fedoraproject.org
-
-}
-
-define hostgroup {
- hostgroup_name oneproxy-stg
- alias just one proxy in staging
- members proxy01.stg.rdu3.fedoraproject.org
-
-}
-{% endif %}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/retrace.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/retrace.cfg.j2
deleted file mode 100644
index a010fedc85..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/retrace.cfg.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-define hostgroup {
- hostgroup_name retrace
- alias Retrace Hosts
- members {% for host in groups['retrace']|sort %}{{host}}, Disk space /,{{host}},Total Processes,{{host}}, Check Raid, {{host}}, Swap, {{host}}, SSH, {% endfor %}
-
-}
diff --git a/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2
deleted file mode 100644
index 8b13f11bd6..0000000000
--- a/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-##
-## VPN clients
-define hostgroup {
- hostgroup_name vpnclients
- alias vpnclients
- members {% for host in groups['all']|sort %}{% if ( hostvars[host].datacenter == datacenter ) and ( hostvars[host].vpn == true ) and ( hostvars[host].nagios_Can_Connect == true ) and (host not in groups['ocp_stg']+groups['ocp']) %}{{host}},{% endif %}{% endfor %}
-
-}
-# TODO: Add !bastion02.rdu3.fedoraproject.org above when it exists.
diff --git a/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2
deleted file mode 100644
index af65073eff..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/aws-hosts.cfg.j2
+++ /dev/null
@@ -1,12 +0,0 @@
-{% for host in groups['cloud_aws']|sort %}
-define host {
- use aws
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
- address {{ host }}
-}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2
deleted file mode 100644
index 615bcc5d81..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/bodhost-hosts.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'bodhost' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents bodhost-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2
deleted file mode 100644
index 2d543b0c1b..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/dedicatedsolutions-hosts.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'dedicatedsolutions' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents dedicated-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/gateway-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/gateway-hosts.cfg.j2
deleted file mode 100644
index a017e1595b..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/gateway-hosts.cfg.j2
+++ /dev/null
@@ -1,107 +0,0 @@
-# TODO: depending on where this file is being put the parents need to
-# change to the nocs parent. Also hosts which aren't reachable should
-# be not defined on the external nagios.
-#
-
-#'ibiblio'
-define host {
- host_name ibiblio-gw
- alias ibiblio gateway
- use mincheck
- check_command check-host-alive4
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% endif %}
- address 152.19.134.129
-}
-
-#Mark Note to Self: Come back and correct these later
-# 'rdu3'
-define host {
- host_name rdu3-gw
- alias rdu3 gateway
- use mincheck
- check_command check-host-alive4
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- address 10.16.163.254
-{% elif vars['nagios_location'] == 'external' %}
- address 209.132.181.204
- parents ibiblio-gw
-{% endif %}
-}
-
-
-#'dedicatedsolutions'
-define host {
- host_name dedicated-gw
- alias dedicated solutions gateway
- use mincheck
- check_command check-host-alive4
- address 67.219.144.65
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% elif vars['nagios_location'] == 'external' %}
- parents ibiblio-gw
-{% endif %}
-
-}
-
-#'host1plus'
-define host {
- host_name host1plus-gw
- alias host1plus gateway
- use mincheck
- check_command check-host-alive4
- address 185.141.164.1
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% elif vars['nagios_location'] == 'external' %}
- parents ibiblio-gw
-{% endif %}
-
-}
-
-#'internetx'
-define host {
- host_name internetx-gw
- alias internetx gateway
- use mincheck
- check_command check-host-alive4
- address 85.236.55.1
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% elif vars['nagios_location'] == 'external' %}
- parents ibiblio-gw
-{% endif %}
-
-}
-
-# 'osuosl'
-define host {
- host_name osuosl-gw
- alias osuosl gateway
- use mincheck
- check_command check-host-alive4
- address 140.211.169.193
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% elif vars['nagios_location'] == 'external' %}
- parents ibiblio-gw
-{% endif %}
-
-}
-
-#'rdu'
-define host {
- host_name rdu-gw
- alias rdu gateway
- use mincheck
- check_command check-host-alive4
- address 209.132.190.196
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% elif vars['nagios_location'] == 'external' %}
- parents ibiblio-gw
-{% endif %}
-
-}
diff --git a/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2
deleted file mode 100644
index 25144e67e4..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/host1plus-hosts.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'host1plus' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents host1plus-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2
deleted file mode 100644
index 6627b0cdb1..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts-ipv6.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-## This template currently only works for noc02. If noc01 gets ipv6 then
-## it will need to be revisited.
-
-{% for host in groups['all']|sort if
- hostvars[host].datacenter == 'ibiblio' and
- hostvars[host].nagios_Can_Connect == true
-%}
-define host {
- use mincheck6
- host_name ipv6-{{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}-ipv6.fedoraproject.org
- alias {{ hostvars[host].ansible_hostname }}-ipv6
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv6_ip is defined %}
- address {{ hostvars[host].eth0_ipv6_ip }}
-{% elif hostvars[host].ansible_default_ipv6 is defined %}
-{% if hostvars[host].ansible_default_ipv6.address is defined %}
- address {{ hostvars[host].ansible_default_ipv6.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents ibiblio-gw
-{% endif %}
-}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2
deleted file mode 100644
index 6346e9bda2..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/ibiblio-hosts.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'ibiblio' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents ibiblio-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2
deleted file mode 100644
index 13ee5336f5..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/internetx-hosts.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'internetx' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents internetx-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2
deleted file mode 100644
index f2d3edf7ac..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/osuosl-hosts.cfg.j2
+++ /dev/null
@@ -1,32 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'osuosl' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents osuosl-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/other.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/other.cfg.j2
deleted file mode 100644
index e23cc96408..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/other.cfg.j2
+++ /dev/null
@@ -1,71 +0,0 @@
-define host {
- host_name status
- alias status.fedoraproject.org
- use mincheck
- address d6tcqd4og8l21.cloudfront.net
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% else %}
- parents ibiblio-gw
-{% endif %}
-}
-
-define host {
- host_name copr-be
- alias download.copr.fedorainfracloud.org
- use mincheck
- address d1nld9ovj32u75.cloudfront.net
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% else %}
- parents ibiblio-gw
-{% endif %}
-}
-
-define host {
- host_name registry-cdn
- alias cdn.registry.fedoraproject.org
- use mincheck
- address cdn.registry.fedoraproject.org
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% else %}
- parents ibiblio-gw
-{% endif %}
-}
-
-define host {
- host_name lists.fedoraproject.org
- alias lists.fedoraproject.org
- use mincheck
- address lists.fedoraproject.org
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- parents rdu3-gw
-{% else %}
- parents ibiblio-gw
-{% endif %}
-}
-
-define host {
- host_name retrace.fedoraproject.org
- alias retrace.fedoraproject.org
- use mincheck
- address retrace.fedoraproject.org
- parents rdu3-gw
-}
-
-define host {
- host_name stg.pagure.io
- alias stg.pagure.io
- use mincheck
- address 38.145.32.39
- parents rdu3-gw
-}
-
-define host {
- host_name pagure.io
- alias pagure.io
- use mincheck
- address 38.145.32.40
- parents rdu3-gw
-}
diff --git a/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2
deleted file mode 100644
index eb05ba9603..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/rdu-cc-hosts.cfg.j2
+++ /dev/null
@@ -1,30 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'rdu-cc' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
-
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2
deleted file mode 100644
index 99aab8e200..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/rdu-hosts.cfg.j2
+++ /dev/null
@@ -1,28 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter == 'rdu' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if vars['nagios_location'] == 'rdu3_internal' %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].public_ip is defined %}
- address {{ hostvars[host].public_ip }}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents rdu-gw
-{% endif %}
-}
-
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/rdu3-external.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu3-external.cfg.j2
deleted file mode 100644
index 72e8fae0b4..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/rdu3-external.cfg.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-{% for host in vars["rdu3_external"]|sort %}
-define host {
- host_name {{ host }}
- alias {{ host }}
- use mincheck
- address {{ host }}
- parents rdu3-gw
-}
-{% endfor %}
\ No newline at end of file
diff --git a/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2
deleted file mode 100644
index ed724c7a80..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/rdu3-hosts.cfg.j2
+++ /dev/null
@@ -1,29 +0,0 @@
-{% for host in groups['all']|sort %}
-{% if hostvars[host].datacenter.startswith('rdu3') and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined and hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% else %}
- parents rdu3-gw
-{% endif %}
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/rdu3-mgmt-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/rdu3-mgmt-hosts.cfg.j2
deleted file mode 100644
index 7ffa7b8c60..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/rdu3-mgmt-hosts.cfg.j2
+++ /dev/null
@@ -1,9 +0,0 @@
-{% for host in vars['rdu3_management_hosts']|sort %}
-define host {
- host_name {{ host }}
- alias {{ host }}
- use mincheck
- address {{ host }}
- parents rdu3-gw
-}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2 b/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2
deleted file mode 100644
index 6a2617e9a9..0000000000
--- a/roles/nagios_server/templates/nagios/hosts/staging-hosts.cfg.j2
+++ /dev/null
@@ -1,35 +0,0 @@
-{% for host in groups['all']|sort if hostvars[host].datacenter == datacenter %}
-{% if hostvars[host].datacenter == 'staging' and hostvars[host].nagios_Can_Connect == true %}
-define host {
-{% if hostvars[host].nagios_Check_Services['nrpe'] == true %}
- use defaulttemplate
-{% else %}
- use mincheck
-{% endif %}
- host_name {{ host }}
-{% if hostvars[host].ansible_hostname is defined %}
- alias {{ hostvars[host].ansible_hostname }}
-{% else %}
- alias {{ host }}
-{% endif %}
-{% if hostvars[host].eth0_ipv4_ip is defined %}
- address {{ hostvars[host].eth0_ipv4_ip }}
-{% elif hostvars[host].ansible_default_ipv4 is defined %}
-{% if hostvars[host].ansible_default_ipv4.address is defined %}
- address {{ hostvars[host].ansible_default_ipv4.address }}
-{% endif %}
-{% else %}
- address {{ host }}
-{% endif %}
-{% if env == 'staging' %}
-## Some staging parents do not allow ssh from staging. Just default to gw
- parents rdu3-gw
-{% elif hostvars[host]['vmhost'] is defined %}
- parents {{ hostvars[host]['vmhost'] }}
-{% elif hostvars[host].datacenter is defined %}
- parents rdu3-gw
-{% endif %}
-
-}
-{% endif %}
-{% endfor %}
diff --git a/roles/nagios_server/templates/nagios/plugins/check_koji.j2 b/roles/nagios_server/templates/nagios/plugins/check_koji.j2
deleted file mode 100755
index 11fbfea8b4..0000000000
--- a/roles/nagios_server/templates/nagios/plugins/check_koji.j2
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-FAILURES=$(/usr/bin/wget --timeout=60 -q -O- http://koji.{{ datacenter }}.fedoraproject.org/koji/builds | /bin/grep -c failed.png)
-WARNING=20
-CRITICAL=25
-
-if [ $FAILURES -gt $CRITICAL ]
-then
- echo "Koji: CRITICAL failed builds: $FAILURES"
- exit 2
-elif [ $FAILURES -gt $WARNING ]
-then
- echo "Koji: WARNING failed builds: $FAILURES"
- exit 1
-else
- echo "Koji: OK failed builds: $FAILURES"
- exit 0
-fi
diff --git a/roles/nagios_server/templates/nagios/scripts/matrix-notify.sh.j2 b/roles/nagios_server/templates/nagios/scripts/matrix-notify.sh.j2
deleted file mode 100644
index 07842a174c..0000000000
--- a/roles/nagios_server/templates/nagios/scripts/matrix-notify.sh.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-stdin=$(cat)
-
-host=$(hostname -s)
-
-curl -X POST -H "Content-Type: application/json" -u {{ matrix_nonbot_auth }} https://maubot.apps.ocp.fedoraproject.org/plugin/nonbot-nagios/send?host=$host\&service=$1 -d "$stdin"
diff --git a/roles/nagios_server/templates/nrpe/nrpe.cfg.j2 b/roles/nagios_server/templates/nrpe/nrpe.cfg.j2
deleted file mode 100644
index e7ec0f9106..0000000000
--- a/roles/nagios_server/templates/nrpe/nrpe.cfg.j2
+++ /dev/null
@@ -1,397 +0,0 @@
-#############################################################################
-# Sample NRPE Config File
-# Written by: Ethan Galstad (nagios@nagios.org)
-#
-# Last Modified: 2016-05-10
-#
-# NOTES:
-# This is a sample configuration file for the NRPE daemon. It needs to be
-# located on the remote host that is running the NRPE daemon, not the host
-# from which the check_nrpe client is being executed.
-#############################################################################
-
-
-# LOG FACILITY
-# The syslog facility that should be used for logging purposes.
-
-log_facility=daemon
-
-
-
-# DEBUGGING OPTION
-# This option determines whether or not debugging messages are logged to the
-# syslog facility.
-# Values: 0=debugging off, 1=debugging on
-
-debug=0
-
-
-
-# PID FILE
-# The name of the file in which the NRPE daemon should write it's process ID
-# number. The file is only written if the NRPE daemon is started by the root
-# user and is running in standalone mode.
-
-#pid_file=/var/run/nrpe.pid
-
-
-
-# PORT NUMBER
-# Port number we should wait for connections on.
-# NOTE: This must be a non-priviledged port (i.e. > 1024).
-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
-
-server_port=5666
-
-
-
-# SERVER ADDRESS
-# Address that nrpe should bind to in case there are more than one interface
-# and you do not want nrpe to bind on all interfaces.
-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
-
-#server_address=127.0.0.1
-
-
-
-# LISTEN QUEUE SIZE
-# Listen queue size (backlog) for serving incoming connections.
-# You may want to increase this value under high load.
-
-#listen_queue_size=5
-
-
-
-# NRPE USER
-# This determines the effective user that the NRPE daemon should run as.
-# You can either supply a username or a UID.
-#
-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
-
-nrpe_user=nrpe
-
-
-
-# NRPE GROUP
-# This determines the effective group that the NRPE daemon should run as.
-# You can either supply a group name or a GID.
-#
-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
-
-nrpe_group=nrpe
-
-
-
-# ALLOWED HOST ADDRESSES
-# This is an optional comma-delimited list of IP address or hostnames
-# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
-# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
-# supported.
-#
-# Note: The daemon only does rudimentary checking of the client's IP
-# address. I would highly recommend adding entries in your /etc/hosts.allow
-# file to allow only the specified host to connect to the port
-# you are running this daemon on.
-#
-# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
-
-#allowed_hosts=127.0.0.1,192.168.0.2
-allowed_hosts=10.16.163.10,127.0.0.1,192.168.1.10,192.168.1.20,192.168.1.166,38.145.32.15
-
-
-
-# COMMAND ARGUMENT PROCESSING
-# This option determines whether or not the NRPE daemon will allow clients
-# to specify arguments to commands that are executed. This option only works
-# if the daemon was configured with the --enable-command-args configure script
-# option.
-#
-# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
-# Read the SECURITY file for information on some of the security implications
-# of enabling this variable.
-#
-# Values: 0=do not allow arguments, 1=allow command arguments
-
-dont_blame_nrpe=0
-
-
-
-# BASH COMMAND SUBTITUTION
-# This option determines whether or not the NRPE daemon will allow clients
-# to specify arguments that contain bash command substitutions of the form
-# $(...). This option only works if the daemon was configured with both
-# the --enable-command-args and --enable-bash-command-substitution configure
-# script options.
-#
-# *** ENABLING THIS OPTION IS A HIGH SECURITY RISK! ***
-# Read the SECURITY file for information on some of the security implications
-# of enabling this variable.
-#
-# Values: 0=do not allow bash command substitutions,
-# 1=allow bash command substitutions
-
-allow_bash_command_substitution=0
-
-
-
-# COMMAND PREFIX
-# This option allows you to prefix all commands with a user-defined string.
-# A space is automatically added between the specified prefix string and the
-# command line from the command definition.
-#
-# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
-# Usage scenario:
-# Execute restricted commmands using sudo. For this to work, you need to add
-# the nagios user to your /etc/sudoers. An example entry for alllowing
-# execution of the plugins from might be:
-#
-# nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
-#
-# This lets the nagios user run all commands in that directory (and only them)
-# without asking for a password. If you do this, make sure you don't give
-# random users write access to that directory or its contents!
-
-# command_prefix=/usr/bin/sudo
-
-
-
-# COMMAND TIMEOUT
-# This specifies the maximum number of seconds that the NRPE daemon will
-# allow plugins to finish executing before killing them off.
-
-command_timeout=60
-
-
-
-# CONNECTION TIMEOUT
-# This specifies the maximum number of seconds that the NRPE daemon will
-# wait for a connection to be established before exiting. This is sometimes
-# seen where a network problem stops the SSL being established even though
-# all network sessions are connected. This causes the nrpe daemons to
-# accumulate, eating system resources. Do not set this too low.
-
-connection_timeout=300
-
-
-
-# WEAK RANDOM SEED OPTION
-# This directive allows you to use SSL even if your system does not have
-# a /dev/random or /dev/urandom (on purpose or because the necessary patches
-# were not applied). The random number generator will be seeded from a file
-# which is either a file pointed to by the environment valiable $RANDFILE
-# or $HOME/.rnd. If neither exists, the pseudo random number generator will
-# be initialized and a warning will be issued.
-# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness
-
-#allow_weak_random_seed=1
-
-
-
-# SSL/TLS OPTIONS
-# These directives allow you to specify how to use SSL/TLS.
-
-# SSL VERSION
-# This can be any of: SSLv2 (only use SSLv2), SSLv2+ (use any version),
-# SSLv3 (only use SSLv3), SSLv3+ (use SSLv3 or above), TLSv1 (only use
-# TLSv1), TLSv1+ (use TLSv1 or above), TLSv1.1 (only use TLSv1.1),
-# TLSv1.1+ (use TLSv1.1 or above), TLSv1.2 (only use TLSv1.2),
-# TLSv1.2+ (use TLSv1.2 or above)
-# If an "or above" version is used, the best will be negotiated. So if both
-# ends are able to do TLSv1.2 and use specify SSLv2, you will get TLSv1.2.
-
-#ssl_version=SSLv2+
-
-# SSL USE ADH
-# This is for backward compatibility and is DEPRECATED. Set to 1 to enable
-# ADH or 2 to require ADH. 1 is currently the default but will be changed
-# in a later version.
-
-#ssl_use_adh=1
-
-# SSL CIPHER LIST
-# This lists which ciphers can be used. For backward compatibility, this
-# defaults to 'ssl_cipher_list=ALL:!MD5:@STRENGTH' in this version but
-# will be changed to something like the example below in a later version of NRPE.
-
-#ssl_cipher_list=ALL:!MD5:@STRENGTH
-#ssl_cipher_list=ALL:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!RC4:!MD5:@STRENGTH
-
-# SSL Certificate and Private Key Files
-
-#ssl_cacert_file=/etc/ssl/servercerts/ca-cert.pem
-#ssl_cert_file=/etc/ssl/servercerts/nagios-cert.pem
-#ssl_privatekey_file=/etc/ssl/servercerts/nagios-key.pem
-
-# SSL USE CLIENT CERTS
-# This options determines client certificate usage.
-# Values: 0 = Don't ask for or require client certificates (default)
-# 1 = Ask for client certificates
-# 2 = Require client certificates
-
-#ssl_client_certs=0
-
-# SSL LOGGING
-# This option determines which SSL messages are send to syslog. OR values
-# together to specify multiple options.
-
-# Values: 0x00 (0) = No additional logging (default)
-# 0x01 (1) = Log startup SSL/TLS parameters
-# 0x02 (2) = Log remote IP address
-# 0x04 (4) = Log SSL/TLS version of connections
-# 0x08 (8) = Log which cipher is being used for the connection
-# 0x10 (16) = Log if client has a certificate
-# 0x20 (32) = Log details of client's certificate if it has one
-# -1 or 0xff or 0x2f = All of the above
-
-#ssl_logging=0x00
-
-
-
-# INCLUDE CONFIG FILE
-# This directive allows you to include definitions from an external config file.
-
-#include=
-
-
-
-# INCLUDE CONFIG DIRECTORY
-# This directive allows you to include definitions from config files (with a
-# .cfg extension) in one or more directories (with recursion).
-
-include_dir=/etc/nrpe.d/
-
-
-
-# COMMAND DEFINITIONS
-# Command definitions that this daemon will run. Definitions
-# are in the following format:
-#
-# command[]=
-#
-# When the daemon receives a request to return the results of
-# it will execute the command specified by the argument.
-#
-# Unlike Nagios, the command line cannot contain macros - it must be
-# typed exactly as it should be executed.
-#
-# Note: Any plugins that are used in the command lines must reside
-# on the machine that this daemon is running on! The examples below
-# assume that you have plugins installed in a /usr/local/nagios/libexec
-# directory. Also note that you will have to modify the definitions below
-# to match the argument format the plugins expect. Remember, these are
-# examples only!
-
-
-# The following examples use hardcoded command arguments...
-
-command[check_nrpe]=/bin/date
-command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
-command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
-command[check_raid]=/usr/lib64/nagios/plugins/check_raid.py
-command[check_disk_/]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -p /
-command[check_disk_/boot]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /boot
-command[check_disk_/git]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /git
-command[check_disk_/mnt/koji]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -p /mnt/koji
-command[check_disk_/postgreslogs]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /postgreslogs
-command[check_disk_/project/]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /project/
-command[check_disk_/srv]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv
-command[check_disk_huge_/srv]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /srv
-command[check_disk_/srv/buildmaster]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/buildmaster
-command[check_disk_/srv/cache/lookaside]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/cache/lookaside
-command[check_disk_/srv/diskimages]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/diskimages
-command[check_disk_/srv/registry]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /srv/registry
-command[check_disk_/u01]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -p /u01
-command[check_disk_/var/lib/copr/public_html]=/usr/lib64/nagios/plugins/check_disk -w 8% -c 6% -K 10% -W 20% -p /var/lib/copr/public_html
-command[check_disk_/var/lib/dist-git]=/usr/lib64/nagios/plugins/check_disk -w 12% -c 6% -K 10% -W 20% -p /var/lib/dist-git -p /var/lib/copr-dist-git
-command[check_disk_/var/lib/copr-keygen]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -K 10% -W 20% -p /var/lib/copr-keygen
-command[check_disk_/srv/copr-fe]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -K 10% -W 20% -p /srv/copr-fe
-command[check_disk_/var/lib64/mock]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var/lib/mock
-command[check_disk_/var/log]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -p /var/log
-command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 15 -c 25 -s Z
-command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 900 -c 1000
-command[check_swap]=/usr/lib64/nagios/plugins/check_swap -w 15% -c 10%
-command[check_temp]=/usr/lib64/nagios/plugins/check_ipmi -t
-command[check_fans]=/usr/lib64/nagios/plugins/check_ipmi -f
-command[check_mirrorlist_cache]=/usr/lib64/nagios/plugins/check_file_age -w 86400 -c 129600 -f /var/lib/mirrormanager/mirrorlist_cache.proto
-command[check_mysql_backup]=/usr/lib64/nagios/plugins/check_file_age -w 86400 -c 129600 -f /backups/fpo-mediawiki.xz
-command[check_supervisor]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -a '/usr/bin/python /usr/bin/supervisord' -u root
-command[check_lock]=/usr/lib64/nagios/plugins/check_lock
-command[check_lock_file_age]=/usr/lib64/nagios/plugins/check_lock_file_age -w 1 -c 5 -f /var/lock/fedora-ca/lock
-command[check_nagios]=/usr/lib64/nagios/plugins/check_nagios -e 5 -F /var/spool/nagios/status.dat -C /usr/sbin/nagios
-command[check_auditd]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -C 'auditd' -u root
-command[check_copr_ping]=/usr/bin/copr-ping-check.py
-command[check_copr_cdn]=/usr/bin/copr-cdn-check.py
-command[check_cron]=/usr/lib64/nagios/plugins/check_procs -c 1:10 -C 'crond' -u root
-command[check_varnish_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'varnishd' -u varnish
-command[check_rsyslogd_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:2 -C 'rsyslogd'
-command[check_saslauthd]=/usr/lib64/nagios/plugins/check_procs -c 1:10 -C 'saslauthd' -u root
-command[check_readonly_fs]=/usr/lib64/nagios/plugins/check_readonly_fs
-command[check_postfix_queue]=/usr/lib64/nagios/plugins/check_postfix_queue -w 2 -c 5
-command[check_merged_file_age]=/usr/lib64/nagios/plugins/check_file_age -w 120 -c 300 /var/log/merged/messages.log
-command[check_haproxy_conns]=/usr/lib64/nagios/plugins/check_haproxy_conns.py
-command[check_redis_proc]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -C 'redis-server' -u redis
-command[check_openvpn_link]=/usr/lib64/nagios/plugins/check_ping -H 192.168.1.41 -w 375.0,20% -c 500,60%
-command[check_memcache]=/usr/lib64/nagios/plugins/check_procs -c 1:1 -a '/usr/bin/memcached' -u memcached
-command[check_memcache_connect]=/usr/lib64/nagios/plugins/check_memcache_connect
-command[check_mirrorlist_docker_proxy]=/usr/lib64/nagios/plugins/check_tcp -H localhost -p 18081
-command[check_mailman_api]=/usr/lib64/nagios/plugins/check_http -H localhost -p 8001 -u /3.0
-
-# The following are fedora mesaging/datanommer checks.
-# They check for the time since the latest message in any particular category.
-# The first number is the seconds elapsed until we should raise a warning.
-# The second number is the seconds elapsed until we should raise an error.
-# For your reference:
-# 4 hours -> 14400
-# 1 day -> 86400
-# 3 days -> 259200
-# 1 week -> 604800
-# 3 weeks -> 1814400
-# 1 month -> 2628000
-# 3 months -> 7884000
-command[check_datanommer_anitya]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py anitya 604800 1814400
-command[check_datanommer_ansible]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py ansible 432000 604800
-command[check_datanommer_bodhi]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py bodhi 86400 604800
-command[check_datanommer_bodhi_composes]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py org.fedoraproject.prod.bodhi.compose.start 86400 90000
-command[check_datanommer_buildsys]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py buildsys 14400 86400
-command[check_datanommer_compose]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py compose 259200 1814400
-command[check_datanommer_copr]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py copr 21600 86400
-command[check_datanommer_fas]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py fas 1814400 2628000
-command[check_datanommer_badges]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py badges 86400 259200
-command[check_datanommer_fedocal]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py fedocal 7884000 23652000
-command[check_datanommer_fmn]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py fmn 604800 1814400
-command[check_datanommer_git]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py git 86400 604800
-command[check_datanommer_github]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py github 432000 604800
-command[check_datanommer_hotness]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py hotness 604800 1814400
-command[check_datanommer_kerneltest]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py kerneltest 604800 1814400
-command[check_datanommer_koschei]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py koschei 86400 604800
-command[check_datanommer_meetbot]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py meetbot 604800 2628000
-command[check_datanommer_pkgdb]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py pkgdb 1814400 2628000
-command[check_datanommer_planet]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py planet 2628000 7884000
-command[check_datanommer_resultsdb]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py resultsdb 172800 172800
-command[check_datanommer_trac]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py trac 86400 259200
-command[check_datanommer_rpmsign]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py org.fedoraproject.prod.buildsys.rpm.sign 10800 14400
-command[check_datanommer_wiki]=/usr/lib64/nagios/plugins/check_datanommer_timesince.py wiki 259200 1814400
-
-command[check_systemd_units]=/usr/lib64/nagios/plugins/check_systemd_units
-# The following are 'action commands' where by an actual action is performed
-# like restarting httpd
-
-command[service_httpd_restart]=/usr/bin/sudo /sbin/service httpd restart
-command[service_httpd_reload]=/usr/bin/sudo /sbin/service httpd reload
-command[service_httpd_graceful]=/usr/bin/sudo /sbin/service httpd graceful
-
-# Used to restart rsyslog on log02 when it goes wonky
-command[service_rsyslog_restart]=/usr/bin/sudo /sbin/service rsyslog restart
-
-# The following examples allow user-supplied arguments and can
-# only be used if the NRPE daemon was compiled with support for
-# command arguments *AND* the dont_blame_nrpe directive in this
-# config file is set to '1'. This poses a potential security risk, so
-# make sure you read the SECURITY file before doing this.
-
-#command[check_users]=/usr/lib64/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
-#command[check_load]=/usr/lib64/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
-#command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
-#command[check_procs]=/usr/lib64/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
-
-command[check_pgsql_backup]=/usr/lib64/nagios/plugins/check_file_age -w 86400 -c 129600 -f /backups/db-fas01.rdu3.fedoraproject.org/fas2.db