Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jmbwell/b5a1f04e5f298ea89306905ceafca81c to your computer and use it in GitHub Desktop.
Save jmbwell/b5a1f04e5f298ea89306905ceafca81c to your computer and use it in GitHub Desktop.
Monit on pfsense 2.5 x64
# Monit on pfSense 2.5 x64
# Install the package from the FreeBSD repository
pkg add http://pkg.freebsd.org/FreeBSD:12:amd64/latest/All/monit-5.29.0_1.txz
# Rename the rc.d script to .sh and fix permissions so pfSense will start it automatically
mv /usr/local/etc/rc.d/monit /usr/local/etc/rc.d/monit.sh
chmod 0755 /usr/local/etc/rc.d/monit.sh
# Add monit_enable=YES to a local rc.conf
echo "monit_enable=YES" >> /etc/rc.conf.local
# Add 'include /usr/local/etc/monit.d/*' to the monitrc:
echo "include /usr/local/etc/monit.d/*" >> /usr/local/etc/monitrc
chmod 0700 /usr/local/etc/monitrc
# Create a directory for your monit config files:
mkdir /usr/local/etc/monit.d
# Add the config files:
cd /usr/local/etc/monit.d/
# vi system.conf for example
# if you're using git or something, pull/fetch/clone your config files here
# Make a directory for the events log:
mkdir /var/monit
# On pfSense, if you're monitoring hosts across VPN links, be sure
# to add a gateway and a static route to the remote LAN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment