Script for monitoring a pvoutput.org system using Nagios

Category Server Monitoring Solceller
A couple of years ago we got solar panels installed on the roof of the house. It looks like it is going to be a good investment.

For the last year I have had automatic upload of my production data set up to go to pvoutput.org. Here is a link to my data on the site - go take a look.
Sometimes the automatic uploading fails. And it can take me a while - weeks - to notice that there is an issue.

A picture named M2

I have finally managed to get a reasonable setup with my Nagios installation that will detect if data is missing for my system on pvoutput.org.
The important piece that I have in place is a script for use with Nagios that will check if my system on pvoutput.org, identified by a System ID, has data available for today or not.
If there is no data, the script will return a CRITICAL status that Nagios know how to work with. if there is data avalable, the script returns an OK status.
The script uses the API that is available for working with pvoutput.org. pvoutput.org is great!
Here is what I now see in my Nagios services status page:
A picture named M3
The way I have configured my Nagios installation, if three checks (with 10-minute intervals) fail, I will get:
  • A red LED light on my Blink(1) which is plugged into my Nagios server.
  • A message by Pushover service to my Android device(s).
Some information on that alert configuration is here: Nerd alert: Home server with Nagios, Pushover and Blink(1) warnings.

You can call the script without using Nagios, in order to check if it works.
The syntax goes like this:
./check_pvoutput.sh APIKEY SYSTEMID
For instance
./check_pvoutput.sh 87654 12345
This would check the system with ID 12345. The APIKEY (87654 in the example) is a key that is needed in order to be allowed to use the pvoutput.org API.
Both the APIKEY and SYSTEMID are values you get from your pvoutput.org account.

There is a third, optional, parameter that controls which day you want to check for data. If you leave it out, the check will be for today. If you put a number in the third parameter, the number will be the number of days to subtract from today.
So for instance if you use this command
./check_pvoutput.sh 87654 12345 1
you will bee checking if pvoutput.org has data for yesterday

I have put the Nagios check_pvoutput.org script up on Nagios Exchange.
This is my first shot at creating at Nagios script, so any constructive criticism is welcome.


Jeg har købt et TomTom Cardio Runner løbeur

Category Danish Løb
Jeg er kommet til at købe et nyt løbeur: TomTom Cardio Runner.
Anmeldelse hos DC RainMaker

Det interessante er, at den måler puls ved hjælp af en helt anden teknologi. Den sender lys gennem huden fra urets bagside, og så detekterer den puls som farveændring - når blodet skubbes igennem.

Jeg har haft alt for mange problemer med at få de chest-straps til at virke som ellers er standarden for at måle puls mens man løber. Så derfor skulle der ske noget nyt

Jeg har løbet 600 meter med det, og umidelbart så det helt fint ud.


POSTing to a Domino server using curl

Category Domino
curl is a command line tool that will let you execute all kinds of requests that will make the computer you are at interact with services on the LAN or internet.

I have had a need to post data to a IBM Notes database hosted on Domino - using just the command line.

Here are the raw example commands to do just that.

First I needed to login to the server. The Domino server I was accessing was configured to use session authentication, using DomAuthSessID, but the example here would work with LtpaToken too.

curl --data "username=jbr&password=secret" -c cookie.txt "https://www.host.dk/names.nsf?login

This command will log you in and put the cookie that is issued by the server in a file called cookie.txt.

Then here is how to post to a Discussion database type IBM Notes database.

curl --data "subject=testsubject&body=testbody" --cookie cookie.txt "https://www.host.dk/pathtodiscussion/discussion.nsf/MainTopic?CreateDocument"


Getting Nagios to monitor Domino using SNMP

Category Domino
I have succesfully configured a Domino server (R9) to play nice with SNMP.
And I have configured a Nagios server to query status on numerous parameters on the Domino server.
Here is a screen dump from my Nagios Service status page
The blue ones are Domino specific.
The two red ones are the ones I am glad to have working. At the moment there are 0 mails pending og the availability index is 99. Which is good.
A picture named M2

I got it working by dusting off my German skills and reading this blog entry; Monitoring von IBM Domino-Servern mit Nagios.

The blog was not a perfect fit for my needs. The author includes instructions on doing some deep probing of the Domino server that I did not need, like how many documents are found in a specific View in a certain Notes Database - using DIIOP. So I had to disable some of the Service examples that are in the download package. Also, there are some minor errors in the samples.
You do need to download the example package to understand how things are done.

I wrote some more on Nagios a while back: Nerd alert: Home server with Nagios, Pushover and Blink(1) warnings.




Profile for jbruntt

Jens vægt-o-meter

12/08-06: 96,9 kg
14/10-06: 90,1 kg
14/08-07: 94,3 kg
07/11-07: 88,9 kg
09/11-08: 96,3 kg
03/02-09: 93,6 kg
09/08-09: 96,7 kg
30/12-09: 89.6 kg
25/01-10: 88.9 kg
09/03-10: 87.3 kg
26/08-10: 84.2 kg
15/09-10: 84.8 kg
02/01-11: 86.1 kg
28/09-11: 85.9 kg
05/06-12: 85.8 kg
05/06-13: 84.9 kg