Jump to content
coppit

[Plug-In] SNMP

127 posts in this topic Last Reply

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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)

 

 

Share this post


Link to post

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!

Share this post


Link to post

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.

 

I think for the next version of Slack they'll update it but for Slack 14.1 it's 5.7.2?

Share this post


Link to post

tried installing, getting the following error. possibly the md5 wasn't updated?

 

plugin: downloading: /boot/packages/net-snmp-5.7.2-x86_64-1.txz ... done

plugin: bad file MD5: /boot/packages/net-snmp-5.7.2-x86_64-1.txz

 

Share this post


Link to post

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. ;)

Share this post


Link to post

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.

Share this post


Link to post

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..  ::)

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

the only thing that's making me upset so far is i can't find any way to get temp sensors for windows working :( but anyways so far this is pretty cool.

Share this post


Link to post

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.

Share this post


Link to post

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?

Share this post


Link to post

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

Share this post


Link to post

I have observium installed, but the login is not working.  On hub.docker.com it says

 

Browse to http://your-host-ip:8668 and login with user and password observium

 

But I don't get it to work.  Is login supposed to be root / observium ?

 

zLuq85X.png

Share this post


Link to post

I have observium installed, but the login is not working.  On hub.docker.com it says

 

Browse to http://your-host-ip:8668 and login with user and password observium

 

But I don't get it to work.  Is login supposed to be root / observium ?

I think he means BOTH user and password are observium. Have you tried that?

Share this post


Link to post

I can confirm the default logon is observium / observium.  I was stumped a bit by the wording myself.

Share this post


Link to post

I know I tried that at first and it didn't work, but must have fat fingered it. I too can confirm it works.

Share this post


Link to post

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.

Share this post


Link to post

 

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

Share this post


Link to post

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

 

Yep. Enjoy!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now