Changeset 1245
- Timestamp:
- 11/15/06 18:39:32 (5 years ago)
- Files:
-
- people/janl/libperl/Munin.pm.in (modified) (7 diffs)
- people/janl/libperl/Munin/Server.pm (added)
- people/janl/server/munin-update.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
people/janl/libperl/Munin.pm.in
r1244 r1245 1 #package Munin;1 package Munin; 2 2 # -*- perl -*- 3 3 # … … 20 20 # $Id$ 21 21 22 use strict; 23 use vars qw(@ISA @EXPORT $VERSION $CONFDIR); 22 24 use Exporter; 25 23 26 @ISA = ('Exporter'); 27 24 28 @EXPORT = ('munin_trend', 25 29 'munin_fetch', … … 50 54 ); 51 55 52 use strict;53 56 use RRDs; 54 57 use Fcntl qw(:DEFAULT :flock); … … 56 59 use Symbol 'gensym'; 57 60 58 my $VERSION = '@@VERSION@@'; 61 $VERSION='@@VERSION@@'; 62 $CONFDIR='@@CONFDIR@@'; 63 1; 64 __END__ 65 66 $VERSION = '@@VERSION@@'; 59 67 60 68 my $nsca = new IO::Handle; … … 64 72 my $configfile='@@CONFDIR@@/munin.conf'; 65 73 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 87 86 88 87 # Fields to copy when "aliasing" a field … … 92 91 my $PREFIX = '@@PREFIX@@'; 93 92 $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 94 print "CONFDIR: $CONFDIR!\n"; 95 95 $ENV{'MUNIN_CONFDIR'} = $CONFDIR; 96 96 my $BINDIR = '@@BINDIR@@'; … … 431 431 } 432 432 433 sub munin_set_var_path 434 { 433 sub munin_set_var_path { 435 434 my $hash = shift; 436 435 my $var = shift; people/janl/server/munin-update.in
r1244 r1245 24 24 25 25 use strict; 26 use IO::Socket;26 # use IO::Socket; 27 27 use lib "../build/libperl"; 28 28 use Munin; 29 30 # print "$VERSION"; 31 print "$Munin::VERSION\n"; 32 print "$Munin::CONFDIR\n"; 33 34 __END__ 35 29 36 use Time::HiRes; 30 37 use RRDs; … … 33 40 use POSIX ":sys_wait_h"; 34 41 use Storable qw(fd_retrieve nstore_fd); 42 43 print "Confdir: ",$Munin::CONFDIR,"\n"; 44 exit 0; 35 45 36 46 my $DEBUG=0;
