Sometimes you want to jam data from OpenTSDB into R, so you can do neat things like parameterize it by time. Well, I wrote an R function that does just that!
Here’s a usage example:
read.opentsdb("http://localhost:44242",
metrics=c("sum:dummy.linear","sum:dummy.random.unif{blah=*}"),
start="4h-ago")
I considered turning this into a CRAN package, but then I was like “naw.” There’s not very much to it, and writing CRAN packages seems like a big pain. Correct me if I’m wrong.
Anyway, enjoy!
Sorry, but where must i put the read_opentsdb.r file to make work? I’m new to R but i don’t understand how work with .r files
I solved, but I have this error now:
If i write
> read.opentsdb(“http://127.0.0.1:4242”, metrics=c(“value.metrics{sensor=*}), start=”4h-ago”)
I get this error:
Errore: unexpected numeric constant in “read.opentsdb(“http://127.0.0.1:4242”, metrics=c(“value.metrics{sensor=*}), start=”4”
What’s wrong? 🙂
Now i’ve solved also this problem, but when i put my command on the command line
read.opentsdb(“http://127.0.0.1:4242”, metrics=c(“value.metrics{sensor=*}”), start=”2013/01/20-12:00:00″)
Nothing seems to open, i don’t understand why
I’ve found one more: https://github.com/holstius/opentsdbr