Graphing Numerical Data

[obsolete]

Here's another reason to start logging with JSON data.

It's possible to graph numeric values from your JSON data results. Provide us with the keys of the values you want to plot and a search query. The x-axis uses the Loggly time stamp and the y-axis uses the numeric value of the specified JSON field.

We default to spline graphs, but give you the following choices after your graph has rendered:

  • line
  • scatter
  • spline
  • area spline
  • area

The syntax for json graphing is:

  > graphjson <json.key_1>,<json.key_2>,...,<json.key_n> <query>

For example, imagine this is one of your json blobs:

  {
   "blue":100,
   "person":65,
   "red":31,
   "green":57,
   "like":"V-TkQjV0IPIRHdLGrc6s",
   "literally":"O8AjJHFVmcZGMrmPz00G",
   "yellow":22,
   "dude":"NjdUU2SLjhQH5il8gw1o",
   "whatever":"a1BjQJEKJApAGimHINgW",
   "user":25
  }

The following command will plot points for json.blue, json.red and json.green where json.yellow is equal to 22.

  > graphjson json.blue, json.red, json.green json.yellow:22 

 

Things to note

  • The order of your json keys matter. Plots for the keys on the left side of your value list will be behind the plots for keys on the right hand side of the list, this could be significant when plotting area or area spline graphs.
  • Click on any of the points in your graph to display specific events.
  • We parse your json blob and ignore values that are not numbers, so if you have json variables that are sometimes numbers and sometimes not we will only graph the cases where that key is a numeric value.
  • The maximum number of points we can render per json key is 600.

 

Troubleshooting/protips

  • There is a limit of 600 events that can be graphed
  • This function doesn’t show 0’s for non-matching events, but the non-matching events do count toward the 600-event limit
  • If the graph only displays a partial period of your date range, add filters to your query
  • Use the “Inputs” drop down filter to include only JSON inputs you want graphed

 

Top