SNMP - Port Status
-
Hi everyone,
Recently we start to monitorizing all our custumers infrastructure (and our own as well) over snmp and syslog.
We use a couple of tools, and integrate them wich others. We use Zabbix (snmpv2/v3 and trap), Graylog (syslog) and for dashboard representation, Grafana.Question: I use a pfsense network template with network interface discovery rules, and that item rule get a lot of traffic information, but not get a port/interface status (up/down).
Can anyone tell me how can i get interface status over snmp, from pfsense to zabbix?
I appreciate your help!
BR
Marco Aurélio Costa
-
There are zabbix packages for pfsense - are you using those?
-
Hi johnpoz,
Yes, i use zabbix agent for pfsense in active mode configuration.
-
You should be able to get the info via a snmpwalk down the .iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable ( .1.3.6.1.2.1.2.2 ) tree.
-
Probably i need to create an iten manually (on zabbix server side) with properly pfsense if-status OID... but i don't now if pfsense MIB store this object.
I manipulate the items on zabbix server side with "no data" formulas etc. But the up/down status it would be important.BR
Marco Aurélio Costa
-
@Marco-Aurelio-Costa said in SNMP - Port Status:
Probably i need to create an iten manually (on zabbix server side) with properly pfsense if-status OID... but i don't now if pfsense MIB store this object.
I manipulate the items on zabbix server side with "no data" formulas etc. But the up/down status it would be important.BR
Marco Aurélio Costa
Getif:-
http://www.wtcs.org/snmp4tpc/getif.htm
The info your after is part of a standard MIB.
.1.3.6.1.2.1.2.2.1.2 = interface names
mac-pro:~ andy$ snmpwalk -v 2c -c XXXXXXX 172.16.0.1 .1.3.6.1.2.1.2.2.1.2
IF-MIB::ifDescr.1 = STRING: igb0
IF-MIB::ifDescr.2 = STRING: igb1
IF-MIB::ifDescr.3 = STRING: igb2
IF-MIB::ifDescr.4 = STRING: igb3
IF-MIB::ifDescr.5 = STRING: igb4
IF-MIB::ifDescr.6 = STRING: igb5
IF-MIB::ifDescr.7 = STRING: enc0
IF-MIB::ifDescr.8 = STRING: lo0
IF-MIB::ifDescr.9 = STRING: pflog0
IF-MIB::ifDescr.10 = STRING: pfsync0
IF-MIB::ifDescr.11 = STRING: igb0.2
IF-MIB::ifDescr.12 = STRING: igb0.3
IF-MIB::ifDescr.13 = STRING: igb0.4
IF-MIB::ifDescr.14 = STRING: igb0.5
IF-MIB::ifDescr.15 = STRING: igb0.6
IF-MIB::ifDescr.16 = STRING: igb0.7
IF-MIB::ifDescr.17 = STRING: igb0.9
IF-MIB::ifDescr.18 = STRING: igb0.11
IF-MIB::ifDescr.19 = STRING: pppoe0
IF-MIB::ifDescr.20 = STRING: ovpnc1
IF-MIB::ifDescr.21 = STRING: ovpnc2
IF-MIB::ifDescr.22 = STRING: ovpnc3mac-pro:~ andy$ snmpwalk -v 2c -c XXXXXXX 172.16.0.1 .1.3.6.1.2.1.2.2.1.7
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = INTEGER: down(2)
IF-MIB::ifAdminStatus.4 = INTEGER: down(2)
IF-MIB::ifAdminStatus.5 = INTEGER: down(2)
IF-MIB::ifAdminStatus.6 = INTEGER: down(2)
IF-MIB::ifAdminStatus.7 = INTEGER: up(1)
IF-MIB::ifAdminStatus.8 = INTEGER: up(1)
IF-MIB::ifAdminStatus.9 = INTEGER: down(2)
IF-MIB::ifAdminStatus.10 = INTEGER: down(2)
IF-MIB::ifAdminStatus.11 = INTEGER: up(1)
IF-MIB::ifAdminStatus.12 = INTEGER: up(1)
IF-MIB::ifAdminStatus.13 = INTEGER: up(1)
IF-MIB::ifAdminStatus.14 = INTEGER: up(1)
IF-MIB::ifAdminStatus.15 = INTEGER: up(1)
IF-MIB::ifAdminStatus.16 = INTEGER: up(1)
IF-MIB::ifAdminStatus.17 = INTEGER: up(1)
IF-MIB::ifAdminStatus.18 = INTEGER: up(1)
IF-MIB::ifAdminStatus.19 = INTEGER: up(1)
IF-MIB::ifAdminStatus.20 = INTEGER: up(1)
IF-MIB::ifAdminStatus.21 = INTEGER: up(1)
IF-MIB::ifAdminStatus.22 = INTEGER: up(1)mac-pro:~ andy$ snmpwalk -v 2c -c XXXXXXX 172.16.0.1 .1.3.6.1.2.1.2.2.1.8
IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifOperStatus.2 = INTEGER: up(1)
IF-MIB::ifOperStatus.3 = INTEGER: down(2)
IF-MIB::ifOperStatus.4 = INTEGER: down(2)
IF-MIB::ifOperStatus.5 = INTEGER: down(2)
IF-MIB::ifOperStatus.6 = INTEGER: down(2)
IF-MIB::ifOperStatus.7 = INTEGER: dormant(5)
IF-MIB::ifOperStatus.8 = INTEGER: dormant(5)
IF-MIB::ifOperStatus.9 = INTEGER: down(2)
IF-MIB::ifOperStatus.10 = INTEGER: down(2)
IF-MIB::ifOperStatus.11 = INTEGER: up(1)
IF-MIB::ifOperStatus.12 = INTEGER: up(1)
IF-MIB::ifOperStatus.13 = INTEGER: up(1)
IF-MIB::ifOperStatus.14 = INTEGER: up(1)
IF-MIB::ifOperStatus.15 = INTEGER: up(1)
IF-MIB::ifOperStatus.16 = INTEGER: up(1)
IF-MIB::ifOperStatus.17 = INTEGER: up(1)
IF-MIB::ifOperStatus.18 = INTEGER: up(1)
IF-MIB::ifOperStatus.19 = INTEGER: dormant(5)
IF-MIB::ifOperStatus.20 = INTEGER: up(1)
IF-MIB::ifOperStatus.21 = INTEGER: up(1)
IF-MIB::ifOperStatus.22 = INTEGER: up(1) -
NogBadTheBad ,
Thanks for your update.
I think that in my scenário is a bit different.
I have the Zabbix agent (active mode) installed in my pfsense (port 10050) which sending data to the zabbix server. I think I need to run snmp daemon in my FreeBSD pfsense, and then Zabbix can get the objects (over snmp query).A possible solution is to install zabbix proxy on my pfsense (run snmp daemon, zabbix proxy get the objects and sent to zabbix server), or enable snmp in pfsense, opens snmp ports to the public network (i try to avoid it).
Any thoughts?
-
Hi everyone again,
I read some documentation about zabbix and their different configurations.
In my scenario, i have Zabbix Agent active configuratio, i use the comunication with Zabbix agent for data gathering - a bit different of SNMP agent.Zabbix agent has a supported item keys supported by platform:
https://www.zabbix.com/documentation/4.0/manual/appendix/items/supported_by_platform
Actualy, have no item theht return "port status" value Up/Down on that configuration.I also saw another way when I edit the "User Parameters" at zabbix_agentd:(https://stackoverflow.com/questions/17716431/how-to-monitor-network-card-link-link-status-in-zabbix) but without success.
Anyway, if someone have another idea, i will really appreciate.
BR
Marco Aurélio Costa