[Plug-In] SNMP


Recommended Posts

I have observium running and its gathering information from my pfSense box, ive changed the community string for the pfsense box for security reasons.  I modified the snmpd.conf on my unraid but it give it me an odd error.

"No reply using "XXX" using 2vc (XXX is an example of community string)

"could not read tower using the given the snmp parameters using v2c

 

 

--EDIT

set it back to defaults and i was able to get to discover, i dont like the fact that it uses public but it works,

Link to comment
  • 1 month later...

I've just installed this plugin and it has replaced my Perl 5.22.0 installation from the NerdPack plugin with version 5.18.1, which doesn't seem right. Surely it should check first? How do I make things right again, please?

 

Edit: I see that the NerdPack Settings page has spotted the change and is offering me version 5.22.0. Is it OK to update it or will it break SNMP?

Link to comment

You need a DNS somewhere in your network to resolve "tower" to corresponding IP address.

There is usually a simple DNS in a router provided by ISP.

 

From my experience with Docker it is not enough to use /etc/hosts on a machine hosting dockers (unraid in your case). There are some tricks to pass that /etc/hosts to docker, but easiest way is to use your own DNS either running on a router or on some server.

 

My ISP (Sky Ireland) provide a shite router (SkyHub 2.0) which does not easily provide DNS settings.

 

My Solution:

root@tower:# docker exec -it Observium /bin/bash
root@300cb02a1ebf:#vi /etc/hosts

 

add ip address and hostname to hostfile and BINGO, Observium resolves host!!

 

 

Link to comment

Also, 2 questions for users of this plugin with observium?

 

1: Does location work for you? The map on my Observium homepage reports my server as being in Sao Miguel instead of Ireland!!

 

2: virbr0 appears as a "Port Down" for me, are others getting this error report? I believe it is the the network bridge created by KVM, but why is  it appearing as down? My VMs have perfect network/internet access.

 

 

Thanks!

Link to comment

You need a DNS somewhere in your network to resolve "tower" to corresponding IP address.

There is usually a simple DNS in a router provided by ISP.

 

From my experience with Docker it is not enough to use /etc/hosts on a machine hosting dockers (unraid in your case). There are some tricks to pass that /etc/hosts to docker, but easiest way is to use your own DNS either running on a router or on some server.

 

My ISP (Sky Ireland) provide a shite router (SkyHub 2.0) which does not easily provide DNS settings.

 

My Solution:

root@tower:# docker exec -it Observium /bin/bash
root@300cb02a1ebf:#vi /etc/hosts

 

add ip address and hostname to hostfile and BINGO, Observium resolves host!!

 

hey Cap - thanks for sharing your solution.

 

Quick question.

 

I do have a router (ASUS RT N56-U) and I believe I have DNS configured (I believe) - do I still need to add ip address and hostname to hostfile.

1ou4x0.jpg

Link to comment

You need a DNS somewhere in your network to resolve "tower" to corresponding IP address.

There is usually a simple DNS in a router provided by ISP.

 

From my experience with Docker it is not enough to use /etc/hosts on a machine hosting dockers (unraid in your case). There are some tricks to pass that /etc/hosts to docker, but easiest way is to use your own DNS either running on a router or on some server.

 

My ISP (Sky Ireland) provide a shite router (SkyHub 2.0) which does not easily provide DNS settings.

 

My Solution:

root@tower:# docker exec -it Observium /bin/bash
root@300cb02a1ebf:#vi /etc/hosts

 

add ip address and hostname to hostfile and BINGO, Observium resolves host!!

 

hey Cap - thanks for sharing your solution.

 

Quick question.

 

I do have a router (ASUS RT N56-U) and I believe I have DNS configured (I believe) - do I still need to add ip address and hostname to hostfile.

1ou4x0.jpg

 

Based on that screenshot you will need to, the DNS setting pictured is not the same settings as previously mentioned in this thread.

Link to comment

Anyone?!

 

Also, 2 questions for users of this plugin with observium?

 

1: Does location work for you? The map on my Observium homepage reports my server as being in Sao Miguel instead of Ireland!!

 

2: virbr0 appears as a "Port Down" for me, are others getting this error report? I believe it is the the network bridge created by KVM, but why is  it appearing as down? My VMs have perfect network/internet access.

 

 

Thanks!

Link to comment

Mine shows Sao Miguel too, specifically the town of Ponta Delgada, presumably some default. I don't know how it's meant to work out the true location anyway.

 

There's a lot of information displayed and it's all superficially very pretty but the graphs tend to use subtle shades of a few colours each so are difficult to interpret. Also, it doesn't seem very customisable. I was hoping to be able to monitor my DSL router, which has SNMP enabled, in order to keep an eye on SNR margin and sync speed but so far have only been able to monitor traffic.

Link to comment
  • 2 weeks later...

I've just installed this plugin and it has replaced my Perl 5.22.0 installation from the NerdPack plugin with version 5.18.1, which doesn't seem right. Surely it should check first? How do I make things right again, please?

 

This seems like a mis-feature of the upgradepkg tool. I add the flag --install-new so that it will install perl if it's not already on the system. But it seems to also force-install the older version if a newer version already exists. :(

 

If this is a big issue, I suppose I could write my own install tool wrapper that checks versions properly... In the meantime I'll just bump the version of perl to match nerdtools.

 

Edit: I see that the NerdPack Settings page has spotted the change and is offering me version 5.22.0. Is it OK to update it or will it break SNMP?

 

I doubt it will break things. Let me test it.

Link to comment

Mine shows Sao Miguel too, specifically the town of Ponta Delgada, presumably some default. I don't know how it's meant to work out the true location anyway.

 

There's a lot of information displayed and it's all superficially very pretty but the graphs tend to use subtle shades of a few colours each so are difficult to interpret. Also, it doesn't seem very customisable. I was hoping to be able to monitor my DSL router, which has SNMP enabled, in order to keep an eye on SNR margin and sync speed but so far have only been able to monitor traffic.

SNMP Host location is taken from SNMP definitions of that device. In case of unraid it should be possible to edit SNMP config file and specify location. In case of some home devices, especially managed switches you can specify location in their GUIs.

You can also specify the above in Observium itself (edit host) and don't bother with finding the setting in a given host.

Link to comment

My Solution:

root@tower:# docker exec -it Observium /bin/bash
root@300cb02a1ebf:#vi /etc/hosts

 

add ip address and hostname to hostfile and BINGO, Observium resolves host!!

 

This works nicely, thank you. But is there an easy way to make it permanent so that it survives a reboot?

Link to comment

My Solution:

root@tower:# docker exec -it Observium /bin/bash
root@300cb02a1ebf:#vi /etc/hosts

 

add ip address and hostname to hostfile and BINGO, Observium resolves host!!

 

This works nicely, thank you. But is there an easy way to make it permanent so that it survives a reboot?

 

Not an easy way, to be honest I have moved to an Observium VM using this:

 

https://www.turnkeylinux.org/observium

 

No probs since.

 

 

Link to comment

add ip address and hostname to hostfile and BINGO, Observium resolves host!!

 

This works nicely, thank you. But is there an easy way to make it permanent so that it survives a reboot?

 

What you could try is putting something like this into your go script:

 

echo "$(/sbin/ifconfig br0 | grep inet | awk '{print $2}')    storage" >> /etc/hosts

 

Then use the advanced container options to map /etc/hosts from the docker host to the container. The container will think that localhost is your server, but maybe that's okay?

Link to comment

Wanted to add my thanks for this plugin. Using the Observium VM Appliance is the way to go (I set it up on my ESXi box). Looks great and all the info appears accurate.

 

I've moved on to trying the LibreNMS fork of Observium. I love it so far. The community/authors seem much more friendly as well. I'd recommend it over Observium at this point.

Link to comment

Thanks again for this plugin, I love it. The one issue I'm still having is with disktemps polled through SNMP. It looks like it's going to work when I try via snmpwalk, but I get nothing. Running the drive_temps.sh manually works fine. Polling "sharefree" via snmpwalk works as expected and my .conf looks ok, so I'm stumped.

 

I saw some mention earlier re: scripts not having enough time to run... was that resolved? How can I see if that's what's happening to me?

 

 

Linux 4.1.18-unRAID.
Last login: Sat Mar 12 17:57:35 -0700 2016 on /dev/pts/0 from MacMini.geek.lan.
root@Tower:~# snmpwalk -v 2c localhost -c public 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp".1 = STRING:
root@Tower:~# /usr/local/emhttp/plugins/snmp/drive_temps.sh
WDC_WD30EFRX-68EUZN0_WD-WMC4N2022598: 31
Hitachi_HDS5C3020ALA632_ML0220F30EAZYD: 40
ST2000DL004_HD204UI_S2H7J90C301317: 35
WDC_WD30EFRX-68EUZN0_WD-WCC4NPRDDFLF: 36
Hitachi_HDS722020ALA330_JK1101B9GME4EF: 44
Hitachi_HDS722020ALA330_JK1101B9GKEL4F: 43
WDC_WD30EFRX-68EUZN0_WD-WCC4N4EZ7Z5Y: 36
WDC_WD30EFRX-68EUZN0_WD-WCC4N1VJKTUV: 37
WDC_WD30EFRX-68EUZN0_WD-WCC4N4TRHA67: 34
WDC_WD30EFRX-68EUZN0_WD-WMC4N0F81WWL: 33
WDC_WD30EFRX-68EUZN0_WD-WMC4N0H2AL9C: 33
WDC_WD30EFRX-68EUZN0_WD-WCC4N3YFCR2A: 36
Hitachi_HDS722020ALA330_JK11H1B9GM9YKR: 42
WDC_WD30EFRX-68EUZN0_WD-WCC4N6DVY4F0: 32
WDC_WD30EFRX-68EUZN0_WD-WCC4N3SYYN5S: 32
root@Tower:~# cat /usr/local/emhttp/plugins/snmp/snmpd.conf | grep temp
extend disktemp /usr/local/emhttp/plugins/snmp/drive_temps.sh
root@Tower:~#
root@Tower:~# snmpwalk -v 2c localhost -c public 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree"'
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".1 = STRING: A: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".2 = STRING: HomeMediaBackup: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".3 = STRING: Home_Videos: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".4 = STRING: Kings: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".5 = STRING: Learning: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".6 = STRING: MMA: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".7 = STRING: Movies: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".8 = STRING: Music: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".9 = STRING: TESTMovies: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".10 = STRING: TV: 4027489538048
NET-SNMP-EXTEND-MIB::nsExtendOutLine."sharefree".11 = STRING: Test_Media: 4027489538048
root@Tower:~# ls -la /usr/local/emhttp/plugins/snmp/
total 76
drwxrwx---  2 root root   140 Mar  7 21:31 ./
drwxrwxrwx 13 root root   260 Mar  7 21:31 ../
-rw-rw-rw-  1 root root   164 Mar  7 21:31 README.md
-rwxrwxrwx  1 root root  2658 Mar  7 21:31 drive_temps.sh*
-rwxrwxrwx  1 root root   543 Mar  7 21:31 share_free_space.sh*
-rw-rw-rw-  1 root root 60976 Mar  7 21:31 snmp.png
-rw-rw-rw-  1 root root   571 Mar 12 17:53 snmpd.conf

Link to comment
  • 3 weeks later...

Hi guys,

 

What am I doing wrong?

 

I am using the turnkey version of observium. Initially I was getting the could not resolve tower error, but after adding the private IP manually in the hosts file, now I get this. I have verified that the observium VM is able to ping my unRAID server both by DNS and IP method, but yet observium is saying it cant ping it.

 

Is it because SNMP isn't running properly? How can I verify that SNMP is working fine? I tried starting the snmpd daemon again (./rc snmpd start), but still same results.

 

 

EDIT:Simple googling told me that I had to run the command "chmod +s /usr/bin/fping" if I wanted to add devices using the webGUI on a turnkey version of Observium....and this is something they wont fix as they dont recommend adding device through the webGUI...weird....

observium_ping.PNG.2268a7372130c68c5b108df41e05a20c.PNG

Link to comment
  • 3 months later...

Thanks again for this plugin, I love it. The one issue I'm still having is with disktemps polled through SNMP. It looks like it's going to work when I try via snmpwalk, but I get nothing. Running the drive_temps.sh manually works fine. Polling "sharefree" via snmpwalk works as expected and my .conf looks ok, so I'm stumped.

 

I'm stumped too. What do you get when you run this sequence?:

 

cat /tmp/plugins/snmp/drive_temps.txt
snmpwalk -v 2c localhost -c public 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp"'
cat /tmp/plugins/snmp/drive_temps.txt
/usr/local/emhttp/plugins/snmp/drive_temps.sh
cat /tmp/plugins/snmp/drive_temps.txt
snmpwalk -v 2c localhost -c public 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."disktemp"'
cat /tmp/plugins/snmp/drive_temps.txt

 

I'm wondering if there's an issue with the caching.

 

Another thought: There's a "sleep 15" in the drive_temps.sh script. I don't remember why. Maybe removing it would allow the script to run faster, solving the problem for you? Try it let me know what happens.

Link to comment
  • 2 weeks later...

Using both turnkey and docker versions of observium, I'm not getting the hard drive temps and share free metrics to show. I guess it's not seeing the mib?

 

Any tips? Or another dashboard to try?

 

Working great otherwise, although maybe the CPU and mb temps are the wrong way round? Mb temp follows the core temps more than CPU temp!

 

 

 

 

Sent from my iPhone using Tapatalk

Link to comment
  • 4 months later...

There seems to be a conflict between the version of perl used by this plugin and the version used by others, including Nerd Tools (perl-5.22.0-x86_64-2 vs perl-5.22.2-x86_64-1). Any chance of an update, please?

 

Nov 30 21:11:27 Mandaue root: plugin: installing: /boot/config/plugins/snmp.plg

Nov 30 21:11:27 Mandaue root: plugin: creating: /usr/local/emhttp/plugins/snmp/README.md - from INLINE content

Nov 30 21:11:27 Mandaue root: plugin: skipping: /boot/packages/perl-5.22.0-x86_64-2.txz already exists

Nov 30 21:11:27 Mandaue root: plugin: running: /boot/packages/perl-5.22.0-x86_64-2.txz

Nov 30 21:11:27 Mandaue root:

Nov 30 21:11:27 Mandaue root: +==============================================================================

Nov 30 21:11:27 Mandaue root: | Upgrading perl-5.22.2-x86_64-1 package using /boot/packages/perl-5.22.0-x86_64-2.txz

Nov 30 21:11:27 Mandaue root: +==============================================================================

Nov 30 21:11:27 Mandaue root:

Nov 30 21:11:27 Mandaue root: Pre-installing package perl-5.22.0-x86_64-2...

Nov 30 21:11:31 Mandaue root:

Nov 30 21:11:31 Mandaue root: Removing package /var/log/packages/perl-5.22.2-x86_64-1-upgraded-2016-11-30,21:11:27...

Nov 30 21:11:31 Mandaue root:  --> Deleting /usr/bin/perl5.22.2

Nov 30 21:11:31 Mandaue root:  --> Deleting /usr/doc/perl-5.22.2/AUTHORS

Nov 30 21:11:31 Mandaue root:  --> Deleting /usr/doc/perl-5.22.2/Artistic

 

...

 

EDIT: Nerd Tools was recently updated with perl-5.24.0-x86_64-1.txz so the version used by the plugin is a bit more out of date.

 

Link to comment
  • 2 months later...

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.