aboutsummaryrefslogtreecommitdiffstats
path: root/nagios-templates.cfg
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2010-01-06 19:22:24 +0000
committerPetter Reinholdtsen <pere@hungry.com>2010-01-06 19:22:24 +0000
commit2663b94bc3c1d86839d8d71fcb98b9b9e01c782a (patch)
treeae0ef4787a3bdbcbdc6b117024bec768405bfce4 /nagios-templates.cfg
parentbe7fafe44ab8ef50f4bcd2bdd3ff339796d223e0 (diff)
downloadsitesummary-2663b94bc3c1d86839d8d71fcb98b9b9e01c782a.tar.gz
sitesummary-2663b94bc3c1d86839d8d71fcb98b9b9e01c782a.tar.bz2
sitesummary-2663b94bc3c1d86839d8d71fcb98b9b9e01c782a.tar.xz
Implement draft Nagios autoconfiguration.
Diffstat (limited to 'nagios-templates.cfg')
-rw-r--r--nagios-templates.cfg123
1 files changed, 123 insertions, 0 deletions
diff --git a/nagios-templates.cfg b/nagios-templates.cfg
new file mode 100644
index 0000000..eafcd74
--- /dev/null
+++ b/nagios-templates.cfg
@@ -0,0 +1,123 @@
+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 command {
+ command_name notify-by-nothing
+ command_line /bin/true
+}
+
+define command{
+ command_name notify-by-email
+ command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nState: $SERVICESTATE$ for $SERVICEDURATION$\nAddress: $HOSTADDRESS$\n\nInfo:\n\n$SERVICEOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nACK by: $SERVICEACKAUTHOR$\nComment: $SERVICEACKCOMMENT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert $NOTIFICATIONNUMBER$ - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
+}
+
+define contact {
+ contact_name root
+ alias Root
+ host_notification_period 24x7
+ service_notification_period 24x7
+ host_notification_options d,r
+ service_notification_options w,u,c,r
+ host_notification_commands notify-by-nothing
+ service_notification_commands notify-by-nothing
+ email root@postoffice
+}
+
+define contactgroup{
+ contactgroup_name admins
+ alias Nagios Administrators
+ members root
+}
+
+define host {
+ name server-host
+ check_command check-host-alive
+ max_check_attempts 10
+ event_handler_enabled 1
+ flap_detection_enabled 1
+ process_perf_data 1
+ retain_status_information 1
+ retain_nonstatus_information 1
+ notification_interval 0
+ notification_period 24x7
+ notifications_enabled 1
+ failure_prediction_enabled 1
+ register 0
+ notification_options d,u,r
+ contact_groups admins
+}
+
+define service {
+ name server-service
+ is_volatile 0
+ max_check_attempts 4
+ normal_check_interval 5
+ retry_check_interval 1
+ active_checks_enabled 1
+ passive_checks_enabled 1
+ check_period 24x7
+ parallelize_check 1
+ obsess_over_service 1
+ check_freshness 0
+ event_handler_enabled 1
+ flap_detection_enabled 1
+ process_perf_data 1
+ retain_status_information 1
+ retain_nonstatus_information 1
+ notification_interval 0
+ notification_period 24x7
+ notifications_enabled 1
+ failure_prediction_enabled 1
+ register 0
+ notification_options w,u,c,r
+ contact_groups admins
+}
+
+define command{
+ command_name check_disk
+ command_line /usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
+}
+
+define command{
+ command_name check_http
+ command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ -I $HOSTADDRESS$
+}
+
+define command{
+ command_name check_load
+ command_line /usr/lib/nagios/plugins/check_load --warning=$ARG2$ --critical=$ARG2$
+}
+
+define command{
+ command_name check_ping
+ command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
+}
+
+define command{
+ command_name check_ssh
+ command_line /usr/lib/nagios/plugins/check_ssh $HOSTADDRESS$
+}
+
+define command{
+ command_name check_ntp
+ command_line /usr/lib/nagios/plugins/check_ntp -H $HOSTADDRESS$
+}
+
+define command{
+ command_name check_tcp
+ command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p $ARG1$
+}
+
+define command{
+ command_name check-host-alive
+ command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w 5000,100% -c 5000,100% -p 1
+}