Skip to content

Instantly share code, notes, and snippets.

View tgh0831's full-sized avatar

Thomas Higginbotham tgh0831

  • San Antonio, TX
View GitHub Profile
@tgh0831
tgh0831 / read_opentsdb.r
Created February 22, 2017 21:02 — forked from danslimmon/read_opentsdb.r
Reads data from OpenTSDB into an R data frame.
# Loads data from OpenTSDB.
#
# `server.url`: The URL of the OpenTSDB server (e.g. 'http://tsdb.example.com')
# `metrics`: List of strings specifying the metrics to pull (e.g.
# c("avg:web.cpu.user{host=*}", "sum:web.requests{type=login}")
# )
# `start.dt`: How far to go back in the time series, in any format OpenTSDB
# (e.g. "4h-ago")
# `end.dt`: Where to end the results (defaults to now)
# `datify`: Whether to convert timestamps to POSIXlt objects (defaults to TRUE)