Skip to content

Instantly share code, notes, and snippets.

View indigo423's full-sized avatar
🇩🇪
Hack the planet!

Ronny Trommer indigo423

🇩🇪
Hack the planet!
View GitHub Profile
@danslimmon
danslimmon / read_opentsdb.r
Last active February 22, 2017 21:02
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)