News for hackers. Stuff that matters.
Re:Prometheus on Raspberry Pi by laumars on Tuesday February 10, 2015 @10:57AM (#9027913)
> "Cross-compiling this for Raspberry Pi is a pain. ARM != ARM, there are several variants and when I tried to cross-compiling Prometheus with CGO, it just lead to segfaults or invalid instructions."

I'm pretty sure I had similar issues on the original model B and found I was missing specifying which ARM version it was:

    export GOARCH="arm"
    export GOARM="5"
I don't know if the same is required for the Raspberry Pi 2 nor even which ARM chipset version it is (the same I'm going to assume since Raspbian / Arch / etc still run) but it might be worth checking you have your GOARM environmental variable set
Re:Prometheus on Raspberry Pi by simcop2387 on Tuesday February 10, 2015 @11:53AM (#9028309)
The PI2 should be much easier to get going with this since it's finally updated to ARMv7 and can actually run normal distros along with raspbian. I don't know what other extensions it has but i'd hope it'll work out of the box there.
Re:Prometheus on Raspberry Pi by discordianfish on Tuesday February 10, 2015 @02:20PM (#9029263)
Just for completeness, my answer to the same Q on the blog: ---

his doesn't solve cross compilation CGO. For that, you need the gcc cross compiler for the raspberry pi. I've tried to build it with CGO enabled like this:

CC=arm-linux-gnueabihf-gcc GOARCH=arm CGO_ENABLED=1 go build -ldflags="-extld=$CC"

But the binary still segfaulted on the raspberry pi. I also tried the cc from https://github.com/raspberrypi... but with the same result.

Re:Prometheus on Raspberry Pi by laumars on Tuesday February 10, 2015 @05:17PM (#9030288)
Ah ok. Shame.

Thanks for the update though :)

Re:Prometheus on Raspberry Pi by kbody on Tuesday February 10, 2015 @10:48AM (#9027811)
First time I heard about Prometheus (by Soundcloud). I wonder how it compares to InfluxDB as a time-series DB (ignoring the monitoring things).
Re:Prometheus on Raspberry Pi by detaro on Tuesday February 10, 2015 @11:01AM (#9027960)
https://news.ycombinator.com/item?id=8995696

Previous discussion here, with both Prometheus and InfluxDB developers chiming in.

Short version from memory: Prometheus is more efficient for datasets were series have metadata, not so much individual points, since InfluxDB stores metadata per point, but InfluxDB will optimize this case in the next version.

Re:Prometheus on Raspberry Pi by freeman478 on Tuesday February 10, 2015 @11:00AM (#9027949)
See the previous HN Post about it : https://news.ycombinator.com/item?id=8995696

and more precisely related to your question : http://prometheus.io/docs/introduction/comparison/#prometheu...

Re:Prometheus on Raspberry Pi by jrv on Tuesday February 10, 2015 @06:19PM (#9030572)
See also the official announcement blog post by SoundCloud: https://developers.soundcloud.com/blog/prometheus-monitoring...
Re:Prometheus on Raspberry Pi by raindrop777 on Tuesday February 10, 2015 @11:39AM (#9028225)
Can someone tell me why someone would want to write a database in Go/Python/...? Or is Go just a wrapper in this case?

I am looking to store small time series data (only 100 points), but millions of them. I currently use sqlite. Any other suggestions that I could use?

Re:Prometheus on Raspberry Pi by ethbro on Tuesday February 10, 2015 @02:18PM (#9029252)
I suppose for the same argument that can be made for single-language-but-inefficient configuration systems.

When you're doing a basic process, reliability >> efficiency.

And sometimes more pieces in your stack just decrease reliability of the entire system. (Admittedly! Rolling your own version of an already well-implemented stack component is not without its peril as well)

Re:Prometheus on Raspberry Pi by bduerst on Tuesday February 10, 2015 @01:06PM (#9028755)
It's all dependent on what you're trying to do. Sqllite is surprisingly robust for simple things. Are you experiencing any issues yet, and what kind?

What's the transactional activity with that time series you're storing? (i.e. are you writing these individually each millisecond or are you writing in batches every hour)

Re:Prometheus on Raspberry Pi by atmosx on Tuesday February 10, 2015 @01:24PM (#9028880)
I'd go with PostgreSQL, takes 30-35 MB of RAM for one running connection. The entire stack (db + httpd + ruby/python/php) should take less than 150 MB. You have another ~ 300 in the prior model B.

Go should be faster and more efficient than python/ruby so I'd expect even less RAM/better performance.

SQLite3 these days is good for embedded devices but that's about it IMHO.

Re:Prometheus on Raspberry Pi by jrv on Tuesday February 10, 2015 @06:07PM (#9030522)
Millions of time series with a small number of points each actually works very well with Prometheus.
Re:Prometheus on Raspberry Pi by rcarmo on Tuesday February 10, 2015 @01:12PM (#9028799)
RRDTool?
Re:Prometheus on Raspberry Pi by rcarmo on Tuesday February 10, 2015 @01:14PM (#9028811)
I'm intrigued. I collect real-time machine performance data using a UDP multicast daemon (written in C). It's fallible on some network topologies, etc., but it's extremely light and efficient.

I wonder if that could be plugged in to Prometheus without the overhead of HTTP collection...

Re:Prometheus on Raspberry Pi by bbrazil on Tuesday February 10, 2015 @01:53PM (#9029074)
HTTP collection doesn't really add a lot of overhead.

You might be interested in the https://github.com/prometheus/collectd_exporter as collectd works in a similar way.

For machine monitoring http://www.boxever.com/monitoring-your-machines-with-prometh... covers how to set it up with Prometheus - it's pretty easy to get working.

Re:Prometheus on Raspberry Pi by rcarmo on Tuesday February 10, 2015 @03:10PM (#9029564)
It does in the sense that an HTTP connection (either on the server or the client side) will expend roughly 20 times the CPU and buffers than generating or handling a single UDP packet. It all adds up on small systems.
Re:Prometheus on Raspberry Pi by bbrazil on Tuesday February 10, 2015 @05:25PM (#9030327)
You'd usually transfer many metrics in a single HTTP request, so the cost is amortized in most cases.
Re:Prometheus on Raspberry Pi by rcarmo on Tuesday February 10, 2015 @05:30PM (#9030351)
I can pack a lot on a UDP packet as well...
Re:Prometheus on Raspberry Pi by jrv on Tuesday February 10, 2015 @06:14PM (#9030556)
Not sure if this is what you're comparing it to, but be aware that Prometheus' approach is fundamentally different from StatsD-like approaches where you send every event or a subsampling thereof to a monitoring server.

Prometheus is state-based, not event-based. It only stops by your monitored instances once every couple of seconds and gathers their current state. E.g. for counting events, clients simply expose cumulative counters over their lifetime which they can increment locally in memory, and Prometheus comes by for example every 15 or 30 seconds and stores the current counter state.

The HTTP traffic incurred in this case is not really a problem and you'll usually run into bottlenecks at other places (like storage sample ingestion) before you run into network transfer bottlenecks.

Re:Prometheus on Raspberry Pi by AYBABTME on Tuesday February 10, 2015 @01:38PM (#9028983)
There's a problem with metrics over UDP: an overloaded server will not be sending its metrics, so it will appear as if it's doing ok.
Re:Prometheus on Raspberry Pi by rcarmo on Tuesday February 10, 2015 @03:12PM (#9029579)
Your assumption is wrong, since lack of data points in a given time interval is, in itself, a data point. If metrics don't arrive on time after a set interval, the machine is flagged.