X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=aptcheck%2Faptcheck.pl;h=7801291189a50cf7ec8cbc3113f55fd9229e6e85;hb=8c365b2253f7bf851956f5c2a1ef32412125701a;hp=de1708b4ee46af2a525d975fbb6aea0478b81ef7;hpb=a8888d99b3762d80d6403ac44a60cc30985e3434;p=git-tools-moved-to-github.git diff --git a/aptcheck/aptcheck.pl b/aptcheck/aptcheck.pl index de1708b..7801291 100755 --- a/aptcheck/aptcheck.pl +++ b/aptcheck/aptcheck.pl @@ -23,6 +23,10 @@ # TODO: Assumes that we release our restricted packages for all versions # and architectures at the same time. Gets only the highest version from # all, and reports anything less than this. Good enough for now. +# +# TODO: Get the dates from ls --full-time /var/cache/apt/archives/ +# and display next to the packages, so we can see how long they have +# been lingering. Boldface them if older than some limit #### Init use strict; @@ -229,7 +233,7 @@ for my $hline ( split("\n",$hostlist) ) { if ( $hostcomments{$H} ); $table .= $det if $pkgs; print "\n$table\n" if $debug>2; - last if $H =~/dart/ && $debug; + last if $H =~/diane/ && $debug; } $table .= "\n"; @@ -242,7 +246,7 @@ print F "Apt upgrade status\n"; print F "\n"; print F "

Apt package status

\n"; print F "" . ( $sectot + $owntot + $mantot + $normtot ) . - " packages pending, including $sectot security \n"; + " packages pending ($sectot critical) \n"; print F "

Debug run, many hosts missing!

\n" if $debug; @@ -323,16 +327,34 @@ if ( %skiphosts ) { } print F "\n"; } -if ( %okhosts ) { +#if ( %okhosts ) { +if ( 1 ) { print F "Ok " . scalar(keys(%okhosts)) . "\n"; print F ""; for my $HH ( sort(keys(%okhosts)) ) { print F "$HH "; } + if ( !%okhosts ) { + print F "None at all!"; + } print F "\n"; } print F "\n"; +# Graph +#my $secs = 60*60*24 * 7 * 2; # 2 weeks in secods +#my $secs = "1m"; # one month, let nagios do the math +my $secs = "45d"; +print F "

" . + "\n". + " ". + "" . + "
\n"; # The host table print F $table;