From: hadaq Date: Fri, 17 Feb 2012 11:34:36 +0000 (+0000) Subject: JAM: added etraxp nodes for slow control. under dev X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=51ae9bf13388a8491e15f55a1e3c1d44343ddbea;p=hadesicinga.git JAM: added etraxp nodes for slow control. under dev --- diff --git a/icinga/objects/daq2icinga.pl b/icinga/objects/daq2icinga.pl index e61c476..1f18baf 100755 --- a/icinga/objects/daq2icinga.pl +++ b/icinga/objects/daq2icinga.pl @@ -115,6 +115,44 @@ foreach my $component(@subsystems) } } +# add the slow control etrax nodes (fixed) + +print OUTFILE "\n###############################################################################\n"; +print OUTFILE "# Hosts for slow control:\n"; +print OUTFILE "###############################################################################\n"; + +my @scsnodes; +my $i; +for ($i=1;$i<=50;$i++) +{ + my $index= 200+$i; + my $scnode=sprintf("etraxp%d",$index); + push(@scsnodes, $scnode); + push(@totalnodes, $scnode); + print OUTFILE "\n\# HOST DEFINITION $scnode \n"; + print OUTFILE "define host{\n"; + print OUTFILE " use etrax\n"; + my $hdef = sprintf(" host_name %s \; assigned to slow control system\n",$scnode); + print OUTFILE $hdef; + my $adef = sprintf(" alias %s_scs \n",$scnode); + print OUTFILE $adef; + print OUTFILE "}\n"; +} + +# define hostgroup of scs nodes: +print OUTFILE "\n\n###############################################################################\n"; +print OUTFILE "# Hostgroup definition for all nodes\n"; +print OUTFILE "###############################################################################\n"; +print OUTFILE "define hostgroup{\n"; +print OUTFILE " hostgroup_name scs \n"; +print OUTFILE " alias etrax_scs\n"; +my $scsmembers = join(",", @scsnodes); +print OUTFILE " members $scsmembers \n"; +print OUTFILE "}\n"; + +push(@totalsystems, "scs"); + + # define hostgroup of all components: print OUTFILE "\n\n###############################################################################\n"; print OUTFILE "# Hostgroup definition for all nodes\n";