SNMP daily reset
-
Hi all,
I am SNMP querying the if stats for octets in and out. I am being lazy and wanting to reset the values on the PFSense side so that I can get transfers that day.
I am using OID:
1.3.6.1.2.1.2.2.1.10.X
1.3.6.1.2.1.2.2.1.16.XIs there an easy way to set a corn to clear the SNMP counter at midnight it a different OID for the daily value?
-
I have been looking further as I have found the counter32 is wrapping too much.
I then found:I have found:
.1.3.6.1.4.1.12325.1.200.1.8.2.1.7Thankfully this is couter64 but I am looking for the daily amount. Does anyone know the right OID?
-
@jonb said in SNMP daily reset:
I have been looking further as I have found the counter32 is wrapping too much.
I then found:I have found:
.1.3.6.1.4.1.12325.1.200.1.8.2.1.7Thankfully this is couter64 but I am looking for the daily amount. Does anyone know the right OID?
snmpdelta maybe or install Status_Traffic_Totals.
I run the following script from Email Reports to email me the daily interface stats:-
[21.05.1-RELEASE][admin@pfsense]/root/scripts: more vnstat-daily #!/bin/csh foreach int ( pppoe0 igb0.2 igb0.3 igb0.4 igb0.5 igb0.6 igb0.7 igb0.9 igb0.11 enc0 ) echo /usr/local/bin/vnstat -i $int -d 1 echo
-
@jonb said in SNMP daily reset:
I have been looking further as I have found the counter32 is wrapping too much.
I then found:I have found:
.1.3.6.1.4.1.12325.1.200.1.8.2.1.7Thankfully this is couter64 but I am looking for the daily amount. Does anyone know the right OID?
There isn't an OID for "daily" stats in SNMP -- that's a function of your NMS. Normally an NMS would poll the data from SNMP and store it over time and then you query the NMS database for a report that gives you daily totals.
-
@jimp thank you I thought that might of been the case. The tool I am using isn't a proper network management it was more informational on home automation.