diff --git a/roles/common/templates/nrpe_local.cfg b/roles/common/templates/nrpe_local.cfg index bd98682..108f752 100644 --- a/roles/common/templates/nrpe_local.cfg +++ b/roles/common/templates/nrpe_local.cfg @@ -1,24 +1,25 @@ command[check_ssh]=/usr/lib64/nagios/plugins/check_ssh -H 127.0.0.1 command[check_ssh_phab]=/usr/lib64/nagios/plugins/check_ssh -H 127.0.0.1 -p {{ vcs_port_back }} command[check_disk_vda]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /dev/vda1 command[check_disk_vdb]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /dev/vdb1 +command[check_disk_vdb2]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /dev/vdb command[check_disk_vdc]=/usr/lib64/nagios/plugins/check_disk -w 5% -c 1% -p /dev/vdc1 command[check_disk_repo]=/usr/lib64/nagios/plugins/check_disk -X ext4 {{ repositories_path }} command[check_http_phab]=/usr/lib64/nagios/plugins/check_http -I {{ inventory_hostname }} -H {{ domain }} -u /status/ -r ALIVE command[check_http_ex_phab]=/usr/lib64/nagios/plugins/check_http -H {{ domain }} -e 'HTTP/1.1 302 Found' command[check_http_ex_phab_ssl]=/usr/lib64/nagios/plugins/check_http -H {{ domain }} --ssl -u /status/ -r ALIVE command[check_http_jenkins]=/usr/lib64/nagios/plugins/check_http -H jenkins.{{ domain }} --ssl command[check_mysql_remote]=/usr/lib64/nagios/plugins/check_mysql -H $ARG1$ -u {{ mysql_app_user }} -p {{ mysql_app_pass }} command[check_mysql_local]=/usr/lib64/nagios/plugins/check_mysql -u root command[check_phd]=/usr/lib64/nagios/plugins/check_procs -C 'php' -a {{ phabricator_path }}phabricator/scripts/daemon/phd-daemon -c 1: command[check_gmond]=/usr/lib64/nagios/plugins/check_procs -C 'gmond' -c 1: command[check_gmetad]=/usr/lib64/nagios/plugins/check_procs -C 'gmetad' -c 1: command[check_httpd]=/usr/lib64/nagios/plugins/check_procs -C 'httpd' -c 1: command[check_node]=/usr/lib64/nagios/plugins/check_procs -C 'node' -c 1:1 command[check_java_jenkins]=/usr/lib64/nagios/plugins/check_procs -C 'java' -c 1: command[check_shibd]=/usr/lib64/nagios/plugins/check_procs -C 'shibd' -c 1: command[check_shib_status]=/usr/lib64/nagios/plugins/check_http -H localhost -u /Shibboleth.sso/Status -R '' command[check_postfix_master]=/usr/lib64/nagios/plugins/check_procs -C master -a '-w' -c 1: command[check_postfix_pickup]=/usr/lib64/nagios/plugins/check_procs -C pickup -c 1: command[check_postfix_qmgr]=/usr/lib64/nagios/plugins/check_procs -C qmgr -c 1: command[check_mem]=/usr/local/bin/check_mem.sh -w 98 -c 99 -W 98 -C 99 diff --git a/roles/nagios/templates/services.cfg b/roles/nagios/templates/services.cfg index c187cf4..b0b8dff 100644 --- a/roles/nagios/templates/services.cfg +++ b/roles/nagios/templates/services.cfg @@ -1,290 +1,290 @@ define service { name custom-service use generic-service contact_groups c4science_admins notification_interval 10080 register 0 } ### Common ### {% for host in groups['all'] %} {% if hostvars[host]['host_name'] is defined and hostvars[host]['host_name'] != 'c4science-ci-slave00' %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description CPU Load check_command check_nrpe!check_load } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description SSH check_command check_nrpe!check_ssh } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk Usage vda1 check_command check_nrpe!check_disk_vda } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Memory usage check_command check_nrpe!check_mem } {% if hostvars[host]['host_name'] != 'c4science-backup' %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Ganglia check_command check_nrpe!check_gmond } {% endif %} {% endif %} {% endfor %} ### APP ### {% for host in groups['app'] %} {% if hostvars[host]['host_name'] is defined %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description SSH Phabricator check_command check_nrpe!check_ssh_phab } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description HTTP Phabricator check_command check_nrpe!check_http_phab } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Apache check_command check_nrpe!check_httpd } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description NodeJS check_command check_nrpe!check_node } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Shibboleth daemon check_command check_nrpe!check_shibd } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Shibboleth Status check_command check_nrpe!check_shib_status } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Postfix Mailer check_command check_nrpe!check_postfix_master } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Postfix Pickup check_command check_nrpe!check_postfix_pickup } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Postfix Queue check_command check_nrpe!check_postfix_qmgr } {% endif %} {% endfor %} ### PHD DAEMONS ### {% for host in groups['phd'] %} {% if hostvars[host]['host_name'] is defined %} {% if hostvars[host]['host_name'] == 'c4science-phd00' %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk Usage files check_command check_nrpe!check_disk_vdc } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk repo mount check_command check_nrpe!check_disk_repo } {% endif %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk Usage repo check_command check_nrpe!check_disk_vdb } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Phabricator Daemon check_command check_nrpe!check_phd } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Apache check_command check_nrpe!check_httpd } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description SSH Phabricator check_command check_nrpe!check_ssh_phab } {% endif %} {% endfor %} ### LOAD BALANCER ### {% for host in groups['lbs'] %} {% if hostvars[host]['host_name'] is defined %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description HTTP Phabricator check_command check_nrpe!check_http_ex_phab } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description HTTP Phabricator SSL check_command check_nrpe!check_http_ex_phab_ssl } #define service{ # use custom-service # host_name {{ hostvars[host]['host_name'] }} # service_description HTTP Jenkins # check_command check_nrpe!check_http_jenkins #} {% endif %} {% endfor %} ### CI ### #{ % for host in groups['ci'] %} #{ % if hostvars[host]['host_name'] is defined %} #define service{ # use custom-service # host_name { { hostvars[host]['host_name'] }} # service_description HTTP Jenkins # check_command check_nrpe!check_http_jenkins #} # #define service{ # use custom-service # host_name { { hostvars[host]['host_name'] }} # service_description Java Jenkins # check_command check_nrpe!check_java_jenkins #} # #{ % endif %} #{ % endfor %} #define service{ # use custom-service # host_name c4science-ci-slave00 # service_description CPU Load # check_command check_nrpe!check_load #} # #define service{ # use custom-service # host_name c4science-ci-slave00 # service_description Disk Usage vdb # check_command check_nrpe!check_disk_vdb #} # #define service{ # use custom-service # host_name c4science-ci-slave00 # service_description Memory usage # check_command check_nrpe!check_mem #} # #define service{ # use custom-service # host_name c4science-ci-slave00 # service_description Docker daemon # check_command check_nrpe!check_docker_daemon #} ### MONIT ### {% for host in groups['monit'] %} {% if hostvars[host]['host_name'] is defined %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Ganglia server check_command check_nrpe!check_gmetad } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Apache check_command check_nrpe!check_httpd } {% endif %} {% endfor %} ### Databases ### {% for host in groups['dbs'] %} {% if hostvars[host]['host_name'] is defined %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description MySQL check_command check_nrpe!check_mysql_local } {% endif %} {% endfor %} ## Backup {% for host in groups['backup'] %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk Usage vdb - check_command check_nrpe!check_disk_vdb + check_command check_nrpe!check_disk_vdb2 } {% endfor %}