X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=aptcheck%2Faptcheck.pl;h=3121946ce18316788f8bf688984878e24602681e;hb=114cf0ae412ff4d23ff7488db783d1bd1ed8197b;hp=36646bb9656d87358232b5759894b767a20bac27;hpb=37b78f0d712177541ff323000411d5d1e32b1318;p=git-tools-moved-to-github.git diff --git a/aptcheck/aptcheck.pl b/aptcheck/aptcheck.pl index 36646bb..3121946 100755 --- a/aptcheck/aptcheck.pl +++ b/aptcheck/aptcheck.pl @@ -35,6 +35,7 @@ my $year =`date +%Y`; #my $wikilink = 'http://twiki.indexdata.dk/cgi-bin/twiki/view/ID/'; my $wikilink = 'https://twiki.indexdata.com/twiki/bin/view/ID/'; my $restrictedpackages = "ssh -q kebab cat /home/ftp/pub/debian/dists/*/restricted/*/Packages"; +my $updlink="-u"; # to display after a name, liking to the upd page #### Host comments my %hostcomments = ( @@ -356,7 +357,7 @@ if ( $sectot ) { print F ""; for my $HH ( sort(keys(%sechosts)) ) { my $upd = $updlinks{$HH} || "#" ; - print F "$HH, "; + print F "$HH$updlink "; } print F ""; print F ""; @@ -372,7 +373,7 @@ if ( $owntot ) { print F ""; for my $HH ( sort(keys(%ownhosts)) ) { my $upd = $updlinks{$HH} || "#" ; - print F "$HH, "; + print F "$HH$updlink "; #print F "$HH "; } print F ""; @@ -389,7 +390,7 @@ if ( $mantot ) { print F ""; for my $HH ( sort(keys(%manhosts)) ) { my $upd = $updlinks{$HH} || "#" ; - print F "$HH, "; + print F "$HH$updlink "; #print F "$HH "; } print F ""; @@ -406,7 +407,7 @@ if ( $normtot ) { print F ""; for my $HH ( sort(keys(%normhosts)) ) { my $upd = $updlinks{$HH} || "#" ; - print F "$HH, "; + print F "$HH$updlink "; #print F "$HH "; } print F ""; @@ -423,18 +424,18 @@ if ( %skiphosts ) { for my $HH ( sort(keys(%skiphosts)) ) { my $upd = $updlinks{$HH} || $wikilink . ucfirst($HH) . "Updates" . $year; - print F "$HH, "; + print F "$HH$updlink "; #print F "$HH "; } print F "\n"; } -#if ( %okhosts ) { if ( 1 ) { - print F "Ok " . scalar(keys(%okhosts)) . "\n"; + print F "Ok
" . scalar(keys(%okhosts)) . + " of " . scalar(keys(%allhosts)) . "\n"; print F ""; for my $HH ( sort(keys(%okhosts)) ) { my $upd = $updlinks{$HH} || "#" ; - print F "$HH, "; + print F "$HH$updlink "; #print F "$HH "; } if ( !%okhosts ) { @@ -444,6 +445,9 @@ if ( 1 ) { } print F "\n"; +print F "

" . ( $sectot + $owntot + $mantot + $normtot ) . + " packages pending ($sectot critical) \n"; + # Graph #my $secs = 60*60*24 * 7 * 2; # 2 weeks in secods #my $secs = "1m"; # one month, let nagios do the math