Munin pfsense

De Linux Server Wiki
Sauter à la navigation Sauter à la recherche


Documentation ancienne non fonctionnelle pour les versions récentes de pfsense


src https://forum.pfsense.org/index.php?topic=43347.0

src https://forum.pfsense.org/index.php?topic=66438.0

setenv PACKAGESITE "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.3-release/Latest/"
pkg_add -r munin-node
pkg_add -r python



/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 /var/log/munin ] || mkdir /var/log/munin
[ -d /var/munin/plugin-state/ ] || mkdir -p  /var/munin/plugin-state/
[ -d /etc/rc.conf ] || echo 'munin_node_enable="YES"' >> /etc/rc.conf
#editer /usr/local/etc/munin/munin-node.conf
/usr/local/etc/rc.d/munin-node.sh start

Pour dhcpd3 :

setenv PACKAGESITE "ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.3-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
exit
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
--- 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