Munin-node on PFsense 2.0
-
I followed this forum thread and found some tweaks that are needed to make it work.
To do the actual install, I had to do the following:
-
setenv PACKAGESITE "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.1-release/Latest/"
-
pkg_add -r munin-node
Then I did the following to set it up:
-
/usr/local/sbin/munin-node-configure –suggest --shell | sh
-
sed -i -e 's/MB/KB/' /usr/local/etc/munin/plugins/iostat
-
mv /usr/local/etc/rc.d/munin-node /usr/local/etc/rc.d/munin-node.sh
-
Add the following lines to /usr/local/etc/rc.d/munin-node.sh
[ -d /var/run/munin ] || mkdir /var/run/munin
[ -d /etc/rc.conf ] || echo 'munin_node_enable="YES"' >> /etc/rc.conf -
/usr/local/etc/rc.d/munin-node.sh start
Then I wanted to get the dhcpd3 plugin working, so I had to do these steps:
-
setenv PACKAGESITE "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.1-release/Latest/"
-
pkg_add -r p5-Net-IP make++ p5-YAML p5-Net-Netmask
-
ln -s /usr/local/bin/makepp /usr/local/bin/make
-
/usr/bin/perl -MCPAN -e shell
-
install HTTP::Date
-
printf '[dhcpd3]\nuser root\nenv.configfile /var/dhcpd/etc/dhcpd.conf\nenv.leasefile /var/dhcpd/var/db/dhcpd.leases' > /usr/local/etc/munin/plugin-conf.d/dhcpd3.conf
-
ln -s /usr/local/share/munin/plugins/dhcpd3 /usr/local/etc/munin/plugins/dhcpd3
-
/usr/local/etc/rc.d/munin-node.sh restart
I've only just started with pfSense, but perhaps this will help other people!
-
-
Revised instructions for dhcpd3:
-
setenv PACKAGESITE "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.1-release/Latest/"
-
pkg_add -r p5-Net-IP make++ p5-YAML p5-Net-Netmask
-
ln -s /usr/local/bin/makepp /usr/local/bin/make
-
/usr/bin/perl -MCPAN -e shell
-
install HTTP::Date
-
printf '[dhcpd3]\nuser root\nenv.configfile /var/dhcpd/etc/dhcpd.conf\nenv.leasefile /var/dhcpd/var/db/dhcpd.leases' > /usr/local/etc/munin/plugin-conf.d/dhcpd3.conf
-
ln -s /usr/local/share/munin/plugins/dhcpd3 /usr/local/etc/munin/plugins/dhcpd3
-
/usr/local/etc/rc.d/munin-node.sh restart
-
patch –ignore-whitespace /usr/local/share/munin/plugins/dhcpd3 <<end<br>--- dhcpd3.orig 2012-01-06 19:05:37.000000000 -0600
+++ dhcpd3 2012-01-06 19:07:14.000000000 -0600
@@ -219,6 +219,12 @@
print "# DEBUG: in $1\n" if $DEBUG;
$ip = $1;
}
+ if($ip && /binding\s+state\s+([^;]+);/) {
+ if(($1 eq "free") || ($1 eq "backup")) {
+ print "# DEBUG: binding state $1\n" if $DEBUG;
+ $abandon = 1;
+ }
+ }
if($ip && /ends\s+\d+\s+([^;]+);/) {
# 2037/12/31 23:59:59 is max date on perl <= 5.6
print "# DEBUG: end $1\n" if $DEBUG;
END</end<br>
-