| Both sides previous revision Previous revision Next revision | Previous revision |
| doc:howto:snmp.server [2014/04/09 17:15] – Added note about 32 bit max counter in minisnmpd thenextdon13 | docs:guide-user:services:snmp:server [2023/10/14 06:15] (current) – formatting vgaetera |
|---|
| {{page>meta:infobox:construction&noheader&nofooter&noeditbtn}} | {{page>meta:infobox:construction&noheader&nofooter&noeditbtn}} |
| |
| There are two options. mini-snmpd or snmpd. | There are two options: mini-snmpd or snmpd. |
| |
| ===== How to install snmpd ===== | ===== How to install snmpd ===== |
| | <code bash> |
| opkg install snmpd | opkg install snmpd |
| | </code> |
| |
| Then Edit the /etc/config/snmpd file and finetune what you need. | Then Edit the /etc/config/snmpd file and finetune what you need. |
| More advanced configurations might need to edit the /etc/init.d/snmpd script and make the snmpd program to load another custom config | More advanced configurations might need to edit the snmpd init script and make the snmpd program to load another custom config. |
| | |
| | ===== Usage notes for snmpd ===== |
| | Basic information about WIFi 802.11 interfaces can be obtained using the OID 1.2.840.10036, the [[https://sourceforge.net/p/net-snmp/patches/_discuss/thread/35fa2f88/2b10/attachment/80211-MIB.txt|MIB file for this OID is available for download from sourceforge]]. |
| |
| ===== How to install mini-snmpd ===== | ===== How to install mini-snmpd ===== |
| | <code bash> |
| | opkg install mini_snmpd |
| | </code> |
| |
| opkg install mini-snmpd | **Note:** minisnmpd uses a 32 bit counter, which maxes out at 4294967295. |
| | This means any traffic over that does not appear on the counter, making it appear that you no longer have traffic. |
| **Note:** minisnmpd uses a 32 bit counter, which maxes out at 4294967295. This means any traffic over that does not appear on the counter, making it appear that you no longer have traffic. This is by design of minisnmpd. See [[https://dev.openwrt.org/ticket/13597|Bug Report]] and minisnmpd [[http://freecode.com/projects/minisnmpd|project page]] | This is by design of minisnmpd. |
| | See [[https://dev.openwrt.org/ticket/13597|Bug Report]] and minisnmpd [[http://freecode.com/projects/minisnmpd|project page]] |
| |
| ===== Basic configuration for mini-snmpd ===== | ===== Basic configuration for mini-snmpd ===== |
| |
| Open /etc/config/mini_snmpd and update the entries in the brackets to something that makes sense for you: | Open /etc/config/mini_snmpd and update the entries in the brackets to something that makes sense for you: |
| |
| <code> | <code bash> |
| config mini_snmpd | config mini_snmpd |
| option enabled 1 | option enabled 1 |
| option interfaces 'lo,br-lan,eth0.1,eth1' # Max 4 | option interfaces 'lo,br-lan,eth0.1,eth1' # Max 4 |
| </code> | </code> |
| |
| |
| ===== 64-bit counters issues ===== | ===== 64-bit counters issues ===== |
| |
| | {{:meta:icons:tango:48px-outdated.svg.png?nolink}} | As of [[https://dev.openwrt.org/changeset/25486|r25486]] this patch is in the tree. | | | {{:meta:icons:tango:48px-outdated.svg.png?nolink}} | As of [[https://dev.openwrt.org/changeset/25486|r25486]] this patch is in the tree. | |
| |
| Take a look at this post: | Take a look at the [[https://forum.openwrt.org/viewtopic.php?pid=127560#p127560|forum post]] ("64 bit counter support in SNMP (TL-WR1043ND)"), i.e. get the patch from [[https://dev.openwrt.org/ticket/8818|Ticket 8818]] ("Enable 64 bit counters in net-snmp"), build and reinstall the whole kernel/system (rebuild and opkg install the new snmp package didn't work). |
| https://forum.openwrt.org/viewtopic.php?pid=127560#p127560 | |
| I.e. Get patch from https://dev.openwrt.org/ticket/8818, build and reinstall the whole kernel/system (rebuild and opkg install the new snmp package didn't work). | |
| |
| ===== Usage with Cacti ===== | ===== Usage with Cacti ===== |
| | For some reason, Cacti doesn't like the system response that mini_snmpd gives (eg uptime, syslocation etc). |
| For some reason, Cacti doesn't like the system response that mini_snmpd gives (eg uptime, syslocation etc). In order to get your graphs correctly generated within Cacti, you need to change the way Cacti polls the OpenWRT system to see if it is up - on the device page within Cacti you should change the 'downed device detection' method to 'Ping' and the ping method to 'ICMP Ping'. This should then work :) | In order to get your graphs correctly generated within Cacti, you need to change the way Cacti polls the OpenWRT system to see if it is up - on the device page within Cacti you should change the 'downed device detection' method to 'Ping' and the ping method to 'ICMP Ping'. |
| | This should then work :) |
| |
| ===== Wireless signal and noise ===== | ===== Wireless signal and noise ===== |
| | Here is a small patch for mini_snmpd to support monitoring wireless signal and noise with Cacti. |
| Here is a small patch for mini_snmpd to support monitoring wireless signal and noise with Cacti. Here is the [[http://nottheoilrig.com/openwrt/201212090/wireless.patch|patch for mini_snmpd]] and here is a patch to [[http://patchwork.openwrt.org/patch/3061/|add it to OpenWrt]]. Here is a blog post about [[http://jdbates.blogspot.com/2012/12/heres-patch-for-mini-snmp-daemon-to.html|how to configure Cacti]] to make graphs from signal and noise data. | Here is the [[http://nottheoilrig.com/openwrt/201212090/wireless.patch|patch for mini_snmpd]] and here is a patch to [[http://patchwork.openwrt.org/patch/3061/|add it to OpenWrt]]. |
| | Here is a blog post about [[http://jdbates.blogspot.com/2012/12/heres-patch-for-mini-snmp-daemon-to.html|how to configure Cacti]] to make graphs from signal and noise data. |
| |
| The OIDs in the patch are chosen to work with the kbridge.xml SNMP query this is distributed with Cacti. | The OIDs in the patch are chosen to work with the kbridge.xml SNMP query this is distributed with Cacti. |
| |
| {{http://nottheoilrig.com/openwrt/201212090/index_files/graph_image_003.png|http://nottheoilrig.com/openwrt/201212090/}} | {{http://nottheoilrig.com/openwrt/201212090/index_files/graph_image_003.png|http://nottheoilrig.com/openwrt/201212090/}} |
| | |