OPNsense Forum

English Forums => Development and Code Review => Topic started by: Zeitkind on February 24, 2016, 08:17:38 pm

Title: SNMP
Post by: Zeitkind on February 24, 2016, 08:17:38 pm
Hi,
fyi: there are still some remnant of pfsense left in snmp stuff. I see things like "pfSense Packet Disposition", "pfSense State Table Entries", "pfSense State Table Operations", "pfSense Source Node Count" and "pfSense Source Node Operations" when collecting data with openNSM. I guess noone used it? ^^
Title: Re: SNMP
Post by: AdSchellevis on February 25, 2016, 08:46:35 am
Hi Zeitkind,

Which version are you using?
The SNMP code is still up for a refresh (before 16.7), but I can't find the text your mentioning in the current version.

Regards,

Ad
Title: Re: SNMP
Post by: Zeitkind on February 25, 2016, 07:32:39 pm
Versions    OPNsense 16.1.3-i386
FreeBSD 10.2-RELEASE-p12
OpenSSL 1.0.2f 28 Jan 2016

Some screenshots:
(http://www.mein-zeugs.de/pub/opnsense/b1.png)
(http://www.mein-zeugs.de/pub/opnsense/b2.png)
(http://www.mein-zeugs.de/pub/opnsense/b3.png)
(http://www.mein-zeugs.de/pub/opnsense/b4.png)
Title: Re: SNMP
Post by: Zeitkind on February 25, 2016, 08:00:21 pm
Just switched to devel, the same with OPNsense 16.7.a_328-i386
Title: Re: SNMP
Post by: AdSchellevis on February 25, 2016, 08:12:20 pm
Was this previously a pfSense config?
Can you check if the product name is in /var/etc/snmpd.conf?
Title: Re: SNMP
Post by: Zeitkind on February 25, 2016, 08:27:21 pm
Looks normal:

root@firewall:/ # cat /var/etc/snmpd.conf
location := "xxxx"
contact := "xx"
read := "xxx"
# SNMP Trap support.
traphost := 192.168.x.y
trapport := 162
trap := "mytrap"

system := 1
%snmpd
sysDescr      = "OPNsense (hostname) 16.1.3-cbe0cef57 OPNsense FreeBSD 10.2-RELEASE-p12 i386"
[..]

Contains the stuff I defined via GUI (location, trap server etc.)
Didn't update the version string in sysDesc after switching to devel - bug?
Title: Re: SNMP
Post by: AdSchellevis on February 25, 2016, 08:30:59 pm
strange, do you know how I can query the same on a machine at my end? (snmpwalk/get command?)
To update the sysDescr you probably have to restart the service.
Title: Re: SNMP
Post by: Zeitkind on February 25, 2016, 11:03:48 pm
I looked at the source code of my openNMS page. A variable came up called "pfSense.disposition" - which led to the source of openNMS
https://github.com/opennms-config-modules/pfsense/blob/master/graphs/pfsense.graph.properties

Seems like openNMS somehow guesses that my host is a pfsense firewall and therefor uses this graphing modul. Have no idea how or why, there must be some kind of match to trigger it.
Title: Re: SNMP
Post by: AdSchellevis on February 26, 2016, 09:18:06 am
Yes, it's part of your openNMS plugin, if you want to change it, you have to do it in their plugin :)
Title: Re: SNMP
Post by: Zeitkind on February 26, 2016, 12:39:24 pm
I still wonder how openNMS guesses that this host is a pfsense firewall. I only told openNMS to scan this host and it automatically took the pfsense plugin for that.
Title: Re: SNMP
Post by: franco on February 27, 2016, 05:16:21 pm
Maybe the box's MIB is recognised as such--we've made no adjustments in that area so it it looks the same over SNMP.
Title: Re: SNMP
Post by: Zeitkind on February 28, 2016, 11:31:56 am
Yeah, must be some kind of predefined good guess. I don't care much if my firewalls show up as a pfsenses, prob. someone makes an openNMS module for opnsense one day. I'm not a real expert in SNMP.. :/