#Munin

3 posts tagged Munin

Munin + Raspberry Pi + temperature: updated

· hardware, linux, software

I got a mail in my inbox about a week ago from Anthony, telling me how to improve my Munin & temp script for a RPi:

Hi,

I just read your (old) blog post about monitoring the temperature of the Raspberry Pi with munin[1].

I had the exact same error as you did when I was trying to let munin do the job all by himself:

temp.value VCHI initialization failed)

It turns out the solution was quite easy: in

Graph amount of OpenVPN users to Munin

· linux

Rather simple script. Using log file instead of management interface.

vpnusers-day

Part has to run as Root (due to Munin most likely not having access to read the log files. Working with the management interface could solve this.

Create /usr/local/bin/getVpnUsers.sh:

#!/bin/bash
echo "VPN.value `cat /var/log/openvpn-status.log | sed -e '1,/Common Name/d' | 
sed -e '/ROUTING TABLE/,$d' | wc -l`" > /tmp/.vpn_munin.txt

You can change the name of VPN.value to the VPN name and/or add multiple lines (each with a different NAME.value if you’re running more than one VPN user. Be sure to cat the right log file).

Munin + Raspberry Pi + temperature

· hardware, linux, software

Quick hack to get Munin to graph the cpu temperature.

temp-day

First of all, install Munin and make sure it’s working.

Then follow these steps:

  1. We’ll use cron to write the current temp to a log file. We do this because I wasn’t able to get Munin to directly execute the command (error: temp.value VCHI initialization failed)

Execute crontab -e and add this line (this has to be on one line):