From c363818aa6de38dcb9cdf49a69614affd535a809 Mon Sep 17 00:00:00 2001 From: hadaq Date: Thu, 16 Feb 2012 10:24:53 +0000 Subject: [PATCH] JAM: added configuration for etrax and power supplies --- icinga/objects/commands.cfg | 7 + icinga/objects/hosts_eb_servers.cfg | 7 +- icinga/objects/hosts_etrax.cfg | 324 ++++++++++++++++++++++++++++ icinga/objects/hosts_power.cfg | 180 ++++++++++++++++ icinga/objects/templates.cfg | 19 +- 5 files changed, 530 insertions(+), 7 deletions(-) create mode 100644 icinga/objects/hosts_etrax.cfg create mode 100644 icinga/objects/hosts_power.cfg diff --git a/icinga/objects/commands.cfg b/icinga/objects/commands.cfg index d7f708d..5b795ff 100644 --- a/icinga/objects/commands.cfg +++ b/icinga/objects/commands.cfg @@ -308,6 +308,13 @@ 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 check_epics_pv_local + command_line $USER1$/my_epics.sh -pv $ARG1$ -H 192.168.103.255 -expval $ARG2$ +} + + + # restart any process by name if state is critical after 3 attempts define command { command_name restart_process diff --git a/icinga/objects/hosts_eb_servers.cfg b/icinga/objects/hosts_eb_servers.cfg index 76d680f..3b44f0e 100644 --- a/icinga/objects/hosts_eb_servers.cfg +++ b/icinga/objects/hosts_eb_servers.cfg @@ -122,7 +122,6 @@ define service{ check_command check_proc_status!50998!daq2ora! event_handler restart_process!hadaq!/home/hadaq/trbsoft/daq/oracle/daq2ora_client.pl!"-d -o"! } -# -d -o # runinfo2ora in one process: # define service{ @@ -278,11 +277,9 @@ define service{ retry_check_interval 1 notification_interval 30 notification_options c,w,r - check_command check_multi_proc_by_ssh!hadaq!SCREEN!4!CRITICAL! + check_command check_multi_proc_by_ssh!hadaq!SCREEN!4!CRITICAL! } -# disabled eventhandler until it is really working JAM -#event_handler restart_eb_epics - + #event_handler restart_eb_epics ## direct check of running iocs with fine granularity: # note: these will give critical if ioc is there, but eb process is not diff --git a/icinga/objects/hosts_etrax.cfg b/icinga/objects/hosts_etrax.cfg new file mode 100644 index 0000000..624e78f --- /dev/null +++ b/icinga/objects/hosts_etrax.cfg @@ -0,0 +1,324 @@ +############################################################################### +# Config File for Monitoring etrax nodes +# This file was automatically generated from trb.db files by daq2icinga.pl +# Creation time: 16.02.2012 at 10:22:21 +# +# HOST DEFINITIONS +############################################################################### + +############################################################################### +# Hosts from subcomponent cts +############################################################################### + +# HOST DEFINITION etraxp107 +define host{ + use etrax + host_name etraxp107 ; assigned to blr + alias etraxp107_blr +} + +# HOST DEFINITION etraxp119 +define host{ + use etrax + host_name etraxp119 ; assigned to cts + alias etraxp119_cts +} + +# HOST DEFINITION hadesp31 +define host{ + use etrax + host_name hadesp31 ; assigned to pexor + alias hadesp31_pexor +} + +# HOST DEFINITION etraxp023 +define host{ + use etrax + host_name etraxp023 ; assigned to scs + alias etraxp023_scs +} +define hostgroup{ + hostgroup_name cts + alias etrax_cts + members etraxp107,etraxp119,hadesp31,etraxp023 +} + +############################################################################### +# Hosts from subcomponent mdc +############################################################################### + +############################################################################### +# Hosts from subcomponent start +############################################################################### + +# HOST DEFINITION etraxp082 +define host{ + use etrax + host_name etraxp082 ; assigned to start + alias etraxp082_start +} +define hostgroup{ + hostgroup_name start + alias etrax_start + members etraxp082 +} + +############################################################################### +# Hosts from subcomponent tof +############################################################################### + +# HOST DEFINITION etraxp062 +define host{ + use etrax + host_name etraxp062 ; assigned to tof + alias etraxp062_tof +} + +# HOST DEFINITION etraxp064 +define host{ + use etrax + host_name etraxp064 ; assigned to tof + alias etraxp064_tof +} + +# HOST DEFINITION etraxp072 +define host{ + use etrax + host_name etraxp072 ; assigned to tof + alias etraxp072_tof +} + +# HOST DEFINITION etraxp079 +define host{ + use etrax + host_name etraxp079 ; assigned to tof + alias etraxp079_tof +} + +# HOST DEFINITION etraxp081 +define host{ + use etrax + host_name etraxp081 ; assigned to tof + alias etraxp081_tof +} + +# HOST DEFINITION etraxp084 +define host{ + use etrax + host_name etraxp084 ; assigned to tof + alias etraxp084_tof +} + +# HOST DEFINITION etraxp086 +define host{ + use etrax + host_name etraxp086 ; assigned to tof + alias etraxp086_tof +} +define hostgroup{ + hostgroup_name tof + alias etrax_tof + members etraxp062,etraxp064,etraxp072,etraxp079,etraxp081,etraxp084,etraxp086 +} + +############################################################################### +# Hosts from subcomponent rpc +############################################################################### + +# HOST DEFINITION etraxp031 +define host{ + use etrax + host_name etraxp031 ; assigned to rpc + alias etraxp031_rpc +} + +# HOST DEFINITION etraxp040 +define host{ + use etrax + host_name etraxp040 ; assigned to rpc + alias etraxp040_rpc +} + +# HOST DEFINITION etraxp051 +define host{ + use etrax + host_name etraxp051 ; assigned to rpc + alias etraxp051_rpc +} + +# HOST DEFINITION etraxp052 +define host{ + use etrax + host_name etraxp052 ; assigned to rpc + alias etraxp052_rpc +} + +# HOST DEFINITION etraxp053 +define host{ + use etrax + host_name etraxp053 ; assigned to rpc + alias etraxp053_rpc +} + +# HOST DEFINITION etraxp054 +define host{ + use etrax + host_name etraxp054 ; assigned to rpc + alias etraxp054_rpc +} + +# HOST DEFINITION etraxp056 +define host{ + use etrax + host_name etraxp056 ; assigned to rpc + alias etraxp056_rpc +} + +# HOST DEFINITION etraxp059 +define host{ + use etrax + host_name etraxp059 ; assigned to rpc + alias etraxp059_rpc +} + +# HOST DEFINITION etraxp061 +define host{ + use etrax + host_name etraxp061 ; assigned to rpc + alias etraxp061_rpc +} + +# HOST DEFINITION etraxp063 +define host{ + use etrax + host_name etraxp063 ; assigned to rpc + alias etraxp063_rpc +} + +# HOST DEFINITION etraxp065 +define host{ + use etrax + host_name etraxp065 ; assigned to rpc + alias etraxp065_rpc +} + +# HOST DEFINITION etraxp067 +define host{ + use etrax + host_name etraxp067 ; assigned to rpc + alias etraxp067_rpc +} + +# HOST DEFINITION etraxp068 +define host{ + use etrax + host_name etraxp068 ; assigned to rpc + alias etraxp068_rpc +} + +# HOST DEFINITION etraxp074 +define host{ + use etrax + host_name etraxp074 ; assigned to rpc + alias etraxp074_rpc +} + +# HOST DEFINITION etraxp075 +define host{ + use etrax + host_name etraxp075 ; assigned to rpc + alias etraxp075_rpc +} + +# HOST DEFINITION etraxp078 +define host{ + use etrax + host_name etraxp078 ; assigned to rpc + alias etraxp078_rpc +} + +# HOST DEFINITION etraxp080 +define host{ + use etrax + host_name etraxp080 ; assigned to rpc + alias etraxp080_rpc +} + +# HOST DEFINITION etraxp083 +define host{ + use etrax + host_name etraxp083 ; assigned to rpc + alias etraxp083_rpc +} + +# HOST DEFINITION etraxp085 +define host{ + use etrax + host_name etraxp085 ; assigned to rpc + alias etraxp085_rpc +} + +# HOST DEFINITION etraxp089 +define host{ + use etrax + host_name etraxp089 ; assigned to rpc + alias etraxp089_rpc +} + +# HOST DEFINITION etraxp091 +define host{ + use etrax + host_name etraxp091 ; assigned to rpc + alias etraxp091_rpc +} + +# HOST DEFINITION etraxp092 +define host{ + use etrax + host_name etraxp092 ; assigned to rpc + alias etraxp092_rpc +} + +# HOST DEFINITION etraxp094 +define host{ + use etrax + host_name etraxp094 ; assigned to rpc + alias etraxp094_rpc +} + +# HOST DEFINITION etraxp122 +define host{ + use etrax + host_name etraxp122 ; assigned to rpc + alias etraxp122_rpc +} +define hostgroup{ + hostgroup_name rpc + alias etrax_rpc + members etraxp031,etraxp040,etraxp051,etraxp052,etraxp053,etraxp054,etraxp056,etraxp059,etraxp061,etraxp063,etraxp065,etraxp067,etraxp068,etraxp074,etraxp075,etraxp078,etraxp080,etraxp083,etraxp085,etraxp089,etraxp091,etraxp092,etraxp094,etraxp122 +} + +############################################################################### +# Hosts from subcomponent shower +############################################################################### + + +############################################################################### +# Hostgroup definition for all nodes +############################################################################### +define hostgroup{ + hostgroup_name etrax + alias all etrax nodes + hostgroup_members cts,start,tof,rpc +} + + +############################################################################### +# Ping service for all nodes +############################################################################### +define service{ + use remote-service + hostgroup_name etrax + service_description PING + check_command check-host-alive +} diff --git a/icinga/objects/hosts_power.cfg b/icinga/objects/hosts_power.cfg new file mode 100644 index 0000000..9e3b0ec --- /dev/null +++ b/icinga/objects/hosts_power.cfg @@ -0,0 +1,180 @@ +############################################################################### +# Config File for Monitoring power supplies +# +# HOST DEFINITIONS +############################################################################### + + + +############################################################################### +# power supplies +############################################################################### + + + +define host{ + use power ; Name of host template to use + host_name hadps003 + alias hadps003 +} + +define host{ + use power ; Name of host template to use + host_name hadps005 + alias hadps005 +} + + +define host{ + use power ; Name of host template to use + host_name hadps012 + alias hadps012 +} + +define host{ + use power ; Name of host template to use + host_name hadps009 + alias hadps009 +} + +define host{ + use power ; Name of host template to use + host_name hadps010 + alias hadps010 +} + +define host{ + use power ; Name of host template to use + host_name hadps011 + alias hadps011 +} + + +define host{ + use power ; Name of host template to use + host_name hadps013 + alias hadps013 +} + +define host{ + use power ; Name of host template to use + host_name hadps014 + alias hadps014 +} + +define host{ + use power ; Name of host template to use + host_name hadps015 + alias hadps015 +} + +define host{ + use power ; Name of host template to use + host_name hadps016 + alias hadps016 +} + + +############################################################################### +# caen +############################################################################### + +define host{ + use power ; Name of host template to use + host_name hadhvp01 + alias hadhvp01 +} + +define host{ + use power ; Name of host template to use + host_name hadhvp02 + alias hadhvp02 +} + + +define host{ + use power ; Name of host template to use + host_name hadhvp03 + alias hadhvp03 +} + +define host{ + use power ; Name of host template to use + host_name hadhvp04 + alias hadhvp04 +} + +define host{ + use power ; Name of host template to use + host_name hadhvp05 + alias hadhvp05 +} + +define host{ + use power ; Name of host template to use + host_name hadhvp06 + alias hadhvp06 +} + +define host{ + use power ; Name of host template to use + host_name hadhvp07 + alias hadhvp07 +} + + + + + +############################################################################### +# HOST GROUP DEFINITION +############################################################################### + + +## all power supplies +define hostgroup{ + hostgroup_name power + alias power supplies + members hadps003, hadps005, hadps012, hadps009, hadps010, hadps011, hadps013, hadps014, hadps015, hadps016 +} + +# Eventbuilder servers in use for eventbuilding +define hostgroup{ + hostgroup_name caen + alias caen crates + members hadhvp01,hadhvp02, hadhvp03, hadhvp04, hadhvp05, hadhvp06, hadhvp07 +} + + +############################################################################### +# SERVICE DEFINITIONS +############################################################################### + +############################################################################### +# Ping service for all nodes +############################################################################### + +define service{ + use remote-service + hostgroup_name power,caen + service_description PING + check_command check-host-alive +} + + + + + +# define service{ +# use remote-service +# host_name lxhadeb05 +# service_description EB09-status +# normal_check_interval 10 +# retry_check_interval 2 +# notification_interval 30 +# notification_options c,u,r +# check_command check_epics_pv!hadaq!HAD:eb09:status!1 +# } + + + diff --git a/icinga/objects/templates.cfg b/icinga/objects/templates.cfg index da97473..9123128 100644 --- a/icinga/objects/templates.cfg +++ b/icinga/objects/templates.cfg @@ -139,9 +139,23 @@ define host{ define host{ name eb-server ; The name of this host template use linux-server - check_interval 1 + check_interval 3 + notification_period 24x7 } +define host{ + name etrax ; The name of this host template + use linux-server + check_interval 5 + notification_period 24x7 +} + +define host{ + name power ; The name of this host template + use linux-server + check_interval 5 + notification_period 24x7 +} @@ -191,7 +205,8 @@ define service{ max_check_attempts 4 ; Re-check the service up to 4 times in order to determine its final (hard) state normal_check_interval 5 ; Check the service every 5 minutes under normal conditions retry_check_interval 1 ; Re-check the service every minute until a hard state can be determined - register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! + notification_options c,u,r + register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } define service{ -- 2.43.0