Hello Members,
I have seen and used the accum command, but it does not quite give me what I want.
I have this search below which gives me a line chart with event count over the time range:
index=main sourcetype=cisco:asa host=* message_id=113004
| eval Date=strftime(_time, "%Y-%m-%d %H:%M:%S")
| timechart count BY message_id
The graph type can be any type. I would like to get an accumulated total for a time period, like 24 hours, OK to count every hour, but show the accumulated count each hour, with the ending total for the time range, i.e. 24hr.
Thanks for greate source of help here,
eholz1
The command you are looking for is streamstats. If you have a single series, you can do
| timechart count
| steamstats sum(count) as cumulative
But your OP suggests that you have multiple series. For that, you can do something like
index=main sourcetype=cisco:asa host=* message_id=113004
| timechart count BY message_id
| streamstats sum(*) as *-cumulative by message_id
This produces two extraneous series "*" and "*-cumulative". I don't know how to remove them. If you have a limited number of message values, you can do
index=main sourcetype=cisco:asa host=* message_id=113004
| timechart count BY message_id
| streamstats sum(msg_id1) as msg_id1-cumulative sum(msg_id2) as msg_id2 ... by message_id
Not sure what the real requirement is. Do you mean a 24-hour chart like this?
I.e., a group of varying line charts and a group of horizontal lines representing their period total? For this, you can do something like
index=main sourcetype=cisco:asa host=* message_id=113004
| timechart count BY message_id
| eventstats sum(*) as *-Total
Thank you very much for the reply. I will try the search you suggest. Here is a screen shot of one result, which shows the number of events over time. But, starting from left of chart, instead of seeing values like: 7, 12,13,12,9 - I would like to see 7,19,32,41, etc.
Thanks Again, will check your suggestion, and get back
The command you are looking for is streamstats. If you have a single series, you can do
| timechart count
| steamstats sum(count) as cumulative
But your OP suggests that you have multiple series. For that, you can do something like
index=main sourcetype=cisco:asa host=* message_id=113004
| timechart count BY message_id
| streamstats sum(*) as *-cumulative by message_id
This produces two extraneous series "*" and "*-cumulative". I don't know how to remove them. If you have a limited number of message values, you can do
index=main sourcetype=cisco:asa host=* message_id=113004
| timechart count BY message_id
| streamstats sum(msg_id1) as msg_id1-cumulative sum(msg_id2) as msg_id2 ... by message_id
Hello, and Thank you
This is what I need. Again I thank you for the information.
Eholz1