Using timechart to show values over time

The timechart option lets us show numerical values over time. It is similar to the chart command, except that time is always plotted on the x axis. Here are a couple of things to note:

Let's see how many errors have been occurring:

sourcetype="tm1*" error | timechart count

The default chart will look something like this:

Now let's see how many errors have occurred per weekday over the same time period.

We simply need to add by user to the query:

sourcetype="tm1*" error | timechart count by date_wday

This produces the following chart:

As we stated earlier, the x axis is always time. The y axis can be:

sourcetype="tm1*" error | timechart count as "Error Count" count(sourcetype) as "Source Count"

This would produce a graph as follows: