[dw-ops] Initial checkin of the bulk of our Nagios configuration, as minimal as it is.
[commit: http://hg.dwscoalition.org/dw-ops/rev/5b22d049e0b7]
Initial checkin of the bulk of our Nagios configuration, as minimal as it
is.
Patch by
mark.
Files modified:
Initial checkin of the bulk of our Nagios configuration, as minimal as it
is.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- nagios/conf.d/config/commands.cfg
- nagios/conf.d/config/contacts.cfg
- nagios/conf.d/config/hostgroups.cfg
- nagios/conf.d/config/timeperiods.cfg
- nagios/conf.d/generics/host.cfg
- nagios/conf.d/generics/service.cfg
- nagios/conf.d/hosts/dfw-admin01-auto.cfg
- nagios/conf.d/hosts/dfw-db01-auto.cfg
- nagios/conf.d/hosts/dfw-db02-auto.cfg
- nagios/conf.d/hosts/dfw-jobs01-auto.cfg
- nagios/conf.d/hosts/dfw-lb01-auto.cfg
- nagios/conf.d/hosts/dfw-lb02-auto.cfg
- nagios/conf.d/hosts/dfw-mail01-auto.cfg
- nagios/conf.d/hosts/dfw-memc01-auto.cfg
- nagios/conf.d/hosts/dfw-memc02-auto.cfg
- nagios/conf.d/hosts/dfw-mog01-auto.cfg
- nagios/conf.d/hosts/dfw-mog02-auto.cfg
- nagios/conf.d/hosts/dfw-web01-auto.cfg
- nagios/conf.d/hosts/dfw-web02-auto.cfg
- nagios/conf.d/services/all.cfg
- nagios/conf.d/services/db.cfg
- nagios/conf.d/services/memc.cfg
- nagios/conf.d/services/web.cfg
-------------------------------------------------------------------------------- diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/config/commands.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/config/commands.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,28 @@ +# +# commands.cfg +# +# Define commands that we use to check various components. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# check_mysql is a basic check for a database being available +define command { + command_name dw_check_mysql + command_line $USER1$/check_mysql -H $HOSTADDRESS$ -u $USER3$ -p $USER4$ +} + + +# check memcache machine to ensure it's listening +define command { + command_name dw_check_memcache + command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 11211 +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/config/contacts.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/config/contacts.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,42 @@ +# +# contacts.cfg +# +# Defines people that the Nagios configuration will contact if it detects a +# problem with the serving infrastructure. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# contacts go here +# note that it is important to try to use email addresses and contact methods +# that don't rely on the production cluster to be functional + +define contact { + contact_name mark + alias Mark Smith + service_notification_period always + host_notification_period always + service_notification_options w,u,c,r + host_notification_options d,r + service_notification_commands notify-service-by-email + host_notification_commands notify-host-by-email + email smitty@gmail.com +} + + + +# contact groups + +define contactgroup { + contactgroup_name admins + alias Systems Administrators + members mark +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/config/hostgroups.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/config/hostgroups.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,84 @@ +# +# hostgroups.cfg +# +# Configuration of host classes that we support in the production infrastructure. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# matches all servers, for applying services or things to everybody +define hostgroup { + hostgroup_name all + alias All Servers + members * +} + + +# web servers (runs Apache mostly) +define hostgroup { + hostgroup_name web + alias Web Servers +} + + +# incoming mail +define hostgroup { + hostgroup_name mail + alias Incoming Mail Servers +} + + + +# job processors +define hostgroup { + hostgroup_name jobs + alias Job Servers +} + + + +# load balancers/perlbal +define hostgroup { + hostgroup_name lb + alias Perlbal Servers +} + + + +# mogile storage nodes +define hostgroup { + hostgroup_name mog + alias Mogile Storage Servers +} + + + +# memcache +define hostgroup { + hostgroup_name memc + alias Memcache Servers +} + + + +# databases +define hostgroup { + hostgroup_name db + alias Database Servers +} + + + +# administrivia +define hostgroup { + hostgroup_name admin + alias Admin Servers +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/config/timeperiods.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/config/timeperiods.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,35 @@ +# +# timeperiods.cfg +# +# Configures time periods for easy referencing later in the configuration. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# always is "all alerts, all the time!!" +define timeperiod { + timeperiod_name always + alias Always + 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 +} + + +# never contact someone +define timeperiod { + timeperiod_name never + alias Never +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/generics/host.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/generics/host.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,33 @@ +# +# generic-host.cfg +# +# Defines the generic host template that we use on all of our hosts to give +# us the standard configuration. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +define host{ + name generic-host + notifications_enabled 1 ; Host notifications are enabled + event_handler_enabled 1 ; Host 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 + check_command check-host-alive + max_check_attempts 10 + notification_interval 0 + notification_period always + notification_options d,u,r + contact_groups admins + register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/generics/service.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/generics/service.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,40 @@ +# +# generic-service.cfg +# +# Defines a generic service template we use all over the place. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + +# generic service template definition +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 + notification_interval 0 ; Only send notifications on status change by default. + is_volatile 0 + check_period always + normal_check_interval 5 + retry_check_interval 1 + max_check_attempts 4 + notification_period always + notification_options w,u,c,r + contact_groups admins + register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-admin01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-admin01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.124 dfw-admin01 + +define host { + host_name dfw-admin01 + alias dfw-admin01 + hostgroups admin + address 10.176.64.124 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-db01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-db01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.134 dfw-db01 + +define host { + host_name dfw-db01 + alias dfw-db01 + hostgroups db + address 10.176.64.134 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-db02-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-db02-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.135 dfw-db02 + +define host { + host_name dfw-db02 + alias dfw-db02 + hostgroups db + address 10.176.64.135 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-jobs01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-jobs01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.133 dfw-jobs01 + +define host { + host_name dfw-jobs01 + alias dfw-jobs01 + hostgroups jobs + address 10.176.64.133 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-lb01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-lb01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.125 dfw-lb01 + +define host { + host_name dfw-lb01 + alias dfw-lb01 + hostgroups lb + address 10.176.64.125 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-lb02-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-lb02-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.126 dfw-lb02 + +define host { + host_name dfw-lb02 + alias dfw-lb02 + hostgroups lb + address 10.176.64.126 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-mail01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-mail01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.137 dfw-mail01 + +define host { + host_name dfw-mail01 + alias dfw-mail01 + hostgroups mail + address 10.176.64.137 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-memc01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-memc01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.127 dfw-memc01 + +define host { + host_name dfw-memc01 + alias dfw-memc01 + hostgroups memc + address 10.176.64.127 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-memc02-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-memc02-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.128 dfw-memc02 + +define host { + host_name dfw-memc02 + alias dfw-memc02 + hostgroups memc + address 10.176.64.128 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-mog01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-mog01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.129 dfw-mog01 + +define host { + host_name dfw-mog01 + alias dfw-mog01 + hostgroups mog + address 10.176.64.129 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-mog02-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-mog02-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.130 dfw-mog02 + +define host { + host_name dfw-mog02 + alias dfw-mog02 + hostgroups mog + address 10.176.64.130 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-web01-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-web01-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.131 dfw-web01 + +define host { + host_name dfw-web01 + alias dfw-web01 + hostgroups web + address 10.176.64.131 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/hosts/dfw-web02-auto.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/hosts/dfw-web02-auto.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,10 @@ +# Auto-generated at Sun Apr 5 20:01:53 2009 +# 10.176.64.132 dfw-web02 + +define host { + host_name dfw-web02 + alias dfw-web02 + hostgroups web + address 10.176.64.132 + use generic-host +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/services/all.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/services/all.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,24 @@ +# +# all.cfg +# +# This service definition file defines some very basic services that we use +# for all hosts. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# ssh is useful for lots of things, keep it up +define service { + hostgroup_name all + service_description SSH + check_command check_ssh + use generic-service +} diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/services/db.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/services/db.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,24 @@ +# +# db.cfg +# +# Checks we run on databases. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# verify that MySQL is responding +define service { + hostgroup_name db + service_description MySQL + check_command dw_check_mysql + use generic-service +} + diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/services/memc.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/services/memc.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,24 @@ +# +# memc.cfg +# +# Checks we run on memcache servers. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# verify that memcache is responding +define service { + hostgroup_name memc + service_description Memcached + check_command dw_check_memcache + use generic-service +} + diff -r 6cd48825b280 -r 5b22d049e0b7 nagios/conf.d/services/web.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nagios/conf.d/services/web.cfg Mon Apr 06 01:41:01 2009 +0000 @@ -0,0 +1,23 @@ +# +# web.cfg +# +# Configuration of services to check on webservers. +# +# Authors: +# Mark Smith <mark@dreamwidth.org> +# +# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# +# This program is free software; you may redistribute it and/or modify it under +# the same terms as Perl itself. For a copy of the license, please reference +# 'perldoc perlartistic' or 'perldoc perlgpl'. +# + + +# check that web services are running +define service { + hostgroup_name web + service_description Apache + check_command check_http + use generic-service +} --------------------------------------------------------------------------------