Friday, October 27, 2017

Monitoring My Pi Cluster WIth Nagios, Part III - Checking the other Pi's using check_by_ssh


It's been too long since I wrote my other Nagios posts. The server I had running died, and I didn't recover the nagios files from it. Fortunately, I had an AWS machine to compare to, so I didn't lose everything.

Setting up the check_by_ssh checks is, like all of nagios (it seems), a multi-config process. You'll need to modify $NAGIOS_HOME/etc/objects/commands.cfg, $NAGIOS_HOME/etc/nagios.cfg, and $NAGIOS_HOME/etc/servers/<server_name>.


Wednesday, August 23, 2017

Monitoring My Pi Cluster WIth Nagios, Part II - Adding the Pi's

In Part 1, I compiled Nagios from source, installed it and got it running.

Here,  I'm going to describe how I added my Pi's.


Friday, August 18, 2017

Monitoring My Pi Cluster WIth Nagios, Part 1 - Installing

This will hopefully be Part 1 of the story. BTW - It seems to be pronounced Nah - gee (as in geese) - ose. I installed this on a pine64 to monitor my Pi network (4- Pi3s with MySQL5.7 servers, and 1 Pi2 running Zookeeper) and to learn how to use it.

I know this is going to be like "somebody who's played racquetball 3 times teaching someone else to play for the first time", but here goes:

HT RiffTrax Ator the Fighting Eagle 

Sunday, August 13, 2017

Pinebook: Installing Armbian

I just got my Pinebook last week. If you don't know what a Pinebook is: here. I have a couple of pine64's and they are pretty cool. I'm using them as servers, and not using the GPIO or Euler Bus. But the Pinebook is different.

Disclaimer: If you brick your Pinebook, I'm sorry - this is just how I installed Armbian on mine.

Thursday, March 9, 2017

Using dhclient to automatically change IP addresses of Raspberry Pi on start-up

So, in my previous post I dealt with changing IP addresses on my Pi cluster by scp'ing the new IP addresses after the Pi had started up and established a network, and creating an ssh/config file from that info.

This is fine for most occasions. But I have one instance set-up to run zookeeper. I'd have to go around and change the config files on all my other Pi's. Ansible could cure this, and I'll get there one of these days. But I'm not there today. And actually - I think I'll use the script I wrote previously to update ansibles' hosts file. I just now thought of that.

Anyway - I want the zookeeper Pi to always have the same address.

One way to deal with changing IP addresses on my raspberry Pi cluster

One of the annoyances I have with my router (it's actually a hotspot) is that every time I start up my Pi cluster, they all have different IP addresses than they had the day before.

So - I have two ways to deal with this.

The first way - I scp the IP addresses as a file (after the pi's start up) to my work computer, then generate an ssh_config file. The second way, I request the same IP from my hotspot. All my Pi's are running Debian Jessie with systemd.

The first way: 

scp (or you could email it) the IP address after networking has started up.

Saturday, January 28, 2017

HOW-TO use Kafka to stream Postgresql traffic with bottledwater_pg on a Raspberry Pi 3

If you want to stream changes to your Postgresql database to Kafka on your Raspberry Pi 3 - this is how I did it. I'm sure there are other ways to accomplish this. All I want to do here is to show you how I managed it. I'll preface my comments with a hash '#'.

Installing the C AVRO library on Raspbian Jessie

Reference: Apache Avro

git clone https://github.com/apache/avro.git

Install postgresql from source an Raspberry Pi 3 Debian Jessie

Reference: https://www.postgresql.org/docs/current/static/installation.html

Pretty sure I included all of the prerequisites:

Install zookeeper package

As part of the Kafka streaming project, I installed zookeeper. Here's how I did that:

Ref: Apache Zookeeper