my ($socket,$client_socket);
$socket = new IO::Socket::INET (
- PeerHost => 'hadesdaq02',
+ PeerHost => 'lxhadeb06',
PeerPort => '12345',
Proto => 'tcp'
);
if (!$result) {
#print "open socket\n";
$socket = new IO::Socket::INET (
- PeerHost => 'hadesdaq02',
+ PeerHost => 'lxhadeb06',
PeerPort => '12345',
Proto => 'tcp');
if (!($socket)) {
#print "unable to open socket\n";
$value = "DOWN";
- $longtext = "Unable to connect to hadesdaq02 (icinga log deamon)";
+ $longtext = "Unable to connect to lxhadeb06 (icinga log deamon)";
$num_errors = 999;
}
}
}
#print "blubb\n";
-
+ # JAM: below changed from a[8] to a[9] due to different ls format
if (defined $result_a) {
#print $result_a . "\n";
my @a = split(/\s+/,$result_a);
+ #print $a[9]. "\n";
+ #print $a[10]. "\n";
if ($started == 1) {
$started = 0;
- $last_mod_time = $a[8];
+ $last_mod_time = $a[9];
$num_unchanged = 0;
}
- if ($last_mod_time ne $a[8]) {
+ if ($last_mod_time ne $a[9]) {
my @a = split(/\s+/,$result_a);
- $last_mod_time = $a[8];
+ $last_mod_time = $a[9];
$num_unchanged = 0;
} else {
$num_unchanged++;
$value = "DOWN";
$longtext = "Icinga not updated since $last_mod_time";
QA::WriteQALog($flog,"server","icinga",10,QA::FATAL,$title,$value,$longtext);
+ $num_unchanged = 0;
+ # JAM better reset counter here
} else {
- my $icinga_query_hosts = "ssh hadesdaq02 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&style=hostdetail&hoststatustypes=4&hostprops=10' /usr/lib/icinga/cgi/status.cgi\" | grep -v declare";
+ my $icinga_query_hosts = "ssh lxhadeb06 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&style=hostdetail&hoststatustypes=4&hostprops=10' /usr/lib/cgi-bin/icinga/status.cgi\" | grep -v declare";
my @icinga_result_hosts = qx($icinga_query_hosts);
splice(@icinga_result_hosts, 0, 7);
#printf("@icinga_result_hosts");
$num_errors += scalar @icinga_result_hosts;
- my $icinga_query_etrax = "ssh hadesdaq02 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&hostgroup=etrax&style=hostdetail&hoststatustypes=4&hostprops=10' /usr/lib/icinga/cgi/status.cgi\" | grep -v declare";
+ my $icinga_query_etrax = "ssh lxhadeb06 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&hostgroup=etrax&style=hostdetail&hoststatustypes=4&hostprops=10' /usr/lib/cgi-bin/icinga/status.cgi\" | grep -v declare";
my @icinga_result_etrax = qx($icinga_query_etrax);
#printf("@icinga_result_etrax");
splice(@icinga_result_etrax, 0, 7);
my $num_errors_etrax = scalar @icinga_result_etrax;
- my $icinga_query_power = "ssh hadesdaq02 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&hostgroup=power&style=hostdetail&hoststatustypes=4&hostprops=10' /usr/lib/icinga/cgi/status.cgi\" | grep -v declare";
+ my $icinga_query_power = "ssh lxhadeb06 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&hostgroup=power&style=hostdetail&hoststatustypes=4&hostprops=10' /usr/lib/cgi-bin/icinga/status.cgi\" | grep -v declare";
my @icinga_result_power = qx($icinga_query_power);
#print @icinga_result_power . "\n";
splice(@icinga_result_power, 0, 7);
my $num_errors_power = scalar @icinga_result_power;
- my $icinga_query_services = "ssh hadesdaq02 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&style=detail&servicestatustypes=16&hoststatustypes=3&serviceprops=2097162' /usr/lib/icinga/cgi/status.cgi\" | grep -v declare";
+ my $icinga_query_services = "ssh lxhadeb06 \"REMOTE_USER='icingaadmin' REQUEST_METHOD='GET' QUERY_STRING='csvoutput&style=detail&servicestatustypes=16&hoststatustypes=3&serviceprops=2097162' /usr/lib/cgi-bin/icinga/status.cgi\" | grep -v declare";
my @icinga_result_services = qx($icinga_query_services);
splice(@icinga_result_services, 0, 7);
#printf("@icinga_result_services");