I have been playing around with Icinga2 for some monitoring at home. I wanted to monitor a few of my external services. Since my email is one (or the primary) of them I needed alert notifications to be sent via something else. So I setup ssmtp and have email sent through a gmail account.
Make sure to enable the account to be accessible by less secure methods for this to work. If anyone comes across a way to not have to enable that, please let me know. Continue reading
In FreeBSD you can easily let remote hosts log to your system without installing any third party applications. When doing so you might want to separate your remote hosts logs from the local hosts logs which is also easy to do.
Add this to the bottom of your
/etc/syslog.conf on the host accepting the logs:
The trick is
@ which is a handy short for the local hostname, so by negating it like above you get the separation you want.
Works on FreeBSD11.0-Current, check man syslog.conf(5) if this doesn’t work for you.
I have been playing around a bit with running Nagios on the Raspberry Pi for a while now and it works pretty well.
Even though I did the simplest kind of install of Nagios 3 with apt-get there was a couple of things that needed poking at to get external commands running.
Firs make sure that your webserver user is a member of the nagios group, and secondly change the group permissions lite below.
construct:/usr/lib/nagios/plugins# chmod g+w /var/lib/nagios3/rw
The above should be pretty self explanatory. I have no memory of actually adding the www-data user to the nagios group, but make sure that is done or the external commands wont work.
I’m currently monitoring 16 hosts – with a total of just about 30 checks which has to be seen as very little – and so far there has been no issues due to the Pies limitations.
Though it’s mostly just to test it still gives me some situational awareness which is always nice.
I have previously been having some issues on my firewall wich I wanted to monitor more closely for, so I use the following script to send me an SMS notice when an error marked as “user.critical” has occured.
On this somewhat binary day (101111), I just submitted my first Munin plugin to http://exchange.munin-monitoring.org and once it is approved it should be available at http://exchange.munin-monitoring.org/plugins/system_users/details/ .
It simply lets you graph the number of logged in users with Munin.
Example of the daily graph:
For an explanation of what munin is have a look here: http://munin-monitoring.org/
From the site:
Munin is a networked resource monitoring tool that can help analyze resource trends and “what just happened to kill our performance?” problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.