#!/usr/local/bin/perl # show Customer Connectivity objects that are down, and not in override. use strict; use CGI qw(:standard); my $q = new CGI(); my $me = $ENV{'SCRIPT_NAME'}; my $url = 'http://' . $ENV{'HTTP_HOST'} . $me; my (%override,@objects); foreach my $object (split /\n/, `/usr/local/sbin/argusctl ovlist`){ if($object =~ /^Top:Customer_Connectivity:(.*:Ping_.+)/){ $override{$1} = 1; } } foreach my $object (split /\n/, `/usr/local/sbin/argusctl getchildrenparam object=Top:Customer_Connectivity param=status`){ next if($object =~ /:\s+up$/); next unless($object =~ /:Ping_/); $object =~ s/^Top:Customer_Connectivity://; $object =~ s/:\s+.*//; next if(exists($override{$object})); push @objects, $object; } print $q->header(-expires=>'now'), $q->start_html(-title=>'Argus: Down Customer Connectivity Objects', -head=>meta({-http_equiv => 'REFRESH', -content => "90; URL=$url"})), "\n", '

Argus: Down Customer Connectivity Objects

', "\n", '', "\n"; my $i; foreach my $object (@objects){ print ' \n", " \n", " \n"; $i++; } print "
\n", ' ', "${object}\n", "
\n", $q->end_html();