Hello everyone.
I want to make a statistic of tickets. How many are opend everyday by CI Name. And I wnat to add an AVG of Tickets opened over all days.
CI Name | 2021-01-20 | 2021-01-20 | 2021-01-20 | AVG |
Test 1 | 5 | 1 | 1 | 2,3 |
Test 2 | 3 | 3 | 3 | 3 |
Thats my current search:
index=prod_test
| dedup dv_number
| eval openday=strftime(strptime(opened_at, "%Y-%m-%d %H:%M:%S"), "%Y-%m-%d")
| chart count(dv_number) as anzahl by dv_cmdb_ci openday
| sort anzahl desc
Here's one possibility using timechart, appendpipe, and transpose:
index=prod_test
| timechart limit=0 span=1d useother=f count by dv_number
| eval _time=strftime(_time, "%F")
| appendpipe [ | stats avg(*) as * | eval _time="AVG" ]
| transpose 0 column_name="dv_number" header_field="_time"