diff --git a/roles/nagios/templates/services.cfg b/roles/nagios/templates/services.cfg index 31c0a36..8c63966 100644 --- a/roles/nagios/templates/services.cfg +++ b/roles/nagios/templates/services.cfg @@ -1,278 +1,278 @@ 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 %} ### FS ### {% for host in groups['fs'] %} {% if hostvars[host]['host_name'] is defined %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Gluster Daemon check_command check_nrpe!check_gluster } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk Usage vdb check_command check_nrpe!check_disk_vdb } {% 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 Disk repo mount check_command check_nrpe!check_disk_repo } 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 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 %} define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Disk repo mount check_command check_nrpe!check_disk_repo } define service{ use custom-service host_name {{ hostvars[host]['host_name'] }} service_description Phabricator Daemon check_command check_nrpe!check_phd } {% 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 -} +#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 -} +#{ % 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 } {% endfor %}