Grafana Graphing

It’s strange to be talking about Linux stuff on a reef site, but then again…

I spent the better part of the weekend setting up an ELK stack on my web server. I’ve never been happy with the silly graphs my reeflog was producing. Mostly the fact that they were not dynamic at all, which made it very painful if I wanted to see something that was already graphed.

I already have all the data going to a MySQL, and I’ve been searching for a better way of graphing that data.

Thus enters Grafana. Grafana is an application that runs on the web server and can be used to alert, show and graph various timedate based data. Unfortunately it does not have hooks for getting data directly from a MySQL database.

So, you install ElasticSearch. ElasticSearch is basically a nodb logging database that can take in data from endpoints and store it in an easily searchable fashion… But how do I get the data from  the MySQL DB into the ElasticSearch.

Next you install logstash. Logstash is yet another service that runs. You can configure various inputs and provide it various outputs and it will transpose the data from one source to the other. In my case, it logs in to the MySQL DB, grabs any data since the last update, and puts it into ElasticSearch.

Probably the biggest thing I’ve learned since doing this is that the Wifi connection to the internet is spotty at best for my poor little Raspberry Pi. There’s quite a few times where it doesn’t get data up to the server. It doesn’t really matter… most things don’t happen quite that quickly in a reef tank. The one thing I probably miss out on is anytime the top-off pump runs as it typically only runs for a minute to begin with.

If I setup a kalk reactor like I want to, then I may switch out the pump with a doser. That would run slower than a top-off pump would and may get caught be the graph more often.

Here’s a screenshot of the current dashboard. Alerts are at the top. pH and Temperature are graphed at the bottom.

Coral Death and Update

The Montipora Cap didn’t make it. It slowly died off until I finally removed it from the tank.

The Blastimosa doesn’t seem to be fully extending out during the day either. I’m wondering if my lower salinity is causing it. I’ll work on getting that slowly raised back up.

All the other fish/inverts are doing well. Having the pH probe in the top-off tank with the Kalk has helped me to keep saturation high. I think this is also helping me keep the Ca/Alk higher in the main tank as well.

Over the weekend I took the time to finally get the chiller installed. The tank has gotten quite high a few times now. It hasn’t gone over the 82 degree set point where the chiller would have turned on, but it’s gotten close.

I’m not actually sure if the chiller will ever run. We don’t let the house get above 82 even when we’re not home. The tank is next to a window, so maybe the heat from that might cause the tank to run hotter.

I haven’t noticed that the lights and pumps are adding much heat to the tank at all, which is nice.

The macro algae is growing quite nicely in the sump. There’s also some red algae showing up in the sump due to the excess light, but I’d rather have it there than in the main tank. I never thought sumps should be that clean anyways 🙂

I’m hopefully going to get some more fish this weekend. I’d like to get a few Pajama Cardinals. I also want some more corals, but man those things are expensive. I keep watching for frags to show up on Facebook or Craigslist.

No pictures this time… Sorry.