From d64defb7ae184182012534108647e03ae24963c1 Mon Sep 17 00:00:00 2001 From: hadaq Date: Fri, 24 Feb 2012 16:24:55 +0000 Subject: [PATCH] JAM: added hub and wall components to icinga etrax config. Allow doubly assigned nodes. --- icinga/objects/daq2icinga.pl | 6 +- icinga/objects/hosts_eb_servers.cfg | 10 ++ icinga/objects/hosts_etrax.cfg | 137 ++++++++++++++++++++++++++-- 3 files changed, 143 insertions(+), 10 deletions(-) diff --git a/icinga/objects/daq2icinga.pl b/icinga/objects/daq2icinga.pl index cff6f9d..88cecdd 100755 --- a/icinga/objects/daq2icinga.pl +++ b/icinga/objects/daq2icinga.pl @@ -17,7 +17,7 @@ use File::Basename; my $icinga_config_file = "./hosts_etrax.cfg"; my $daqpath = "/home/hadaq/trbsoft/daq/"; my $dbfile = "trb.db"; -my @subsystems = ("cts","mdc","start","tof","rpc","shower"); +my @subsystems = ("cts","mdc","start","tof","rpc","shower","wall", "hub"); # on hadesdaq02 we also have access to epics: my $epicsconfig = "/home/scs/apps/hades/db/desc_ioc.db"; my @totalsystems; @@ -76,7 +76,9 @@ foreach my $component(@subsystems) print "Found node $nodename of component $cid\n"; if (grep {$_ eq $nodename} @totalnodes) { - print "!!!! WARNING: found duplicate node $nodename in $inputfile! Skipped.\n"; + print "!!!! WARNING: found duplicate node $nodename in $inputfile!\n"; + push(@validnodes, $nodename); + # we still assign the duplicate host to our group... next; } push(@validnodes, $nodename); diff --git a/icinga/objects/hosts_eb_servers.cfg b/icinga/objects/hosts_eb_servers.cfg index 3b44f0e..1a5e644 100644 --- a/icinga/objects/hosts_eb_servers.cfg +++ b/icinga/objects/hosts_eb_servers.cfg @@ -566,6 +566,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data05 is_volatile 0 @@ -577,6 +578,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data06 is_volatile 0 @@ -588,6 +590,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data07 is_volatile 0 @@ -599,6 +602,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data08 is_volatile 0 @@ -610,6 +614,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data09 is_volatile 0 @@ -621,6 +626,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data10 is_volatile 0 @@ -632,6 +638,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data11 is_volatile 0 @@ -643,6 +650,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data12 is_volatile 0 @@ -654,6 +662,7 @@ define service{ define service{ use remote-service + host_name lxhadeb05 hostgroup_name eb-servers-fulldisks service_description /data13 is_volatile 0 @@ -666,6 +675,7 @@ define service{ define service{ use remote-service hostgroup_name eb-servers-fulldisks + host_name lxhadeb05 service_description /data14 is_volatile 0 normal_check_interval 20 diff --git a/icinga/objects/hosts_etrax.cfg b/icinga/objects/hosts_etrax.cfg index b0595b0..4970c14 100644 --- a/icinga/objects/hosts_etrax.cfg +++ b/icinga/objects/hosts_etrax.cfg @@ -1,7 +1,7 @@ ############################################################################### # Config File for Monitoring etrax nodes # This file was automatically generated from trb.db files by daq2icinga.pl -# Creation time: 17.02.2012 at 14:29:30 +# Creation time: 24.02.2012 at 17:06:57 # # HOST DEFINITIONS ############################################################################### @@ -51,6 +51,13 @@ define hostgroup{ # Hosts from subcomponent start ############################################################################### +# HOST DEFINITION etraxp076 +define host{ + use etrax + host_name etraxp076 ; assigned to start + alias etraxp076_start +} + # HOST DEFINITION etraxp082 define host{ use etrax @@ -60,7 +67,7 @@ define host{ define hostgroup{ hostgroup_name start alias etrax_start - members etraxp082 + members etraxp076,etraxp082,etraxp107 } ############################################################################### @@ -295,12 +302,126 @@ define host{ 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 + 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,etraxp054,etraxp059,etraxp089,etraxp091,etraxp092,etraxp094 } ############################################################################### # Hosts from subcomponent shower ############################################################################### +define hostgroup{ + hostgroup_name shower + alias etrax_shower + members etraxp031,etraxp053,etraxp067,etraxp080,etraxp083,etraxp085 +} + +############################################################################### +# Hosts from subcomponent wall +############################################################################### + +# HOST DEFINITION etraxp090 +define host{ + use etrax + host_name etraxp090 ; assigned to wall + alias etraxp090_wall +} + +# HOST DEFINITION etraxp108 +define host{ + use etrax + host_name etraxp108 ; assigned to wall + alias etraxp108_wall +} + +# HOST DEFINITION etraxp111 +define host{ + use etrax + host_name etraxp111 ; assigned to wall + alias etraxp111_wall +} +define hostgroup{ + hostgroup_name wall + alias etrax_wall + members etraxp090,etraxp108,etraxp111 +} + +############################################################################### +# Hosts from subcomponent hub +############################################################################### + +# HOST DEFINITION etraxp096 +define host{ + use etrax + host_name etraxp096 ; assigned to hub + alias etraxp096_hub +} + +# HOST DEFINITION etraxp097 +define host{ + use etrax + host_name etraxp097 ; assigned to hub + alias etraxp097_hub +} + +# HOST DEFINITION etraxp098 +define host{ + use etrax + host_name etraxp098 ; assigned to hub + alias etraxp098_hub +} + +# HOST DEFINITION etraxp099 +define host{ + use etrax + host_name etraxp099 ; assigned to hub + alias etraxp099_hub +} + +# HOST DEFINITION etraxp100 +define host{ + use etrax + host_name etraxp100 ; assigned to hub + alias etraxp100_hub +} + +# HOST DEFINITION etraxp101 +define host{ + use etrax + host_name etraxp101 ; assigned to hub + alias etraxp101_hub +} + +# HOST DEFINITION etraxp102 +define host{ + use etrax + host_name etraxp102 ; assigned to hub + alias etraxp102_hub +} + +# HOST DEFINITION etraxp103 +define host{ + use etrax + host_name etraxp103 ; assigned to hub + alias etraxp103_hub +} + +# HOST DEFINITION etraxp104 +define host{ + use etrax + host_name etraxp104 ; assigned to hub + alias etraxp104_hub +} + +# HOST DEFINITION etraxp121 +define host{ + use etrax + host_name etraxp121 ; assigned to hub + alias etraxp121_hub +} +define hostgroup{ + hostgroup_name hub + alias etrax_hub + members etraxp096,etraxp097,etraxp098,etraxp099,etraxp100,etraxp101,etraxp102,etraxp103,etraxp104,etraxp121,etraxp023,etraxp107 +} ############################################################################### # Hosts for slow control: @@ -341,11 +462,11 @@ define host{ alias etraxp232_scs } -# HOST DEFINITION etraxp234 +# HOST DEFINITION etraxp233 define host{ use etrax - host_name etraxp234 ; assigned to slow control system - alias etraxp234_scs + host_name etraxp233 ; assigned to slow control system + alias etraxp233_scs } # HOST DEFINITION etraxp203 @@ -411,7 +532,7 @@ define host{ define hostgroup{ hostgroup_name scs alias etrax_scs - members etraxp231,etraxp239,etraxp207,etraxp210,etraxp232,etraxp234,etraxp203,etraxp202,etraxp208,etraxp236,etraxp201,etraxp225,etraxp221,etraxp237 + members etraxp231,etraxp239,etraxp207,etraxp210,etraxp232,etraxp233,etraxp203,etraxp202,etraxp208,etraxp236,etraxp201,etraxp225,etraxp221,etraxp237 } @@ -421,7 +542,7 @@ define hostgroup{ define hostgroup{ hostgroup_name etrax alias all etrax nodes - hostgroup_members cts,start,tof,rpc,scs + hostgroup_members cts,start,tof,rpc,shower,wall,hub,scs } -- 2.43.0