Dear colleagues:
I am using Telegraf to poll (SNMP plugin) network devices and put the information in InfluxDB (version 1.7.9)
One network device has been turned off since quite a long time. In this case, Telegraf has been polling the device and since no answer comes back, I suspect no data is being stored in InfluxDB.
The following two queries ask InfluxDB to return the data regarding that network device.
The first query is in a timerange that starts in a date in which I know the device was working, whereas the second query has a timerange that starts 2 days later, when the device died.
Please kindly notice that I ask InfluxDB to fill with value “1” those days with no data.
The first query returns data even for the days in which the device was not operational (expected, since I asked to fill with “1”) whereas the second query comes back empty.
SELECT count(“snmpEngineTime.0”) FROM “system” WHERE “snmpEngineTime.0”>10 AND “hostname”=‘SW-AR-PL-ZRT-027’ AND time>now() -75d AND time < now()-70d GROUP BY time(24h) fill(1)
name: system
time count
2024-03-27T00:00:00Z 27
2024-03-28T00:00:00Z 95
2024-03-29T00:00:00Z 1
2024-03-30T00:00:00Z 1
2024-03-31T00:00:00Z 1
2024-04-01T00:00:00Z 1
SELECT count(“snmpEngineTime.0”) FROM “system” WHERE “snmpEngineTime.0”>10 AND “hostname”=‘SW-AR-PL-ZRT-027’ AND time>now() -73d AND time < now()-70d GROUP BY time(24h) fill(1)
(EMPTY RESULT. ONLY THE SYSTEM PROMPT!!)
It seems to be that if there is no data in the entire timerange, then the result is empty.
¿ is this a normal and/or expected behavior for the answer to my query?
Hints will be greatly appreciated
Best regards
Rogelio