Support for Time Series DB (Influx & Prometheus) **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
rfrost
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Dec 14, 2018 2:34 am

Support for Time Series DB (Influx & Prometheus) **solved**

Post by rfrost » Fri Dec 14, 2018 3:23 am

Hello all,

I am very surprised to see there is no direct support within the MeteoBridge product range for the relatively new (circa newer Circa 2013+) time series databases - INFLUXDB and PROMETHEUS.

Does anyone know when Meteobridge plans to add PUSH updates to INFLUXDB and PROMETHEUS ?

Then we can add our own display front ends to extract the data - eg GRAFANA.

Its important to me as I would prefer to push data live into INFLUX rather than setup a cron job on an FTP server to import the same data pushed via the existing FTP service. I need this so I can correlate other data collected form other devices that I display already via GRAFANA talking to Influx.

I know Meteobridge supports SCRIPT execution. So theoretically you could use a script to push data into Influx but I would have to have access to a local copy of 'CURL' installed on the Meteobridge to push the updates through. Is CURL installed on the Meteobridge?

Thanks

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5887
Joined: Mon Oct 01, 2007 10:51 pm

Re: Support for Time Series DB (Influx & Prometheus)

Post by admin » Sat Dec 15, 2018 12:43 am

Meteobridge is not suited to run this packages, but you are free to upload data via HTTP request to your web server and do the magic there you like to do using the hippest stuff you can find.

You don't need to call CURL via a script. Meteobridge can do HTTP GET requests with weather data as parameters, which are composed via template variables. When you start reading the wiki a bit more you will find it.

BTW: Are you aware the Meteobridge runs on HW that provides 32 MB RAM and 8 MB Flash?

rfrost
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Dec 14, 2018 2:34 am

Re: Support for Time Series DB (Influx & Prometheus)

Post by rfrost » Sat Dec 15, 2018 1:49 am

Oh I did not know you could do a HTTP GET to the MeteoBridge itself is that what you mean by using HTTP GET?

I cant seem to find documentation on the JSON API for the meteobridge can you point me to it?

If it doesnt support JSON requests then what I was asking was the ability to do a HTTP upload from the bridge via CURL to push data into an externally hosted INFLUXDB database.

As described here on the INFLUX website uploading data via CURL.

https://docs.influxdata.com/influxdb/v1 ... ting_data/

In my view Influx and Prometheus are way better suited to Weather station data as they are suited to time series data plus way less heavy to host that a full on relational db.

rfrost
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Dec 14, 2018 2:34 am

Re: Support for Time Series DB (Influx & Prometheus)

Post by rfrost » Sat Dec 15, 2018 2:29 am

I was just re-reading the MeteoBridge documentation and I noticed it makes reference to HTTP GET requests which in are in fact HTTP POSTs.

I was confused as "HTTP GET" is a download action not upload. I think the documentation needs to be changed to say "HTTP POST" as its an upload action not download which is *HTTP GET"

I will see if that can do what I want to push data into INFLUXDB API as described below

https://docs.influxdata.com/influxdb/v1 ... ting_data/

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5887
Joined: Mon Oct 01, 2007 10:51 pm

Re: Support for Time Series DB (Influx & Prometheus)

Post by admin » Sun Dec 16, 2018 12:03 pm

Your understanding of HTTP GET and POST is wrong, GET is capable to upload (via URL parameters) and download data.

rfrost
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: Fri Dec 14, 2018 2:34 am

Re: Support for Time Series DB (Influx & Prometheus)

Post by rfrost » Sun Dec 16, 2018 11:39 pm

You misunderstand the meaning of HTTP GET vs PUT

GET is a request from a site - yes where you can set parameters in a web request.

GET may even have URL limitations in length and is not usually suited for sending data to a site.

PUT is an upload part of HTTP protocol often used to upload parameters and data set via a web form and can handle multi format data - binary and textual and is the more appropriate for large data uploads.

You are right that you can use GET to set parameters. I hadnt thought of it that way as its not really what most sites do.

In my case I would have to write my own CGI web gateway script that accepts the parameters then pushes the data via influx.

doubleohwhatever
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: Thu Apr 12, 2018 8:41 am

Re: Support for Time Series DB (Influx & Prometheus)

Post by doubleohwhatever » Mon Dec 17, 2018 10:19 pm

rfrost wrote:
Sun Dec 16, 2018 11:39 pm
You are right that you can use GET to set parameters. I hadnt thought of it that way as its not really what most sites do.
It's fairly common actually. I've done a lot of work for clients interfacing with various APIs and see this quite often. I've never had a problem with it.

User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 5887
Joined: Mon Oct 01, 2007 10:51 pm

Re: Support for Time Series DB (Influx & Prometheus)

Post by admin » Tue Dec 18, 2018 12:10 am

rfrost wrote:
Sun Dec 16, 2018 11:39 pm
You misunderstand the meaning of HTTP GET vs PUT
No.
rfrost wrote:
Sun Dec 16, 2018 11:39 pm
You are right that you can use GET to set parameters. I hadnt thought of it that way as its not really what most sites do.
This is why I told you to think twice about your understanding of GET.
rfrost wrote:
Sun Dec 16, 2018 11:39 pm
In my case I would have to write my own CGI web gateway script that accepts the parameters then pushes the data via influx.
Good idea, now you are on track...

Post Reply