3. Collect Data from A ZenCommand

To collect and display some data from the ZenCommand example above, you can log the data to see something like response time in a graphical format.

  1. Go to the /Web/Device template.

  2. Go to the Data Source you created in the check_http example above.

  3. At the bottom there is a table of Data Points add one called “responseTime”

  4. The default type of GAUGE is fine so there is no need to modify the Data Point.

  5. Test your command again and you should see a log message that starts with:

    DEBUG:zen.zencommand:storing responseTime = 1.0
  6. Make a graph to display your data. In the Device template, create a graph called “Web Response Time”.

  7. For this graph, set the following values:

    • Data Sources = rootWebCheck_responseTime

    • Units = Seconds

    • Min Y = 0

  8. Now look at the Perf tab for the device www.website.com (whatever website you were using to check) to see the graph. Graph data won’t show up until collection as run several times. Restart zencommand so that the new configuration will take place immediately.