Kapacitor Alert report

Is there any way to get data for all alert in specific measurement with start and end time in excel sheet, i do store alertdata with influxDBOut() in a database.

Hi @Amit_Kumar_Singh ,

does it help if you can get the data out of the database in csv format and then
load the data in excell ?

$ influx -database telegraf -execute 'select * from cpu limit 5' -format csv
name,time,cpu,host,usage_idle
cpu,1556477210000000000,cpu-total,influxserver.com,46.88457609873701
cpu,1556477210000000000,cpu0,influxserver.com,46.60493827138684
cpu,1556477210000000000,cpu1,influxserver.com,47.058823529064504
cpu,1556477220000000000,cpu-total,influxserver.com,84.4195519344611
cpu,1556477220000000000,cpu0,influxserver.com,83.40163934432584

this is what i had in my mind, but the requirement was to give the start time and end time in a single row, and is there any way to print time not in epoch form instead in human readable form.

yes it is possible :slight_smile:

$ influx -database telegraf -execute 'select * from cpu limit 5' -format csv -precision rfc3339
name,time,cpu,host,usage_idle
cpu,2019-04-28T18:46:50Z,cpu-total,influxserver.com,46.88457609873701
cpu,2019-04-28T18:46:50Z,cpu0,influxserver.com,46.60493827138684
cpu,2019-04-28T18:46:50Z,cpu1,influxserver.com,47.058823529064504
cpu,2019-04-28T18:47:00Z,cpu-total,influxserver.com,84.4195519344611
cpu,2019-04-28T18:47:00Z,cpu0,influxserver.com,83.40163934432584

Thnks i was able to use alert measurement and get a basic data like below.

Now i need something very it can calculate total time when it goes to alert state and comes back to informational.