X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=aptcheck%2Faptcheck.pl;h=7801291189a50cf7ec8cbc3113f55fd9229e6e85;hb=7dfdb2bf3d45708c50db85ca548164f3563960cd;hp=7c9245b8b81dc0e36f9a0cb47dc95a6da936997c;hpb=f7453cc9f36971a2a5c305fc44f52767f363e472;p=git-tools-moved-to-github.git diff --git a/aptcheck/aptcheck.pl b/aptcheck/aptcheck.pl index 7c9245b..7801291 100755 --- a/aptcheck/aptcheck.pl +++ b/aptcheck/aptcheck.pl @@ -18,10 +18,15 @@ # # 11-Mar-2011 Heikki: Started this # 22-Mar-2011 Heikki: Adding manually maintained packages +# 15-Aug-2011 Heikki: Adding a total in the headline, for nagiosgrapher # # 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; @@ -36,6 +41,7 @@ my %hostcomments = ( "bellone" => "Niels Erik does the manual upgrades", "cfrepous" => "Wolfram does the manual upgrades", "leopard" => "Wolfram does the manual upgrades", + "lsd" => "Heikki takes care of all upgrades", ); @@ -227,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"; @@ -239,6 +245,9 @@ print F "\n"; print F "Apt upgrade status\n"; print F "\n"; print F "

Apt package status

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

Debug run, many hosts missing!

\n" if $debug; @@ -318,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;