Jump to content
coppit

[Plug-In] SNMP

163 posts in this topic Last Reply

Recommended Posts

1 hour ago, pluginCop said:

giphy.gif

Ha! Sorry. I run unRAID within a VM under ESXi. Thus, I only use it for its NAS functionality with only a couple plugins: Nerd Tools, Open Files, SNMP, and a couple Dynamix ones. No need for CA with a setup as simple as this! Not to mention this is all on a 1GB USB key with very little free space :) 

Share this post


Link to post
Posted (edited)

I've installed the new version of the plugin by @kubed_zero on three servers and it's working fine on two of them, with Observium generating graphs. On the third I'm getting this error message repeatedly (every three seconds) in my syslog starting immediately after installing the plugin and Observium believes the server to be offline:

May 31 18:16:30 Mandaue root: plugin: creating: /usr/local/emhttp/plugins/snmp/snmpd.conf - from INLINE content
May 31 18:16:30 Mandaue root: plugin: running: anonymous
### [PREVIOUS LINE REPEATED 1 TIMES] ###
May 31 18:16:30 Mandaue kernel: r8169 0000:05:00.0 eth2: Invalid ocp reg 2a3fe!
May 31 18:16:30 Mandaue root: plugin: running: anonymous
May 31 18:16:33 Mandaue kernel: r8169 0000:05:00.0 eth2: Invalid ocp reg 2a3fe!
### [PREVIOUS LINE REPEATED 439 TIMES] ###

If I uninstall the plugin the error message continues until I reboot. If I don't install the plugin my syslog is clean. I Googled the error message but got nothing relevant - Google seems fixated by military uniforms, latching on to "ocp" and failing to find a match for everything else. The two major differences between this server and the other two: firstly, it's running Unraid 6.7.1-rc1 (as opposed to 6.7.0 on the others) as a test; secondly, eth2 is the onboard Realtek NIC, which is unconfigured and unused, though not disabled in the BIOS, with eth0 and eth1 forming a bond, while the other servers have no unused NICs. One of them has a single Realtek NIC, which is configured as eth0 and is in use. The other has two Broadcom NICs in a bond. Diagnostics attached.

 

mandaue-diagnostics-20190531-1745.zip

 

EDIT: I was only running Unraid 6.7.1-rc1 as a test. The server doesn't have an Intel processor and doesn't need the MDS mitigations but in the light of this comment by Tom,

I thought it would be useful to test it. Anyway, I reverted to Unraid 6.7.0 on this server and the problem persists if I install the SNMP plugin. Attached diagnostics for Unraid 6.7.0.

 

mandaue-diagnostics-20190531-1859.zip

 

Edited by John_M
Reverted to 6.7.0 and error persists; typos

Share this post


Link to post
5 minutes ago, John_M said:

The two major differences between this server and the other two: firstly, it's running Unraid 6.7.1-rc1 (as opposed to 6.7.0 on the others) as a test; secondly, eth2 is the onboard Realtek NIC

 

Wild. A quick Google for "realtek invalid ocp" gave me https://lists.openwall.net/netdev/2012/07/09/143 which makes me think it's something to do with the Realtek software stack, although I can't pinpoint exactly what's up. I wonder if it's the SNMP Slackware package trying to query/bind the different network interfaces in the system, and since the Realtek interface isn't disabled in the BIOS it finds that as well. This is just speculation though.

 

I'd suggest BIOS-disabling the unused Realtek NIC that's causing you issues, but would be interested in hearing anything else you find. Assuming the motherboards or network cards are different, maybe the working Realtek NIC is a different model than the one that's causing issues. Maybe the single Realtek NIC doesn't have problems because it's actively bound to an IP and is in use.

 

 

Share this post


Link to post

I tried giving the unused port a static IP address but that didn't change anything. I want to try adding the port to the existing bond but today is scheduled parity check day so I'll leave it alone for now. I'll probably end up disabling the port in the BIOS.

Share this post


Link to post
Posted (edited)
On 5/31/2019 at 5:21 PM, kubed_zero said:

Just created a new repo for this: https://github.com/kubedzero/unraid-community-apps-xml I don't use CA myself but I can spin up a test instance of unRAID later to confirm this works. That is assuming there's a way to reference this new XML file manually. 

Thanks for the updated plugin, test via CA on my test server Will update live server soon.

Edited by SimonF

Share this post


Link to post

Thank you for working to get this Plugin compatible with 6.7, but I can't get anything for the individual shares to work as I've seen in the thread:

 

root@Gothmog:~# snmpwalk -v 2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendOutLine
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".1 = STRING: WDC_WD100EMAZ-00WJTA0_2YJ0ZH9D: 31
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".2 = STRING: WDC_WD100EMAZ-00WJTA0_JEGKPT5N: 30
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".3 = STRING: WDC_WD100EFAX-68LHPN0_JEHM4AMN: 29
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".4 = STRING: WDC_WD100EFAX-68LHPN0_JEHM0D0N: 28
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".5 = STRING: WDC_WD80EMAZ-00WJTA0_7SJEAMEW: 32
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".6 = STRING: WDC_WD80EMAZ-00WJTA0_7SJHUD2W: 31
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".7 = STRING: WDC_WD40EFRX-68N32N0_WD-WCC7K3NHHZVR: 26
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".8 = STRING: WDC_WD40EFRX-68N32N0_WD-WCC7K2EC6CNJ: 25
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".9 = STRING: WDC_WD100EMAZ-00WJTA0_2YHVUKVD: 31
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1 = STRING: Plex_Media_Backup: 23271758839808
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".2 = STRING: appdata: 1012790734848
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".3 = STRING: domains: 1012790734848
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".4 = STRING: isos: 22258968104960
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".5 = STRING: system: 1012790734848


root@Gothmog:~# snmpwalk -v 2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1
NET-SNMP-EXTEND-MIB::nsExtendOutLine.sharefree.1: Unknown Object Identifier (Index out of range: sharefree (nsExtendToken))

 

 

Cannot get it to work remotely at all either:

root@nagios:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m NET-SNMP-EXTEND-MIB::nsExtendOutLine -o sharefree
External command error: MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (nsExtendOutLine): At line 0 in (none)
sharefree: Unknown Object Identifier (Sub-id not found: (top) -> sharefree)

 

Share this post


Link to post

Trying to install this and I get and when installing I'm getting this:

 

 

 

2019-07-21_09-38-51.png.9e5161d89aeec43f146be31b88992550.png

Share this post


Link to post
5 minutes ago, Fiala06 said:

Trying to install this and I get and when installing I'm getting this:

 

The log says /boot can't be found. It's failing on https://github.com/kubedzero/unraid-snmp/blob/master/snmp.plg#L229

 

When I try to run the command "snmpwalk -v 1 localhost -c public hrFSMountPoint" on my host I get 

 

root@myUnraid:~# snmpwalk -v 1 localhost -c public hrFSMountPoint
HOST-RESOURCES-MIB::hrFSMountPoint.1 = STRING: "/mnt/disk1"
HOST-RESOURCES-MIB::hrFSMountPoint.2 = STRING: "/mnt/disk2"
HOST-RESOURCES-MIB::hrFSMountPoint.3 = STRING: "/mnt/disk3"
HOST-RESOURCES-MIB::hrFSMountPoint.24 = STRING: "/dev/shm"
HOST-RESOURCES-MIB::hrFSMountPoint.25 = STRING: "/var/log"
HOST-RESOURCES-MIB::hrFSMountPoint.26 = STRING: "/boot"

It's also possible to run this replacing "localhost" with your host's IP address, like "192.168.0.2" or something. 

 

If you can try to run the SNMP command manually and show us what you see, that could be helpful. Perhaps it's just not running and you need to reboot/reinstall. Or perhaps /boot truly is missing, but I can't see how that would be possible. 

Share this post


Link to post
On 6/19/2019 at 10:01 AM, tronyx said:

Thank you for working to get this Plugin compatible with 6.7, but I can't get anything for the individual shares to work as I've seen in the thread:

 


root@Gothmog:~# snmpwalk -v 2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendOutLine
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".1 = STRING: WDC_WD100EMAZ-00WJTA0_2YJ0ZH9D: 31
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".2 = STRING: WDC_WD100EMAZ-00WJTA0_JEGKPT5N: 30
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".3 = STRING: WDC_WD100EFAX-68LHPN0_JEHM4AMN: 29
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".4 = STRING: WDC_WD100EFAX-68LHPN0_JEHM0D0N: 28
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".5 = STRING: WDC_WD80EMAZ-00WJTA0_7SJEAMEW: 32
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".6 = STRING: WDC_WD80EMAZ-00WJTA0_7SJHUD2W: 31
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".7 = STRING: WDC_WD40EFRX-68N32N0_WD-WCC7K3NHHZVR: 26
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".8 = STRING: WDC_WD40EFRX-68N32N0_WD-WCC7K2EC6CNJ: 25
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".9 = STRING: WDC_WD100EMAZ-00WJTA0_2YHVUKVD: 31
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1 = STRING: Plex_Media_Backup: 23271758839808
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".2 = STRING: appdata: 1012790734848
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".3 = STRING: domains: 1012790734848
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".4 = STRING: isos: 22258968104960
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".5 = STRING: system: 1012790734848


root@Gothmog:~# snmpwalk -v 2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1
NET-SNMP-EXTEND-MIB::nsExtendOutLine.sharefree.1: Unknown Object Identifier (Index out of range: sharefree (nsExtendToken))

 

 

Cannot get it to work remotely at all either:


root@nagios:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m NET-SNMP-EXTEND-MIB::nsExtendOutLine -o sharefree
External command error: MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (nsExtendOutLine): At line 0 in (none)
sharefree: Unknown Object Identifier (Sub-id not found: (top) -> sharefree)

 

Wrap your identifier in a set of single quotes so the double quotes don't get interpreted by the CLI:

 

root@myUnraid:~# snmpwalk -v 2c -c public localhost 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1 = STRING: CoolShare1: 446446297088
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".2 = STRING: RandomShare: 446446297088
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".3 = STRING: SharedShare: 392926117888

 

Share this post


Link to post
1 hour ago, kubed_zero said:

Wrap your identifier in a set of single quotes so the double quotes don't get interpreted by the CLI:

 


root@myUnraid:~# snmpwalk -v 2c -c public localhost 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1 = STRING: CoolShare1: 446446297088
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".2 = STRING: RandomShare: 446446297088
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".3 = STRING: SharedShare: 392926117888

 

 

Thank you, that resolved the local execution issue, but remote still isn't working:

 

root@e21f3a6e04c4:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m 'NET-SNMP-EXTEND-MIB::nsExtendOutLine -o sharefree'
No OIDs specified
root@e21f3a6e04c4:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m 'NET-SNMP-EXTEND-MIB::nsExtendOutLine -o sharefree.1'
No OIDs specified
root@e21f3a6e04c4:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m 'NET-SNMP-EXTEND-MIB::nsExtendOutLine -o "sharefree"'
No OIDs specified

 

Share this post


Link to post
2 minutes ago, tronyx said:

 

Thank you, that resolved the local execution issue, but remote still isn't working:

 


root@e21f3a6e04c4:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m 'NET-SNMP-EXTEND-MIB::nsExtendOutLine -o sharefree'
No OIDs specified
root@e21f3a6e04c4:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m 'NET-SNMP-EXTEND-MIB::nsExtendOutLine -o sharefree.1'
No OIDs specified
root@e21f3a6e04c4:/# /opt/nagios/libexec/check_snmp -H 192.168.1.104 -C public -m 'NET-SNMP-EXTEND-MIB::nsExtendOutLine -o "sharefree"'
No OIDs specified

 

I don't know what "check_snmp" is but if you use "snmpwalk" remotely it works fine. Sorry, can't help you here beyond saying:

- the same command I posted earlier with localhost subbed out for the IP address and executed from a Mac on the network runs fine 

- you might want to consider using the same SNMP implementation, aka "snmpwalk." Otherwise, you should go hunt through the documentation for the SNMP tool you're using to figure out how to pass in the arguments correctly.

- It could also be that whatever host OS you're using is interpreting quote characters differently

 

good luck! 

Share this post


Link to post
Posted (edited)

Did someone ever get the drive temps into observium / librenms?

if I do a snmpwalk or run drive.temp.sh script I get the right results.

 

root@unRAID:~# /usr/local/emhttp/plugins/snmp/drive_temps.sh 
WDC_WD60EFRX-68L0BN1_WD-WX21DC7APCD1: 36
WDC_WD60EFRX-68L0BN1_WD-WX21DC74DY6X: 37
WDC_WD60EFRX-68L0BN1_WD-WX21DC74D7RF: 37
WDC_WD60EFRX-68L0BN1_WD-WX21DC7APUNY: 36
root@unRAID:~# snmpwalk -v 2c localhost -c public 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".1 = STRING: WDC_WD60EFRX-68L0BN1_WD-WX21DC7APCD1: 36
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".2 = STRING: WDC_WD60EFRX-68L0BN1_WD-WX21DC74DY6X: 37
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".3 = STRING: WDC_WD60EFRX-68L0BN1_WD-WX21DC74D7RF: 37
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".4 = STRING: WDC_WD60EFRX-68L0BN1_WD-WX21DC7APUNY: 36

 

Edited by svenvg93

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.