Munin monitoring Graph Performance

Goal

Speed up munins performance by moving the generated html files and graphs to a temporary file system (tmpfs)

Intro

Munin [1] (1.x) updates its data and graphs every 5 minutes. On a system that has a lot of monitoring to perform, the time to collect the data (munin-update),  generating the graphs (munin-graph), creating the html files (munin-html) and checking the limits (munin-limits) can exceed the 5 minutes available before the next update will be performed. The consequence are gaps in the graphs.

In the log files of munin the time needed for each of the four phases is documented. This can also be visualized with the munin processing time plugin. It shows that the graphing is the phase which takes the most time to complete.
Continue reading

Send email on SSH login using PAM

Goal

When a user logs in using SSH an email should be sent.

Intro

There are different ways to send an email when someone logs into a machine using SSH. One way could be to parse the auth log file periodically, but this is error prone and rather complex. An easier way is to call a script, that is hooked into PAM, the central authentication service on Linux systems.
Continue reading