Search code examples
graphite

Graph a timer based on counts


I am sending timer metrics to Graphite and would like to create a graph of the counts based on the times buts I cannot do it or a line graph that is based on the value. Tried playing with Graphite web app but no luck.

Example metrics timer1 200 timer1 300 timer1 200


Solution

  • I'm trying to understand what you want. Given the following data logged in [metric] [data] [timestamp] format

    timer1 200 1s
    timer1 300 50s
    timer1 200 100s
    

    (I know my timestamps are fake non-posix times, just trying to keep it simple)

    Would you like to see something like

    (A) timer1's values summed by minute, so the (x, y) coordinates (0, 500) and (1, 200)

    (B) timer1's values summing up continuously over time like a counter, so the (x, y) coordinates (0, 200), (50, 500), (100, 700)

    For (A):

    summarize(timer1, "1min")
    

    For (B):

    integral(timer1)
    

    You can apply functions to your data in the graphite webapp by putting the raw series data in a graph, then click Graph Data -> select your series -> Apply Function

    Also read over the documentation for different functions