Raspberry Pi Monitoring Issue

Hey All,

Been using LibreNMS for a while now and am looking to monitor some Raspberry Pis for a project at a University where I work. Doing some work at home first but having some problems monitoring voltages, frequencies, etc from the Pis. Temperature works fine though.

Came across this thread and tried everything in it first:

Running the latest Raspian OS. Have done the following so far:

  1. Installed snmp snmpd snmp-mibs-downloader
  2. Configured snmpd.conf with the example file for LibreNMS.
  3. Added extend raspberry /usr/bin/raspberry.sh at the end of the file.
  4. Downloaded raspberry.sh to /usr/bin and made executable.
  5. Added Debian-snmp ALL=(ALL) NOPASSWD: /usr/bin/raspberry.sh, /usr/bin/vcgencmd* to sudoers.

Finally, I commented out the mibs line in snmp.conf. This seemed to resolve the issue for many of the posters in the original thread. However I am no further along.

If I query SELECT sensor_class, sensor_oid FROM sensors WHERE device_id=1 I only see an entry for temperature.

Running discovery.php gives root@2846417b1bfb:/opt/librenms# ./discovery.php -h ygg-rpi-002.yggdrasiltech.co - Pastebin.com.

I’m totally stuck at this stage. If anyone has any idea I’d be very grateful. I’d love to use the LibreNMS install at our University to monitor the Pis i want to setup there.

Thanks

1 Like

Hey there! Seems like you still have the mib config setup; double check you have commented out any lines in /etc/snmp/snmp.conf

Check to see if the raspberry.sh script is running correctly, on some installs the user for snmp differs.

Post the output of these commands and we can take a look if it still doesn’t work:
./discovery.php -h HOSTNAME -d | ./pbin.sh

./poller.php -h HOSTNAME -r -f -d | ./pbin.sh

snmpbulkwalk -OUneb -v2c -c COMMUNITY HOSTNAME . | ./pbin.sh

1 Like

Hey Jo0Lz,

Thanks for the reply. I noticed you were one of the guys in the thread I linked with the same issue. I have commented out the mibs line from the snmp.conf file and can run the raspberry.sh script myself and get output. I amended the sudoers file with ‘Debian-snmp’ as I can see Raspbian uses a different user for SNMP.

Here is the output from the three commands:

./discovery.php -h HOSTNAME -d | ./pbin.sh
https://p.libren.ms/view/a7bbbba0

./poller.php -h HOSTNAME -r -f -d | ./pbin.sh
https://p.libren.ms/view/33c13f79

snmpbulkwalk -OUneb -v2c -c COMMUNITY HOSTNAME . | ./pbin.sh
https://p.libren.ms/view/d3204baf

EDIT: Tidied up post and added direct links.

Messed up some of the links in my last post. Should be correct now. That’ll teach me for posting in a rush!

Hey man, sorry for the late reply.

I see in the log that you still have these entries:

iso.*.1.8*.*.*.*.121.1 = "50.5"
iso.*.1.8*.*.*.*.121.2 = "1.2000"

Array
(
    [raspberry_pi_sensors] => Array
        (
            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.1] => Array
                (
                    [iso] => 50.5
                )
 
            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.2] => Array
                (
                    [iso] => 1.2000
                )

Which suggests there is something wrong with the snmp config, as the mib’s aren’t being converted properly.
It should look like this:

nsExtendOutLine."raspberry".1 = 47.2
nsExtendOutLine."raspberry".2 = 1.2625

Array
(
    [raspberry_pi_sensors] => Array
        (
            [raspberry.1] => Array
                (
                    [nsExtendOutLine] => 47.2
                )

            [raspberry.2] => Array
                (
                    [nsExtendOutLine] => 1.2625
                )

The file /etc/snmp/snmp.conf should be blank. (Well, the lines that are in it should be commented out). Double check that and restart the snmp deamon to apply the changes.
That raspberry script is running fine, the entries suggest there is nothing wrong with that.

1 Like

Hey. Sorry for the late reply too!

I checked and I have all lines in snmp.conf commented out. I’ve rebooted all of my Pis many times as well.

I’m wondering, what do you have in your snmpd.conf file? Perhaps I’m missing something there.