toni-moreno / snmpcollector

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

[Question] Filtering Requests #519

Closed fgeueke closed 2 years ago

fgeueke commented 2 years ago

Hello.

First off, thanks for providing such an excellent product. I have a question about filtering. I'm using SnmpCollector to poll multiple interface OID's - probably all belonging to ifTable. The devices I'm polling have thousands of interfaces and I'm only interested in collecting stats for possibly 10-20 of them. I was able to create OID Conditions and Measurement Filters to limit the measurements I'm storing appropriately. However, it seems this has no effect on the number of requests being sent or responses received. Is this the expectation or am I doing something wrong?

Testing with a single device for instance with considerably less interfaces...

I have the following with no measurement filter applied:

OID Gets ALL 7513 OID Processed 7513

After I apply my measurement filter I have:

OID Gets ALL 7513 OID Processed 229

In retrospect it seems naive, but I would expect something like:

OID Gets ALL 229 OID Processed 229

I'm using tonimoreno/snmpcollector:latest (0.13.0) from docker hub. Thanks very much.

-Frank

toni-moreno commented 2 years ago

Hello @fgeueke , sorry for the late reply.

As you could see OID data could be organized and stored on SNMP based devices as tables ( indexed measurements on snmpcollector) , unfortunately SNMP protocol doesn't support filtering clauses as by example SQL do ( SELECT * from Table WHERE XXXX and YYYY and ZZZZZ ) . In any SNMPWALK query you will get all registries in the "column" of the table.

The only way to filter data via SNMP ( when you query big tables) is gathering all data first and filtering after, and snmpcollector helps to define and simplify this process for you.

Althought SNMP is an industry standard protocol for any hardware device , there is some limitations on how to use it and this is one of the most limiting features when querying SNMP data