# # HOST DEFINITION # define host { use linux-server host_name gateway display_name Gateway address gateway } define host { use linux-server host_name ap display_name Acces Point address ap } define host { use linux-server host_name internet display_name Internet edge address core1-BE1.southbank.ukcore.bt.net parents gateway } define host { use linux-server host_name defiant display_name Defiant address defiant } define host { use linux-server host_name firebrand display_name Firebrand address firebrand } define host { use linux-server host_name virtualip display_name VirtualIP address virtualip } define host { use linux-server host_name virtualipin display_name VirtualIP-In address virtualipin } define host { use linux-server host_name virtualipout display_name VirtualIP-out address virtualipout } # # HOST GROUP DEFINITION # define hostgroup { hostgroup_name linux-servers alias Linux Servers members firebrand,defiant } ############################################################################### # # SERVICE DEFINITIONS # ############################################################################### # # Machine state checks # define service { use local-service host_name gateway,virtualip,internet,ap hostgroup_name linux-servers service_description PING check_command check_ping!100.0,20%!500.0,60% action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=rta%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Current Load check_command check_load action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=load5%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Current Users check_command check_users action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=users%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Total Processes check_command check_procs action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=procs%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Swap Usage check_command check_swap!20!10 action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=swap%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Root Volume check_command check_disk!15%!10%!/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description PostgreSQL Volume check_command check_disk!20%!10%!/var/lib/postgresql/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/lib/postgresql%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Portage Volume check_command check_disk!10%!5%!/usr/portage/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/usr/portage%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Portage Repo check_command check_file_age!/usr/portage/.git/FETCH_HEAD action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=age%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Apache access check_command check_file_age!/var/log/apache2/access.log action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=age%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Saved kernel config check_command check_file_exists!/etc/portage/savedconfig/sys-kernel/gentoo-kernel process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description New kernel config check_command check_file_no_linger!/etc/portage/savedconfig/sys-kernel/._cfg*_gentoo-kernel process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Sensors check_command check_sensors } define service { use remote-service hostgroup_name linux-servers service_description Cache Volume check_command check_disk!10%!5%!/var/cache/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/cache%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description DHCPD check_command check_service!dhcpd4 process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Corosync check_command check_service!corosync process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Pacemaker check_command check_service!pacemaker process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Kernel version check_command check_kernel process_perf_data 0 } # # Machine service checks # define service { use local-service hostgroup_name linux-servers host_name gateway service_description SSH check_command check_ssh action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description PostgreSQL check_command check_pgsql } define service { use local-service host_name virtualip service_description PostgreSQL replication check_command check_pg_repl action_url /nagiosgraph/cgi-bin/showservice.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=800x170&expand_period=day,week,month,year&period=day,week,month,year } define service { use local-service hostgroup_name linux-servers service_description NetFS check_command check_ice!4000!Service action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=Service%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description NetFS-GitFS check_command check_ice!5000!Service action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=Service%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description GB API check_command check_ice!9001!portage!users!maintenance action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=users%2Cdata&db=portage%2Cdata&db=maintenance%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description MirrorSearch API check_command check_ice!9002!Search action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=Search%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description LDAP check_command check_ldap action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description NTP time check_command check_ntp action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=offset%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description DNS check_command check_dns action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service hostgroup_name linux-servers service_description HA Proxy check_command check_haproxy process_perf_data 0 max_check_attempts 2 check_interval 1 retry_interval 1 } define service { use remote-service hostgroup_name linux-servers service_description DRBD check_command check_drbd process_perf_data 0 max_check_attempts 2 check_interval 1 retry_interval 1 } define service { use remote-service hostgroup_name linux-servers service_description Raid check_command check_raid process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Home mount check_command check_mount!/home } define service { use remote-service hostgroup_name linux-servers service_description WWW mount check_command check_mount!/var/www/shared } define service { use remote-service hostgroup_name linux-servers service_description Git mount check_command check_mount!/var/git } define service { use remote-service hostgroup_name linux-servers service_description mp3s mount check_command check_mount!/var/mp3s } define service { use remote-service hostgroup_name linux-servers service_description Spam Assassin check_command check_service!spamassassin process_perf_data 0 } define service { use remote-service host_name virtualipout service_description Squid check_command check_tcp!8080 action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use remote-service hostgroup_name linux-servers service_description Fail2ban check_command check_service!fail2ban process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Clam check_command check_service!clamav-daemon process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description NSCD check_command check_service!nscd process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description NSLCD check_command check_service!nslcd process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description AutoFS check_command check_service!autofs process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description DistCCD check_command check_service!distccd process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Cron check_command check_service!cronie process_perf_data 0 } define service { use remote-service hostgroup_name linux-servers service_description Needing restart check_command check_needrestart process_perf_data 0 check_interval 30 notifications_enabled 0 } # # Cluster state checks # define service { use remote-service host_name virtualip service_description Git Volume check_command check_disk!10%!5%!/var/git/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/git%2Cdata&geom=800x180 } define service { use remote-service host_name virtualip service_description Home Volume check_command check_disk!10%!5%!/home/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/home%2Cdata&geom=800x180 } define service { use remote-service host_name virtualip service_description WWW Volume check_command check_disk!10%!5%!/var/www/shared/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/www/shared%2Cdata&geom=800x180 } define service { use remote-service host_name virtualip service_description Store Volume check_command check_disk!7000!5000!/var/store/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/store%2Cdata&geom=800x180 check_interval 30 } define service { use remote-service host_name virtualip service_description mp3s Volume check_command check_disk!500!200!/var/mp3s/ action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/mp3s%2Cdata&geom=800x180 } # # Cluster services checks # define service { use local-service host_name virtualipin service_description HA Proxy stats check_command check_tcp!9000 action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service host_name virtualipin service_description HTTPS check_command check_https action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service host_name virtualipin,gateway service_description HTTP check_command check_http action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service host_name virtualipin service_description SMTP check_command check_smtp action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service host_name virtualipin service_description IMAPS check_command check_simap action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=time%2Cdata&geom=800x180 } define service { use local-service host_name virtualip service_description CRM check_command check_crm process_perf_data 0 } define service { use local-service host_name virtualip service_description GlusterFS home check_command check_glusterfs!home } define service { use local-service host_name virtualip service_description GlusterFS git check_command check_glusterfs!git } define service { use local-service host_name virtualip service_description GlusterFS store check_command check_glusterfs_nospace!store } define service { use local-service host_name virtualip service_description GlusterFS www check_command check_glusterfs!www } # # Passive checks # define command { command_name passive-only command_line /usr/lib64/nagios/plugins/check_dummy 3 "Unknown: passive-only" } define service { use generic-service name passive-service register 0 active_checks_enabled 0 passive_checks_enabled 1 check_command passive-only } define service { use passive-service host_name firebrand service_description GB API Package Updates check_freshness 1 freshness_threshold 3600 action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=800x180 } define service { use passive-service host_name firebrand service_description GB API Bug Updates check_freshness 1 freshness_threshold 3600 action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&geom=800x180 } define service { use passive-service host_name virtualip service_description Backup Volume check_freshness 1 freshness_threshold 86400 action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&db=/var/backup%2Cdata&geom=800x180 }