toni-moreno / snmpcollector

A full featured Generic SNMP data collector with Web Administration Interface for InfluxDB
MIT License
286 stars 53 forks source link

Alternate OID Problem/Question #521

Closed wgvurob closed 1 year ago

wgvurob commented 1 year ago

Version .13 on Ubuntu 22.

Hello. I have a question about an SNMP v1 device where I had to set the Alternate OID to grab the System Info on this device. I set alternate ID "Test=.1.3.6.1.4.1.6827.50.24.2.1.0". It then allowed me to test properly.

However, for this device it will not pull four OIDs that I can successfully test. I have included the log snippet below for the four OIDs. I'm not sure I'm doing the Alternate OID piece correctly. Thank you.


time="2022-11-07 17:25:00" level=info msg="Init gather cycle mode" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="Not Oid CONDITIONEVAL metrics exist on this measurement" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="Not EVAL metrics exist on this measurement" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=warning msg="Warning METRIC ID [MC_RefLock] from MEASUREMENT[ MC 108 ] with TAGS [map[MC 108:MC 108]] has no valid data => See Metric Runtime [ &{cfg:0xc0005e4a20 Valid:false CookedValue: CurValue: LastValue: CurTime:0001-01-01 00:00:00 +0000 UTC LastTime:0001-01-01 00:00:00 +0000 UTC ElapsedTime:0 Compute:0x96d9a0 Scale:0x96d980 Convert:0x96d9c0 SetRawData:0x968c60 RealOID:.1.3.6.1.4.1.6827.50.25.2.2.0 Report:1 re: mm:[] expr: condflt: log:0xc0001ef3b0} ]" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=warning msg="Warning METRIC ID [MC_GPSSats] from MEASUREMENT[ MC 108 ] with TAGS [map[MC 108:MC 108]] has no valid data => See Metric Runtime [ &{cfg:0xc0005e4bd0 Valid:false CookedValue: CurValue: LastValue: CurTime:0001-01-01 00:00:00 +0000 UTC LastTime:0001-01-01 00:00:00 +0000 UTC ElapsedTime:0 Compute: Scale:0x96d980 Convert:0x96da20 SetRawData:0x96ae40 RealOID:.1.3.6.1.4.1.6827.50.25.4.2.0 Report:1 re: mm:[] expr: condflt: log:0xc0001ef3b0} ]" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=warning msg="Warning METRIC ID [MC_GPSHealth] from MEASUREMENT[ MC 108 ] with TAGS [map[MC 108:MC 108]] has no valid data => See Metric Runtime [ &{cfg:0xc0005e4b40 Valid:false CookedValue: CurValue: LastValue: CurTime:0001-01-01 00:00:00 +0000 UTC LastTime:0001-01-01 00:00:00 +0000 UTC ElapsedTime:0 Compute: Scale:0x96d980 Convert:0x96da20 SetRawData:0x96ae40 RealOID:.1.3.6.1.4.1.6827.50.25.4.1.0 Report:1 re: mm:[] expr: condflt: log:0xc0001ef3b0} ]" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=warning msg="Warning METRIC ID [MC_RefFreq] from MEASUREMENT[ MC 108 ] with TAGS [map[MC 108:MC 108]] has no valid data => See Metric Runtime [ &{cfg:0xc0005e4ab0 Valid:false CookedValue: CurValue: LastValue: CurTime:0001-01-01 00:00:00 +0000 UTC LastTime:0001-01-01 00:00:00 +0000 UTC ElapsedTime:0 Compute: Scale:0x96d980 Convert:0x96da20 SetRawData:0x96ae40 RealOID:.1.3.6.1.4.1.6827.50.25.2.3.0 Report:1 re: mm:[] expr: condflt: log:0xc0001ef3b0} ]" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=warning msg="error in influx point building:point without fields is unsupported" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=error msg="Device not connected" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="[measurement] STATS SEND NOT CONNECTED" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="MeasurementLoop new Iteration" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="First SNMP connection stablished with MaxRepetitions set to 50" device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="Detected alternate 1 SystemOID's " device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="Got basic system info snmp.SysInfo{SysDescr:\"Test = 5600MSC\", SysUptime:0, SysContact:\"\", SysName:\"\", SysLocation:\"\"} " device=10.61.143.108 measurement="MC 108" time="2022-11-07 17:25:00" level=info msg="[device] STATS SNMP GET: snmp polling took [0.013051 seconds] SNMP: Gets [0] , Processed [0], Errors [0]" time="2022-11-07 17:25:00" level=info msg="[device] STATS SNMP FILTER: filter polling took [0.000000 seconds] " time="2022-11-07 17:25:00" level=info msg="[device] STATS INFLUX: influx send took [0.000003 seconds]"

sbengo commented 1 year ago

Hi @wgvurob ,

The alternate SysOID is being recognized and polled OK. Once the SysOID answers, the measurement is marked as initialized and it starts the gather loop, trying to retrieve all the attached metrics. If no metrics are retrieved or some problem happens during the process, the SNMPCollector retries the SysOID connection again to validate that there is no connectivity problem and starts the loop again on the next period.

In your case, as it is shown on the logs, the SysDescr is filled with your OID response.

time="2022-11-07 17:25:00" level=info msg="Got basic system info snmp.SysInfo{SysDescr:"Test = 5600MSC", SysUptime:0, SysContact:"", SysName:"", SysLocation:""} " device=10.61.143.108 measurement="MC 108"

The problem seems related with the measurement/metrics definition. The metrics don't contain any data, and it can be related with some polling/processing errors.

I have not enough information with the logs that you have provided to find the problem and to propose a fix/solution so, I would ask you to:

Thanks, Regards!

sbengo commented 1 year ago

Closing this issue Feel free to re-open it with asked info if your problem persists

Thanks, Regards!