Raspberry PI - Temperature, Voltage , Freq

@Zucht how did you configure your raspberry? Is it running rasbian?
I am now using the raspberry.sh script, and I think the agent is irrelevant. I’ve tried disabling the raspberry.sh but the agent isn’t reporting anything.

I’ve tried several versions of the raspberry.sh script, the one I’m currently using gives me two temperature sensors, nothing else. I’ve seen the array working on discovery once, but have since lost track of what is where.

EDIT:
I’ve just reinstalled the PI with the latest raspbian. Configured SNMP and now the values are added to an array at discovery:
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] => 49.4
)

            [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
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.3] => Array
                (
                    [iso] => 1.2000
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.4] => Array
                (
                    [iso] => 1.2000
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.5] => Array
                (
                    [iso] => 1.2250
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.6] => Array
                (
                    [iso] => 1200000000
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.7] => Array
                (
                    [iso] => 400000000
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.8] => Array
                (
                    [iso] => enabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.9] => Array
                (
                    [iso] => disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.10] => Array
                (
                    [iso] => disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.11] => Array
                (
                    [iso] => enabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.12] => Array
                (
                    [iso] => enabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.13] => Array
                (
                    [iso] => disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.14] => Array
                (
                    [iso] => H264=2
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.15] => Array
                (
                    [iso] => MPG2=disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.16] => Array
                (
                    [iso] => WVC1=disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.17] => Array
                (
                    [iso] => MPG4=2
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.18] => Array
                (
                    [iso] => MJPG=2
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.19] => Array
                (
                    [iso] => WMV9=disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.20] => Array
                (
                    [iso] => WMV9=disabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.21] => Array
                (
                    [iso] => H264=enabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.22] => Array
                (
                    [iso] => MPG2=1
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.23] => Array
                (
                    [iso] => WVC1=1
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.24] => Array
                (
                    [iso] => MPG4=enabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.25] => Array
                (
                    [iso] => MJPG=enabled
                )

            [3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.26] => Array
                (
                    [iso] => WMV9=1
                )

        )

However, nothing is being added to the database, just the temperature sensor. Note that this is without using the agent, initially it states that it is required, the documentation clearly states that it doesn’t.

Hi, I’m completely new to librenms, and after reading all this I’m more confused than before :slight_smile:

All Information my librenms shows is the cpu temp too.
Did you get a fix yet or not? This thread is like fixed - not fixed - fixed - not fixed, i don’t know…

Well, I’m trying to get information so I can get a working device. I wanted to document it as well, I’ve started going through the files and just trying to see what is happening and what is going wrong. I’ve had the empty graphs, but now I don’t and I do see data.

I did see there is a typo in /includes/discovery/sensors/voltage/linux.inc.php, but fixing it doesn’t do anything.

	$sensor_type = "rasbperry_volts";
	$oid = '.1.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.';
	for ($volt = 2; $volt < 6; $volt++) {

Which should of course be:

	$sensor_type = "raspberry_volts";

Other than that, I hope I get some more feedback from either Zucht or other users that still have some more sensors in their database after discovery. The array is being filled and the data is being “walked” by SNMP but it isn’t parsed.
I’m thinking of rolling back the discovery files to a previous version, when it did create the graphs and thus sensors to see if the new data is being processed then.

I just did a clean raspbian stretch install and followed the instructions in the docs. For raspian.sh to work i had to add an other user to the sudoers file: Debian-snmp instead of snmp

Yeah, they changed that in a recent version, on my current install that is also the user that runs the raspberry.sh script. However, I only get temperature added in LibreNMS, you posted from your database earlier, and there were frequencies, voltages etc. I get them in an array when I run discovery, and they are polled through SNMP, but they don’t show in LibreNMS…

So…

@laf I’ve been trying to wrap my head around what is going wrong. I’ve been looking at the discovery logs some of the other users have been posting, and I was seeing a difference in the array. In my array, all values are ISO:

[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] => 48.3
                )

and I’ve seen others with nsExtendOutLine."raspberry" and values as nsExtendOutLine. And in their screenshot I saw the sensors were added but values were empty. I was trying to figure out why, so I reinstalled one raspberry, but nothing changed. I blocked out the mib: line in my /etc/snmp/snmp.conf on the librenms host. When I checked later, it was showing values for the sensors and the discovery log now translates the ISO / array into nsExtendOutline values:

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

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

So it seems all your work was not in vain, and it is now working on my end.

I would suggest to the other guys, to go into their /etc/snmp/snmp.conf and comment out the line mibs:
image

NOTE: if you now receive errors: Cannot find module (SNMPv2-MIB): At line 0 in (none) or Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 } when running ./validate.php; install the snmp-mibs-downloader package (sudo apt-get install snmp-mibs-downloader).
In my case it downloaded the MIBS, if it doesn’t you can manually trigger the update by running sudo download-mibs

The only thing that differs from my previous configuration is the raspberry.sh file, but I now have a feeling that it doesn’t really matter. I will check some more later; just had to share the news :smile:

Edit: One more thing… ( :smiley: pun intended )
The file includes/discovery/sensors/voltage/linux.inc.php contains a typo on line 6:
$sensor_type = "rasbperry_volts";
Should be
$sensor_type = "raspberry_volts";

Don’t know if that makes a difference, but I changed it on my end.

1 Like

Jo0Lz you are the man! I followed the initial instructions and updated the script on the raspberry pi. I then edited the /etc/snmp/snmp.conf file as suggested and got the snmp-mibs-downloader package, perfection! Thank you! Additionally, I did not fix the typo in question, it works w/o the correction.

1 Like

Awesome! Glad to hear it. I’ve got two pi’s running, both with different shell scripts, but the information stays the same it seems. Can’t believe this was the issue all along. And Neil even suggested to remove the line, but with everything going on in this thread, I guess it’s easily overlooked.

Huzzah!

just to confirm, this fixes it for me too. thanks @Jo0Lz

1 Like

I followed the standard install instructions on Libres page and 3x checked I # out the mib line, yet I am still broken. Is there more yet more work that needs to be done or could someone point me to to a log to look at?

This fixed my issue for Stretch.

./discovery.php -h HOSTNAME -d | ./pbin.sh
./poller.php -h HOSTNAME -r -f -d | ./pbin.sh
snmpbulkwalk -OUneb -v2c -c COMMUNITY HOSTNAME . | ./pbin.sh

Provide this information, let’s have a look :slight_smile:

@Jo0Lz I’m good now thank you very much. The main fix for me was this line here.
Debian-snmp ALL=(ALL) NOPASSWD: /etc/snmp/raspberry.sh, /usr/bin/vcgencmd*
Once I added this line to my install everything started working.

1 Like

Ah, great. Didn’t know if it was just your stretch install, or all devices :slight_smile:

I’ve seen builds where the vcgencmd wasn’t symlinked from /opt/vc/bin/vcgencmd; in which case you have to create it. Maybe the docs can be updated to check that. Most builds still use the snmp account, debian changed it, raspbian too, Ubuntu remains unchanged afaik. It’s case sensitive too, so I expect people to waste some valuable time there :stuck_out_tongue_winking_eye:

Yeah… I jumped on IRC yesterday and asked if the help guide could be updated to include that line.

you can contribute to the docs if think something needs to be changed.

I had the same problem and this was one of the things I fixed. Has this been reported to the LibreNMS team so it can be added to the code?

Hmmm … this has been working for a long time, just broken again recently. Anyone else seeing this as well?

Thanks!

@arrmo I just set it up for the first time here. What problem are you seeing?

Do you see any output when you issue a command like this?

snmpwalk -v2c -c COMMUNITY -M /opt/librenms/mibs HOSTNAME .1.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121

If that one yields no results, try this one (note the single quotes, they are needed to escape the double quotes)

snmpwalk -v2c -c COMMUNITY -M /opt/librenms/mibs HOSTNAME ‘NET-SNMP-EXTEND-MIB::nsExtendOutputFull.“raspberry”’

With the first command,
Timeout: No Response from rpi3b

And the second,
‘NET-SNMP-EXTEND-MIB::nsExtendOutputFull.“raspberry”’: Unknown Object Identifier

On the RPi, checking /etc/snmp/snmpd.conf, I get the following (and this used to work, nothing changed in the configuration),
extend raspberry /usr/bin/raspberry.sh

And running /usr/bin/raspberry.sh,

37.6
1.2000
1.2000
1.2000
1.2250
1200000000
250000000
enabled
disabled
disabled
enabled
enabled
disabled
H264=2
MPG2=disabled
WVC1=disabled
MPG4=2
MJPG=2
WMV9=disabled
WMV9=disabled
H264=enabled
MPG2=1
WVC1=1
MPG4=enabled
MJPG=enabled
WMV9=1

Thoughts? Thanks!