Medium sized Internalization made by flattener against megalog-2018-03-12
[andk-cpan-tools.git] / munin / rrr-age
blob45e34fc51849601af7e37c94439f5dd2e7d8bca2
1 #!/usr/bin/perl
2 # Parameters understood:
4 # config (required)
5 # autoconf (optional - used by munin-config)
7 # Magic markers - optional - used by installation scripts and
8 # munin-config:
10 #%# family=auto
11 #%# capabilities=autoconf
13 use strict;
14 my $file = "/opt/projects/CPAN/modules/02packages.details.txt.gz";
16 if ($ARGV[0] eq "autoconf"){
17 if ( -e $file
19 print "yes\n";
20 exit 0;
21 } else {
22 print "no\n";
23 exit 1;
27 if ( $ARGV[0] eq "config" ){
28 print <<EOF;
29 graph_title time since 02packages
30 graph_args -r
31 graph_vlabel seconds
32 graph_scale yes
33 graph_info Age of $file
34 graph_category cpantesters
35 EOF
37 for my $c ("age"){
38 #my $draw = "??/";
39 print <<EOF;
40 rf$c.label $c
41 rf$c.min 0
42 rf$c.type GAUGE
43 EOF
45 exit 0;
49 printf "rfage.value %d\n", 86400 * -M $file;
52 # Local Variables:
53 # mode: cperl
54 # cperl-indent-level: 4
55 # indent-tabs-mode: nil
56 # End:
57 # vim:sw=4:ts=8:sta:et