From 5dcea46246ce5ecd604c2e61460dc7bc9a81859f Mon Sep 17 00:00:00 2001 From: hadaq Date: Fri, 10 Feb 2012 16:37:17 +0000 Subject: [PATCH] added event handlers to icinga config. some new admins contacts --- icinga/objects/commands.cfg | 5 ++ icinga/objects/contacts.cfg | 31 +++++++++++- icinga/objects/hosts_eb_servers.cfg | 74 +++++++++++++++-------------- icinga/objects/localhost.cfg | 4 +- icinga/objects/templates.cfg | 3 +- 5 files changed, 78 insertions(+), 39 deletions(-) diff --git a/icinga/objects/commands.cfg b/icinga/objects/commands.cfg index 628a785..21b54b4 100644 --- a/icinga/objects/commands.cfg +++ b/icinga/objects/commands.cfg @@ -308,4 +308,9 @@ define command { command_line $USER1$/check_by_ssh -l $ARG1$ -H $HOSTADDRESS$ -C "/home/hadaq/nagios/plugins/my_epics.sh -pv $ARG2$ -H 192.168.103.255 -expval $ARG3$" } +define command { + command_name restart_process + command_line $USER1$/my_restart_handler.pl -r -m $ARG1$@$HOSTADDRESS$ -s $ARG2$ -a $ARG3$ -x $SERVICESTATE$ -y $SERVICESTATETYPE$ -z $SERVICEATTEMPT$ +} + diff --git a/icinga/objects/contacts.cfg b/icinga/objects/contacts.cfg index 82d9e0d..3c78558 100644 --- a/icinga/objects/contacts.cfg +++ b/icinga/objects/contacts.cfg @@ -40,6 +40,35 @@ define contact{ email j.adamczewski@gsi.de ; } +define contact{ + contact_name michael ; Short name of user + use generic-contact ; Inherit default values from generic-contact template (defined above) + alias Michael Traxler ; Full name of user + email m.traxler@gsi.de ; + } + +define contact{ + contact_name ludwig ; Short name of user + use generic-contact ; Inherit default values from generic-contact template (defined above) + alias Ludwig Maier ; Full name of user + email ludwig.maier@ph.tum.de ; + } + +define contact{ + contact_name jan ; Short name of user + use generic-contact ; Inherit default values from generic-contact template (defined above) + alias Jan Michel ; Full name of user + email michel@physik.uni-frankfurt.de ; + } + +define contact{ + contact_name ingo ; Short name of user + use generic-contact ; Inherit default values from generic-contact template (defined above) + alias Ingo Froehlich ; Full name of user + email Froehlich@physik.uni-frankfurt.de; + } + + ############################################################################### ############################################################################### @@ -55,5 +84,5 @@ define contact{ define contactgroup{ contactgroup_name admins alias Icinga Administrators - members icingaadmin,joern + members joern,michael,ludwig,jan,ingo } diff --git a/icinga/objects/hosts_eb_servers.cfg b/icinga/objects/hosts_eb_servers.cfg index 74ea06c..2f875fd 100644 --- a/icinga/objects/hosts_eb_servers.cfg +++ b/icinga/objects/hosts_eb_servers.cfg @@ -120,6 +120,7 @@ define service{ notification_interval 30 notification_options c,r check_command check_proc_status!50998!daq2ora! + event_handler restart_process!hadaq!/home/hadaq/trbsoft/daq/oracle/daq2ora_client.pl!"-d -o"! } # runinfo2ora in one process: @@ -148,16 +149,17 @@ define service{ } -define service{ - use remote-service - host_name lxhadesdaq - service_description EB_LOGMONITOR - normal_check_interval 2 - retry_check_interval 1 - notification_interval 30 - notification_options c,r - check_command check_proc_status!50994!eb_logmonitor! - } +# not needed anymore? +# define service{ +# use remote-service +# host_name lxhadesdaq +# service_description EB_LOGMONITOR +# normal_check_interval 2 +# retry_check_interval 1 +# notification_interval 30 +# notification_options c,r +# check_command check_proc_status!50994!eb_logmonitor! +# } #check disk space define service{ @@ -232,8 +234,9 @@ define service{ normal_check_interval 10 retry_check_interval 1 notification_interval 30 - notification_options c,r + notification_options c,u,r check_command check_proc_by_ssh!hadaq!daq_disks! + event_handler restart_process!hadaq!/home/hadaq/bin/daq_disks!"-s 10"! } define service{ @@ -243,8 +246,9 @@ define service{ normal_check_interval 10 retry_check_interval 1 notification_interval 30 - notification_options c,r + notification_options c,u,r check_command check_proc_status!50501!cleanup! + event_handler restart_process!hadaq!/home/hadaq/bin/cleanup.pl!"-d"! } @@ -255,7 +259,7 @@ define service{ normal_check_interval 10 retry_check_interval 1 notification_interval 30 - notification_options c,r + notification_options c,u,r check_command check_adaptec!hadaq! } @@ -517,7 +521,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data01! + check_command check_disk_by_ssh!hadaq!5%!2%!/data01! } define service{ @@ -529,7 +533,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data02! + check_command check_disk_by_ssh!hadaq!5%!2%!/data02! } define service{ @@ -541,7 +545,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data03! + check_command check_disk_by_ssh!hadaq!5%!2%!/data03! } define service{ @@ -553,7 +557,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data04! + check_command check_disk_by_ssh!hadaq!5%!2%!/data04! } define service{ @@ -564,7 +568,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data05! + check_command check_disk_by_ssh!hadaq!5%!2%!/data05! } define service{ @@ -575,7 +579,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data06! + check_command check_disk_by_ssh!hadaq!5%!2%!/data06! } define service{ @@ -586,7 +590,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data07! + check_command check_disk_by_ssh!hadaq!5%!2%!/data07! } define service{ @@ -597,7 +601,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data08! + check_command check_disk_by_ssh!hadaq!5%!2%!/data08! } define service{ @@ -608,7 +612,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data09! + check_command check_disk_by_ssh!hadaq!5%!2%!/data09! } define service{ @@ -619,7 +623,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data10! + check_command check_disk_by_ssh!hadaq!5%!2%!/data10! } define service{ @@ -630,7 +634,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data11! + check_command check_disk_by_ssh!hadaq!5%!2%!/data11! } define service{ @@ -641,7 +645,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data12! + check_command check_disk_by_ssh!hadaq!5%!2%!/data12! } define service{ @@ -652,7 +656,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data13! + check_command check_disk_by_ssh!hadaq!5%!2%!/data13! } define service{ @@ -663,7 +667,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data14! + check_command check_disk_by_ssh!hadaq!5%!2%!/data14! } define service{ @@ -674,7 +678,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data15! + check_command check_disk_by_ssh!hadaq!5%!2%!/data15! } define service{ @@ -685,7 +689,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data16! + check_command check_disk_by_ssh!hadaq!5%!2%!/data16! } @@ -700,7 +704,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data17! + check_command check_disk_by_ssh!hadaq!5%!2%!/data17! } define service{ @@ -711,7 +715,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data18! + check_command check_disk_by_ssh!hadaq!5%!2%!/data18! } define service{ @@ -722,7 +726,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data19! + check_command check_disk_by_ssh!hadaq!5%!2%!/data19! } define service{ @@ -733,7 +737,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data20! + check_command check_disk_by_ssh!hadaq!5%!2%!/data20! } define service{ @@ -744,7 +748,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data21! + check_command check_disk_by_ssh!hadaq!5%!2%!/data21! } define service{ @@ -755,7 +759,7 @@ define service{ normal_check_interval 20 retry_check_interval 1 notification_interval 120 - check_command check_disk_by_ssh!hadaq!6%!2%!/data22! + check_command check_disk_by_ssh!hadaq!5%!2%!/data22! } diff --git a/icinga/objects/localhost.cfg b/icinga/objects/localhost.cfg index c6286a9..048c567 100644 --- a/icinga/objects/localhost.cfg +++ b/icinga/objects/localhost.cfg @@ -89,7 +89,7 @@ define service{ use local-service ; Name of service template to use host_name localhost service_description Current Users - check_command check_local_users!20!50 + check_command check_local_users!40!100 } @@ -101,7 +101,7 @@ define service{ use local-service ; Name of service template to use host_name localhost service_description Total Processes - check_command check_local_procs!250!400!RSZDT + check_command check_local_procs!500!1000!RSZDT } diff --git a/icinga/objects/templates.cfg b/icinga/objects/templates.cfg index 3d00c5c..e4d0763 100644 --- a/icinga/objects/templates.cfg +++ b/icinga/objects/templates.cfg @@ -199,6 +199,7 @@ define service{ use generic-service max_check_attempts 3 normal_check_interval 5 - retry_check_interval 1 + retry_check_interval 1 + notification_options c,u,r register 0 } -- 2.43.0