opentsdb / opentsdbr Goto Github PK
View Code? Open in Web Editor NEWPull data from OpenTSDB into R
Pull data from OpenTSDB into R
___ _____ ____ ____ ____ / _ \ _ __ ___ _ _|_ _/ ___|| _ \| __ ) | | | | '_ \ / _ \ '_ \| | \___ \| | | | _ \ | |_| | |_) | __/ | | | | ___) | |_| | |_) | \___/| .__/ \___|_| |_|_| |____/|____/|____/ |_| The modern time series database. OpenTSDB is a distributed, scalable Time Series Database (TSDB) written on top of HBase. OpenTSDB was written to address a common need: store, index and serve metrics collected from computer systems (network gear, operating systems, applications) at a large scale, and make this data easily accessible and graphable. Thanks to HBase's scalability, OpenTSDB allows you to collect thousands of metrics from tens of thousands of hosts and applications, at a high rate (every few seconds). OpenTSDB will never delete or downsample data and can easily store hundreds of billions of data points. OpenTSDB is free software and is available under both LGPLv2.1+ and GPLv3+. Find more about OpenTSDB at http://opentsdb.net
OpenTSDB supports sub-second resolution.
It is disabled by default, but we can enable it using "ms=true" query paramater.
http://opentsdb.net/docs/build/html/api_http/query/index.html
Would you consider to support it?
I am not an R programmer, but it seems that due to a naming clash, this software fails to start.
This is the output when I try to run even the example query from the README.md file:
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(opentsdbr)
Loading required package: stringr
Loading required package: httr
Loading required package: lubridate
Loading required package: data.table
data.table 1.9.4 For help type: ?data.table
*** NB: by=.EACHI is now explicit. See README to restore previous behaviour.
Attaching package: ‘data.table’
The following objects are masked from ‘package:lubridate’:
hour, mday, month, quarter, wday, week, yday, year
> metric <- "SHT15_temp_Celsius"
> start <- ISOdate(2013, 02, 02, 00, tz="America/Los_Angeles")
> (result <- tsd_get(metric, start, tags=c(site="*"), downsample="10m-avg"))
Error: is.interval(interval) is not TRUE
To me (again, not an R programmer), this looks like it could be related to something like this:
http://stackoverflow.com/questions/30249863/lubridate-objects-masked-after-loading-data-table
Can someone with any modicum of R skills see if there is an easy solution to this?
(result <- tsd_get(metric, start, tags=c(site="*"), downsample="10m-avg"))
Error: is.interval(interval) is not TRUE
Hi Holstius,
I just looked in opentsdbr code and tried some example. It is awesome work. I am trying to work on big data analysis on R. I want to run map-reduce on R using Rhipe/rbase. I am trying to get data from opentsdb using API. But I am looking for the way to read data directly from hbase table 'tsdb'. Can you help me with that part. I went through the documentation of opentsdb. I understand how we can get rowkey. But since everything is stored in serialized form. So I have no idea how to read data on hbase table directly from shell. I want to do this. So, that we can analysis performance between using API and reading data directly from hbase. Once it is done. I hope it would be helpful to other people.
Thanks
Hi! Thank you so much for this awesome tie in! We had an analyst who wanted to use R for accessing our OpenTSDB data and I was able to spin up your module and get him up and running.
I saw that the tsd_get()
method is using the /q
endpoint to fetch data. We're deprecating that in 2.0 and trying to get folks to move over to the new /api/query
endpoint. It returns JSON data so hopefully R would be able to parse that fairly easily. And if there is a format that's better for R, we could write a serialization plugin to return results in that format.
Thanks again!
is.interval(ISOdate(2013, 02, 02, 00, tz="America/Los_Angeles"))
is FALSE!
tsd_get executes stopifnot(FALSE)
then.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.