Changeset 1245

Show
Ignore:
Timestamp:
11/15/06 18:39:32 (5 years ago)
Author:
janl
Message:

Moving shit around

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • people/janl/libperl/Munin.pm.in

    r1244 r1245  
    1 # package Munin; 
     1package Munin; 
    22# -*- perl -*- 
    33# 
     
    2020# $Id$ 
    2121 
     22use strict; 
     23use vars qw(@ISA @EXPORT $VERSION $CONFDIR); 
    2224use Exporter; 
     25 
    2326@ISA = ('Exporter'); 
     27 
    2428@EXPORT = ('munin_trend', 
    2529           'munin_fetch', 
     
    5054           ); 
    5155 
    52 use strict; 
    5356use RRDs; 
    5457use Fcntl qw(:DEFAULT :flock); 
     
    5659use Symbol 'gensym'; 
    5760 
    58 my $VERSION = '@@VERSION@@'; 
     61$VERSION='@@VERSION@@'; 
     62$CONFDIR='@@CONFDIR@@'; 
     631; 
     64__END__ 
     65 
     66$VERSION = '@@VERSION@@'; 
    5967 
    6068my $nsca = new IO::Handle; 
     
    6472my $configfile='@@CONFDIR@@/munin.conf'; 
    6573 
    66 my @legal = ("tmpldir", "ncsa", "ncsa_server", "ncsa_config", "rundir", 
    67         "dbdir", "logdir", "htmldir", "include", "domain_order", "node_order", 
    68         "graph_order", "graph_sources", "fork", "graph_title", "create_args", 
    69         "graph_args", "graph_vlabel", "graph_vtitle", "graph_total", 
    70         "graph_scale", "graph", "update", "host_name", "label", "cdef", "draw", 
    71         "graph", "max", "min", "negative", "skipdraw", "type", "warning", 
    72         "critical", "special_stack", "special_sum", "stack", "sum", "address", 
    73         "htaccess", "warn", "use_default_name", "use_node_name", "port", 
    74         "graph_noscale", "nsca", "nsca_server", "nsca_config", "extinfo", 
    75         "fetch_data", "filename", "max_processes", "nagios", "info", 
    76         "graph_info", "graph_category", "graph_strategy", "graph_width", 
    77         "graph_height", "graph_sums", "local_address", "compare", 
    78         "text", "command", "contact", "contacts",  "max_messages", 
    79         "always_send", "notify_alias", "line", "state", "graph_period", 
    80         "cgiurl_graph", "cgiurl", "tls", "service_order", "category_order", 
    81         "version", "tls_certificate", "tls_private_key", "tls_pem", 
    82         "tls_verify_certificate", "tls_verify_depth", "graph_data_size", 
    83         "colour", "graph_printf" 
    84     ); 
    85  
    86 my %legal_expanded = map { $_ => 1 } @legal; 
     74@legalfetch = qw(.value); 
     75         
     76@legalconfig = qw( 
     77                graph_order graph_title create_args graph_args 
     78                graph_vlabel graph_vtitle graph_total graph_scale graph 
     79                update host_name 
     80 
     81                .label .cdef .draw .graph .max .min .negative 
     82                .skipdraw .type .warning .critical .colour 
     83                .graph_printf 
     84                ); 
     85 
    8786 
    8887# Fields to copy when "aliasing" a field 
     
    9291my $PREFIX               = '@@PREFIX@@'; 
    9392$ENV{'MUNIN_PREFIX'}     = $PREFIX; 
    94 my $CONFDIR              = '@@CONFDIR@@';   # /etc/munin,/etc/opt/munin or such 
     93$CONFDIR              = '@@CONFDIR@@';   # /etc/munin,/etc/opt/munin or such 
     94print "CONFDIR: $CONFDIR!\n"; 
    9595$ENV{'MUNIN_CONFDIR'}    = $CONFDIR; 
    9696my $BINDIR               = '@@BINDIR@@'; 
     
    431431} 
    432432 
    433 sub munin_set_var_path 
    434 
     433sub munin_set_var_path { 
    435434    my $hash = shift; 
    436435    my $var  = shift; 
  • people/janl/server/munin-update.in

    r1244 r1245  
    2424 
    2525use strict; 
    26 use IO::Socket; 
     26# use IO::Socket; 
    2727use lib "../build/libperl"; 
    2828use Munin; 
     29 
     30# print "$VERSION"; 
     31print "$Munin::VERSION\n"; 
     32print "$Munin::CONFDIR\n"; 
     33 
     34__END__ 
     35 
    2936use Time::HiRes; 
    3037use RRDs; 
     
    3340use POSIX ":sys_wait_h"; 
    3441use Storable qw(fd_retrieve nstore_fd); 
     42 
     43print "Confdir: ",$Munin::CONFDIR,"\n"; 
     44exit 0; 
    3545 
    3646my $DEBUG=0;