0
votes

I have got a requirement to fetch and store response time and count of different 2xx,4xx and 5xx request from access logs to influxdb.(for graphing and alerting purpose).

I know I can use telegraf to parse logs file and keep sending data to influxdb. And get these counts from running query on the data.

[1, 2 ]

But in this way, I will be sending a lot of datapoints to the influxbd server.

What I am trying to find is, if there is any way, I can only send processed data to influxdb, like no of req/sec, no of 2xx/4xx/5xx req/sec.

I have been reading on various threads and blogs, but couldn't find anything matching.

Anyhelp would be appreciated. Thanks.

1

1 Answers

0
votes

"c:\Program Files (x86)\Log Parser 2.2\LogParser.exe"

SELECT sc-status, COUNT(*) FROM [logfile] 
GROUP BY sc-status

you can add the math on select statement to calculate /sec responses.