Jump to content

[Plug-In] SNMP


Recommended Posts

SNMP is a standard way to get raw data from devices, for monitoring purposes. With this package, you can hook your UNRAID server up to a monitor, and track things like network usage, cpu activity, even user logins.

 

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

 

I recommend installing zukhov's Observium docker container. It can then track your server's status. See the Observium website for some idea of what it might look like. Here's an example pic.

 

The plugin reports disk temperatures and share free space using the "disktemp" and "sharefree" extensions. For example:

 

snmpwalk -v 2c localhost -c public 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp"'

 

However I don't know how to get Observium to track them. Help would be appreciated!

 

Warning: This plugin has only been tested for UNRAID 6. This plugin requires that you install Nerd Tools first. That's how it gets perl.

  • Upvote 1
Link to comment

I think you should leave Perl installed when the plugin is uninstalled (but of course remove your installer-files from the flash).

the usual way to clean up the unraid installation is to reboot. if the user want's to remove a plugin and everything that came with it, he would remove the plugin and reboot.

 

other than that, thanks for the plugin, I'll have to test it as soon as I find some time :)

Link to comment

SNMP is a standard way to get raw data from devices, for monitoring purposes. With this package, you can hook your UNRAID server up to a monitor, and track things like network usage, cpu activity, even user logins.

 

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

 

I recommend installing zukhov's Observium docker container. It can then track your server's status. See the Observium website for some idea of what it might look like. Here's an example pic.

 

Warning: This plugin has only been testing for UNRAID 6. It also installs perl, and also uninstalls perl when it is uninstalled. This may break other plugins that also install perl. (How can we fix this? Leave perl installed?)

 

That example pic looks like man porn.  ;D

 

Installed observium, but will need to read a bit about how to get Unraid going with it.  But glad you got it up and running.  Strange about needing to install from slackbuilds, I've never had any problems with mirrors.slackware.com myself, and have been using it a lot (even yesterday) to compile mediabuilds.  Not that it's a problem where you get the packages from, either/or.

 

 

  • Like 1
Link to comment

just tried to install the plugin. it tries to download net-smp-5.7.3, but only 5.7.2 is available.

plugin: downloading: http://slackbuilds.org/mirror/slackware/slackware64-14.1/slackware64/n/net-snmp-5.7.3-x86_64-1.txz ... done
plugin: bad file MD5: /boot/packages/net-snmp-5.7.3-x86_64-1.txz

Link to comment

just tried to install the plugin. it tries to download net-smp-5.7.3, but only 5.7.2 is available.

plugin: downloading: http://slackbuilds.org/mirror/slackware/slackware64-14.1/slackware64/n/net-snmp-5.7.3-x86_64-1.txz ... done
plugin: bad file MD5: /boot/packages/net-snmp-5.7.3-x86_64-1.txz

 

Just checked and I get the same result as you, but I already have net-snmp-5.7.3-x86_64-1.txz on my flash, assumedly because coppit's earlier plugin put it there when he was pulling from mirrors.slackware.

 

Here's the link if you want it.

 

EDIT: Interestingly Slackware 14.1 version is 5.7.2 and Slackware current is 5.7.3, so it might be better for coppit to stick with 5.7.2 as unraid is based on 14.1?

Link to comment

I think you should leave Perl installed when the plugin is uninstalled (but of course remove your installer-files from the flash).

the usual way to clean up the unraid installation is to reboot. if the user want's to remove a plugin and everything that came with it, he would remove the plugin and reboot.

 

other than that, thanks for the plugin, I'll have to test it as soon as I find some time :)

I think that it should be uninstalled.  Uninstall should remove all traces of the plugin and not leave anything behind that could potentially interact with the rest of the system.  Perhaps the best way of installing perl in the first place would be similar to how PhaZe handles his dependencies -> any additional dependencies are only installed for the plugin itself.  Therefore a user could potentially have multiple versions of the same dependency installed concurrently (If I understand the way his plgs work properly)

 

 

Link to comment

Therefore a user could potentially have multiple versions of the same dependency installed concurrently

 

I confess that I haven't looked very hard at what PhaZe has done, except to see that he's building is now tarball, which I'd like to avoid.

 

just tried to install the plugin. it tries to download net-smp-5.7.3, but only 5.7.2 is available.

 

Weird. I'll update it.

 

the usual way to clean up the unraid installation is to reboot.

 

I'm not sure I want to require a reboot to clean up, but that does point to a solution:

 

1) Uninstall snmp

2) Remove the /boot/packages/perl...txz file

3) Leave perl installed on the system, so that other plugins don't break unexpectedly

4) When the user reboots, the other installed plugins will re-download perl...txz and reinstall it.

 

Boot is a little slower during #4, but that's a one-time issue. Everything should work correctly.

 

Plugin updated for these two issues. Thanks!

Link to comment

Dang sorry about that. Fixed and tested. I also switched to a specific mirror. When fixing it I noticed the version change yet again from -1.txz to -2.txz. It looks like the various mirrors have slightly different package versions.

 

Note: Because the version dropped from 5.7.3 to 5.7.2, folks will need to manually uninstall and reinstall. "Upgrade" won't work. ;)

Link to comment

Dang sorry about that. Fixed and tested. I also switched to a specific mirror. When fixing it I noticed the version change yet again from -1.txz to -2.txz. It looks like the various mirrors have slightly different package versions.

 

Note: Because the version dropped from 5.7.3 to 5.7.2, folks will need to manually uninstall and reinstall. "Upgrade" won't work. ;)

 

thanks coppit. i installed observium docker as soon as i heard about it here. i've since enabled snmp on 1 computer, 1 vm, 1 raspberry pi and now 1 unraid server. pretty cool. will report back with any issues related to snmp for unraid.

Link to comment

Dang sorry about that. Fixed and tested. I also switched to a specific mirror. When fixing it I noticed the version change yet again from -1.txz to -2.txz. It looks like the various mirrors have slightly different package versions.

 

Note: Because the version dropped from 5.7.3 to 5.7.2, folks will need to manually uninstall and reinstall. "Upgrade" won't work. ;)

 

thanks coppit. i installed observium docker as soon as i heard about it here. i've since enabled snmp on 1 computer, 1 vm, 1 raspberry pi and now 1 unraid server. pretty cool. will report back with any issues related to snmp for unraid.

 

Would you mind sharing a screenshot of how to set it up on Unraid, got me stumped, probably missing something obvious..  ::)

Link to comment

Dang sorry about that. Fixed and tested. I also switched to a specific mirror. When fixing it I noticed the version change yet again from -1.txz to -2.txz. It looks like the various mirrors have slightly different package versions.

 

Note: Because the version dropped from 5.7.3 to 5.7.2, folks will need to manually uninstall and reinstall. "Upgrade" won't work. ;)

 

thanks coppit. i installed observium docker as soon as i heard about it here. i've since enabled snmp on 1 computer, 1 vm, 1 raspberry pi and now 1 unraid server. pretty cool. will report back with any issues related to snmp for unraid.

 

Would you mind sharing a screenshot of how to set it up on Unraid, got me stumped, probably missing something obvious..  ::)

 

hmm i'm past that part and i don't wanna delete unraid but i will if you can't get it working. try this first, it's just

 

hostname = tower

protocol version = v2c

port = 161

snmp community = public

 

pretty sure everything else was blank/default.

Link to comment

Dang sorry about that. Fixed and tested. I also switched to a specific mirror. When fixing it I noticed the version change yet again from -1.txz to -2.txz. It looks like the various mirrors have slightly different package versions.

 

Note: Because the version dropped from 5.7.3 to 5.7.2, folks will need to manually uninstall and reinstall. "Upgrade" won't work. ;)

 

thanks coppit. i installed observium docker as soon as i heard about it here. i've since enabled snmp on 1 computer, 1 vm, 1 raspberry pi and now 1 unraid server. pretty cool. will report back with any issues related to snmp for unraid.

 

Would you mind sharing a screenshot of how to set it up on Unraid, got me stumped, probably missing something obvious..  ::)

 

hmm i'm past that part and i don't wanna delete unraid but i will if you can't get it working. try this first, it's just

 

hostname = tower

protocol version = v2c

port = 161

snmp community = public

 

pretty sure everything else was blank/default.

 

Oh My God! This is amazing, thanks coppit and drawde.  I'm so excited think I just let out a little bit of wee...

 

So many graphs, and so much information...  ;D

Link to comment
  • 2 weeks later...

In case anyone is wondering how to get Windows machines monitored:

 

  • Open control panel
  • In "Turn windows features on and off", install SNMP
  • Open "Services" and double-click SNMP Service (Not SNMP Trap)
  • On the security tab, set the community to "public" and accept SNMP packets from your UNRAID server

 

As far as temps, it looks like you have to install a 3rd party module to enable capture of the temps.

 

http://serverfault.com/questions/156536/how-can-i-monitor-cpu-temperature-in-windows-over-snmp

Link to comment

link to .plg doesn't work though. Good idea making this a plugin though! It works, Thanks for the effort coppit! :)

 

might be kinda OT, not related to this plugin but is SNMP only for LAN elements? i tried to install snmp on my vps that i rent but i was unable to connect.

Can you connect if you open a VPN tunnel to the remote site?

 

Yes, You'd need static VPN tunnels. It would be a WAN pretty much.

We use this at work, we got locations all over the world and we monitor traffic/load with cacti via snmp.

Link to comment

 

Ooooh!  Can't wait to try this.  I've been using SNMP to manage network-attached devices since the early 90's.  I've been using SNMP to at least watch the reachability of my unRAID VM, but now I get get some other useful stuff.  Sweet.

 

Now to figure out which OIDs are interesting...

 

So as a v6 plug-in, will this be installable/updatable/deletable all through the unRAID GUI?

 

Thanks,

 

John

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.

×
×
  • Create New...