Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Josh_Dillig
Participant

Extending SNMP - how to change STRING to GAUGE

We are experimenting with using userDefinedSettings.conf settings to SNMP query the gateway for custom statistics and statuses. We have run into an issue where the returned data needs to be formatted as a GAUGE not the default STRING. Any idea how to do this?

 

UserDefinedSettings.conf:

[Expert@gateway:0]# cat /etc/snmp/userDefinedSettings.conf
extend .1.3.6.1.4.1.8072.35 fwhc /home/admin/fw_health_check.sh snmp checkScore

 

Script Output:

[Expert@gateway:0]# /home/admin/fw_health_check.sh snmp checkScore
8

SNMPWALK output:

[Expert@gateway:0]# snmpwalk -v2c -c public localhost .1.3.6.1.4.1.8072.35
NET-SNMP-MIB::netSnmp.35.1.0 = INTEGER: 1
NET-SNMP-MIB::netSnmp.35.2.1.2.4.102.119.104.99 = STRING: "/home/admin/fw_health_check.sh"
NET-SNMP-MIB::netSnmp.35.2.1.3.4.102.119.104.99 = STRING: "snmp checkScore"
NET-SNMP-MIB::netSnmp.35.2.1.4.4.102.119.104.99 = ""
NET-SNMP-MIB::netSnmp.35.2.1.5.4.102.119.104.99 = INTEGER: 5
NET-SNMP-MIB::netSnmp.35.2.1.6.4.102.119.104.99 = INTEGER: 1
NET-SNMP-MIB::netSnmp.35.2.1.7.4.102.119.104.99 = INTEGER: 1
NET-SNMP-MIB::netSnmp.35.2.1.20.4.102.119.104.99 = INTEGER: 4
NET-SNMP-MIB::netSnmp.35.2.1.21.4.102.119.104.99 = INTEGER: 1
NET-SNMP-MIB::netSnmp.35.3.1.1.4.102.119.104.99 = STRING: "8"
NET-SNMP-MIB::netSnmp.35.3.1.2.4.102.119.104.99 = STRING: "8"
NET-SNMP-MIB::netSnmp.35.3.1.3.4.102.119.104.99 = INTEGER: 1
NET-SNMP-MIB::netSnmp.35.3.1.4.4.102.119.104.99 = INTEGER: 0
NET-SNMP-MIB::netSnmp.35.4.1.2.4.102.119.104.99.1 = STRING: "8"   <--- Output

 

CCMA
2 Replies
Diego_Barba
Contributor

Hi! I have the same problem, anybody found how to configure the new OID as GAUGE or INTEGER?

0 Kudos
Tobias_Moritz
Advisor

Because this is not Check Point specific but standard NetSNMP, I suggest looking at Manpage of SNMPD.CONF and try to make use of the pass directive instead of the extend one.

I haven't tried this myself, so I cannot tell you if this works on Check Points version of NetSNMP, but it should because Gaia Hardening Specification says they used the NetSNMP RPM from RHEL 7.4/7.6 distribution and only added SHA-256 and SHA-512 support for USM users.

Maybe you can share your results here.