-
Notifications
You must be signed in to change notification settings - Fork 468
/
Copy pathmunin-node.conf.PL
86 lines (67 loc) · 2.14 KB
/
munin-node.conf.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/perl
use strict;
use warnings;
use Module::Build;
my $build = Module::Build->current;
my $log_file = $build->install_path('MUNIN_LOGDIR') . '/munin-node.log';
my $pid_file = $build->install_path('MUNIN_RUNDIR') . '/munin-node.pid';
my $output_file = shift;
open my $fh, ">", $output_file or die "Can't open $output_file: $!";
print $fh <<'EOF';
#
# Example config-file for munin-node
# For more examples and information see:
# http://guide.munin-monitoring.org/en/latest/reference/munin-node.conf.html
#
# 0=err, 1=warning, 2=notice, 3=info, 4=debug
log_level 4
EOF
print $fh <<"EOF";
# Where the munin-node logs its activity.
# If the value is Sys::Syslog, logging is sent to syslog.
log_file $log_file
pid_file $pid_file
EOF
print $fh <<'EOF';
# Run munin-node in background and forks after binding.
background 1
setsid 1
# The user/group munin-node will runs as.
user root
group root
# This is the timeout for the whole transaction.
# Units are in sec. Default is 15 min.
#global_timeout 900
# This is the timeout for each plugin.
# Units are in sec. Default is 1 min.
#timeout 60
# Regexps for files to ignore.
ignore_file [\#~]$
ignore_file DEADJOE$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$
# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949.
#host_name myhostname.example.com
# A list of addresses that are allowed to connect. This must be a
# regular expression, since Net::Server does not understand CIDR-style
# network notation unless the perl module Net::CIDR is installed. You
# may repeat the allow line as many times as you'd like.
allow ^127\.0\.0\.1$
allow ^::1$
# If you have installed the Net::CIDR perl module, you can use one or more
# cidr_allow and cidr_deny address/mask patterns. A connecting client must
# match any cidr_allow, and not match any cidr_deny.
# Note that a netmask *must* be provided, even if it's /32.
#cidr_allow 127.0.0.1/32
#cidr_allow 192.0.2.0/24
#cidr_deny 192.0.2.42/32
# Which address to bind to.
#host 127.0.0.1
host *
# The TCP port the munin-node listens on.
port 4949
EOF