[Plug-In] SNMP


Recommended Posts

3 minutes ago, rorton said:

anyone using this on 6.6.0 its not installed after upgrading, and just shows in the tab titled plugin file installed errors

 

SNMP_plg.thumb.png.4dbfbce39acf7ff5bbbc9950332ee1ec.png

Seems OK now, looking in the log, it was moaning about not getting the little graphic so i think it stopped the whole install - i deleted it, reinstalled, and it seems to be working...

Link to comment
  • 4 months later...

Hi this doesn't seem to work with 6.7.0rc1 anyone else having an issue with it?

 

plugin: installing: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg
plugin: downloading https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg
plugin: downloading: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg ... done

+==============================================================================
| Skipping package libnl-1.1.4-x86_64-1 (already installed)
+==============================================================================


+==============================================================================
| Skipping package net-snmp-5.7.3-x86_64-4 (already installed)
+==============================================================================

+==============================================================================
| Updating /etc/rc.d/rc.snmpd to use our config file, and to reduce logging
+==============================================================================
Shutting down snmpd: DONE
Starting snmpd: /usr/sbin/snmpd -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -A -p /var/run/snmpd -a -c /usr/local/emhttp/plugins/snmp/snmpd.conf


+==============================================================================
| Testing SNMP by listing mounts
+==============================================================================
Couldn't find /boot mount point in SNMP output. Output:
snmpwalk: error while loading shared libraries: libcrypto.so.1: cannot open shared object file: No such file or directory


plugin: run failed: /bin/bash retval: 1

Updating Support Links
 

 

Edited by SimonF
Link to comment



Hi this doesn't seem to work with 6.7.0rc1 anyone else having an issue with it?
 
plugin: installing: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg
plugin: downloading https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg
plugin: downloading: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg ... done

+==============================================================================
| Skipping package libnl-1.1.4-x86_64-1 (already installed)
+==============================================================================


+==============================================================================
| Skipping package net-snmp-5.7.3-x86_64-4 (already installed)
+==============================================================================

+==============================================================================
| Updating /etc/rc.d/rc.snmpd to use our config file, and to reduce logging
+==============================================================================
Shutting down snmpd: DONE
Starting snmpd: /usr/sbin/snmpd -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -A -p /var/run/snmpd -a -c /usr/local/emhttp/plugins/snmp/snmpd.conf


+==============================================================================
| Testing SNMP by listing mounts
+==============================================================================
Couldn't find /boot mount point in SNMP output. Output:
snmpwalk: error while loading shared libraries: libcrypto.so.1: cannot open shared object file: No such file or directory


plugin: run failed: /bin/bash retval: 1

Updating Support Links
 
 


Run this from the command line. It should fix it.
ln -s /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1

Link to comment

After executing this command

ln -s /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1

I receive this error now

 

plugin: installing: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg
plugin: downloading https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg
plugin: downloading: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg ... done

+==============================================================================
| Skipping package libnl-1.1.4-x86_64-1 (already installed)
+==============================================================================


+==============================================================================
| Skipping package net-snmp-5.7.3-x86_64-4 (already installed)
+==============================================================================

+==============================================================================
| Updating /etc/rc.d/rc.snmpd to use our config file, and to reduce logging
+==============================================================================
Shutting down snmpd: DONE
Starting snmpd: /usr/sbin/snmpd -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -A -p /var/run/snmpd -a -c /usr/local/emhttp/plugins/snmp/snmpd.conf


+==============================================================================
| Testing SNMP by listing mounts
+==============================================================================
Couldn't find /boot mount point in SNMP output. Output:
snmpwalk: symbol lookup error: /usr/lib64/libnetsnmp.so.30: undefined symbol: EVP_MD_CTX_create


plugin: run failed: /bin/bash retval: 1

 

Link to comment



After executing this command
ln -s /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.1

I receive this error now
 

plugin: installing: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plgplugin: downloading https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plgplugin: downloading: https://raw.githubusercontent.com/coppit/unraid-snmp/master/snmp.plg ... done+==============================================================================| Skipping package libnl-1.1.4-x86_64-1 (already installed)+==============================================================================+==============================================================================| Skipping package net-snmp-5.7.3-x86_64-4 (already installed)+==============================================================================+==============================================================================| Updating /etc/rc.d/rc.snmpd to use our config file, and to reduce logging+==============================================================================Shutting down snmpd: DONEStarting snmpd: /usr/sbin/snmpd -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -LF w /var/log/snmpd.log -A -p /var/run/snmpd -a -c /usr/local/emhttp/plugins/snmp/snmpd.conf+==============================================================================| Testing SNMP by listing mounts+==============================================================================Couldn't find /boot mount point in SNMP output. Output:snmpwalk: symbol lookup error: /usr/lib64/libnetsnmp.so.30: undefined symbol: EVP_MD_CTX_createplugin: run failed: /bin/bash retval: 1

 



Sorry the snmp package probably needs updating
Link to comment

Plugin is still installable on 6.6.6, but I can't get anything to work as I've seen in the thread here:

 

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)

 

Edited by tronyx
Link to comment
  • 2 weeks later...
7 hours ago, dmacias said:

My guess is, if you install the latest slackware64-current snmp package it will work.

Thanks I have downloaded the package from here: https://mirrors.slackware.com/slackware/slackware64-current/slackware64/n/ 

 

image.png.12e6b35e64474233788451d7b264da73.png

 

and installed. Once package is installed reapplied snmp plugin now works fine thanks for the suggestion. I had to make changes to snmp.plg file for it to work on reboot version changed to 5.8 and the pkghost and md5 needed to be changed.

 

<!DOCTYPE PLUGIN [
<!ENTITY name        "snmp">
<!ENTITY author      "coppit">
<!ENTITY version     "2018.07.22">
<!ENTITY pluginURL   "https://github.com/coppit/unraid-snmp/raw/master/snmp.plg">
<!ENTITY pkgversion  "5.8">
<!ENTITY gitURL      "https://raw.githubusercontent.com/&author;/unraid-snmp/master">
<!ENTITY plugdir     "/usr/local/emhttp/plugins/&name;">
<!ENTITY pkgdir      "/boot/packages">
<!ENTITY cfgdir      "/boot/config/plugins/&name;">
<!ENTITY pkghost     "https://mirrors.slackware.com/slackware/slackware64-current/slackware64/n/">

<!ENTITY snmppkg     "net-snmp-&pkgversion;-x86_64-4.txz">
<!ENTITY snmppkgmd5  "119ecee76951c11d782f077c7a89826e">

<!ENTITY libnlpkg    "libnl-1.1.4-x86_64-1.txz">
<!ENTITY libnlpkgmd5 "435837a5bf0401a937d6ec93e458333b">

<!ENTITY iconfile    "snmp.png">
<!ENTITY iconfilemd5 "863e97dc0e59ae9352f558ee8e0d40a2">

<!ENTITY community   "public">
<!ENTITY location    "Here">
<!ENTITY contact     "root@tower">
]>

Link to comment

unfortunately this workaround isn't working anymore. Even with net-snmp.5.8 the SNMP plugin is failing on 6.6.7 and 6.7rc5 . Also ive noticed when rebooting the server it reverts back to the net-snmp5.7 version and you have to reinstall it each time then reload SNMP plugin.. But I guess that's beside the point now since the plugin isn't working any longer. I wish they would just build in SNMP, doesn't seem too difficult.

 

Link to comment
unfortunately this workaround isn't working anymore. Even with net-snmp.5.8 the SNMP plugin is failing on 6.6.7 and 6.7rc5 . Also ive noticed when rebooting the server it reverts back to the net-snmp5.7 version and you have to reinstall it each time then reload SNMP plugin.. But I guess that's beside the point now since the plugin isn't working any longer. I wish they would just build in SNMP, doesn't seem too difficult.
 
The workaround will not work with 6.6.7. The plugin should still work on 6.6. net-snmp 5.8 is only for 6.7.rc. For 6.7 you have to modify the plg file as@SimonF did above.
Link to comment

I actually found the problem for some reason with 6.7rc5 it disabled perl. Once I re-enabled it, updated it, I was able to reinstall 5.8 and the plugin just fine.. I had no clue that got disabled but that was the cause.. and thanks i do see above he mentions "to fix on reboot" I will change it.

Edited by Trembler
Link to comment
  • 1 month later...
  • 4 weeks later...

Downloaded coppit's plg from github, edited the fields SimonF mentioned, copied the file to /boot/config/plugins and installed the plg via the webUI and snmp is working again on 6.7 (stable).

 

I didn't install netsnmp prior as mentioned, i figured the plg would install it which it did. Haven't tried rebooting and see if it installs on boot yet though (but i don't see why it wouldn't?) If anything i can just install the new plg manually again.

Edited by drawde
Link to comment
  • 3 weeks later...

Created a pull request for the Coppit package on GitHub https://github.com/coppit/unraid-snmp/pull/6 but it doesn't seem like they've been active since August 2018 on here or on GitHub.

 

With that in mind, I've made a version compatible with unRAID 6.7.0 in a forked repository that I'll keep updated for myself and anyone else that wants to use it:

 

https://raw.githubusercontent.com/kubedzero/unraid-snmp/main/snmp.plg

Edited by kubed_zero
Update PLG
  • Like 2
Link to comment
On 5/29/2019 at 2:04 AM, kubed_zero said:

Created a pull request for the Coppit package on GitHub https://github.com/coppit/unraid-snmp/pull/6 but it doesn't seem like they've been active since August 2018 on here or on GitHub.

 

With that in mind, I've made a version compatible with unRAID 6.7.0 in a forked repository that I'll keep updated for myself and anyone else that wants to use it:

 

https://raw.githubusercontent.com/kubedzero/unraid-snmp/master/snmp.plg

https://forums.unraid.net/topic/42808-plugin-templates-for-ca-appstore/

 

Link to comment

Has anybody figured out how to get SMART disk temps to be reported to Observium via SNMP?  I'm seeing basically what others in the thread have seen: running the commands manually work and report disk temps, but the temps not showing up in Observium.

 

root@Tower:~# /usr/local/emhttp/plugins/snmp/drive_temps.sh ST5000LM000-2AN170_WCJ01K50: 29 ST5000LM000-2AN170_WCJ02FA8: 29 ST5000LM000-2AN170_WCJ01JAC: 29 ST5000LM000-2AN170_WCJ02A77: 29 ST5000LM000-2AN170_WCJ02N74: 30 ST5000LM000-2AN170_WCJ01GDL: 29 ST5000LM000-2AN170_WCJ02ANT: 27 ST5000LM000-2AN170_WCJ02QK7: 30

 

Thanks and Best regards

Link to comment

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.