Articles tagged "nagios"

Patch for Nagios Business Process AddOn (NagiosBP) to use Merlin/MySQL-DB

[UPDATE 2009-11-01]
This patch is obsoleted by NagiosBP 0.9.4 Everything (including a small fix to my patch) you need is in the release!
[/UPDATE 2009-11-01]

Some participants of my "Nagios Advanced" training/workshop want(ed) to use Nagios Business Process AddOn with a Merlin/MySQL database. So I had a look at the source code of NagiosBP and I must say: Good job, Bernd!

It was REALLY easy to add another backend to it and now play with NagiosBP and Merlin.

[UPDATE 2009-07-07]
Hey you guys out there! I see really many downloads of this patch (no bots or search engines!) but I didn't get any feedback! So... please send me some feedback - "W00t! Works!" IS feedback ;-)
[/UPDATE 2009-07-07]

Step by step:

Python-Bindings of NET-SNMP for SUSE 11

Anyone out there?

I'm looking for packaged (RPM) Python bindings of NET SNMP for SUSE 11...

Any hint?

check_netappfiler on github - let's have fun!

Just a short note:

check_netappfiler's code is now available on GitHub. I didn't import the whole history (just the last... uh... about 6 "releases") because there was(is) much crap in my original Subversion repository.

Fork it! Add code! Fix errors! Send "pull request"s! ;-)

I'm not sure if it while be there forever - but hey! Let's use this wonderful site!

Nagios-Vortrag auf der CeBIT 2009

Nachdem ich schon direkt danach gefragt wurde und hier vielleicht auch der ein oder andere darüber stolpern könnte, häng ich einfach mal den Vortrag, den ich dieses Jahr auf der CeBIT gehalten habe, hier an.

Fragen? Gerne, an die altbekannte Adresse ;-)

CeBIT 2009 - mit mir

Dieses Jahr hat's mich auch mal erwischt. Ich bin auf der CeBIT 2009.

Wer Lust hat, kann mich ja in Halle 6, Stand G41 (rechter Teil von Heinlein) mal besuchen. Teamix stellt u.a. Nagios aus und ich halte auch täglich einen Vortrag darüber.

Wer uns nicht findet, einfach nach den roten oder türkis Shirts ausschau halten ;-)

COM/Seriell ansprechen unter Windows - Mess-PC

Dieser Artikel liegt schon ewig in meiner Queue, bevor er hier endgültig vergammelt geb ich ihn einfach mal so frei

Auslesen der Mess-PC Temperaturfühler unter Windows mit Hilfe von Python:

!/usr/bin/env python

import re
import sys

fd = open("COM3")

line = fd.readline()
line = fd.readline()

fd.close()

erg = re.search("temperature=([.0-9]+).humidity=([.0-9]+).dewpoint=([.0-9]+)", line)

temp = float(erg.group(1))

RETURNCODE=0
RETURNSTRING='OK'

if temp > 40.0:
RETURNCODE=1
RETURNSTRING='WARNING'
elif temp > 45.0:
RETURNCODE=2
RETURNSTRING='CRITICAL'

out = 'Temperatur %s: %4.1f C, ' % (RETURNSTRING, temp)
out += 'Information: Luftfeuchte %4.1f%%, ' % float(erg.group(2))
out += 'Taupunkt %4.1f' % float(erg.group(3))

out += '|Temperatur=%.1f;40.0;45.0; ' % temp
out += 'Luftfeuchtigkeit=%.1f ' % float(erg.group(2)
out += 'Taupunkt=%.1f' % float(erg.group(3))

print out
sys.exit(RETURNCODE)

check_netappfiler - Nagios-Plugin für FAS-System von NetApp

Mit Hilfe von check_netappfiler ist es möglich, wichtige Laufzeitdaten einer FAS mit Nagios zu überwachen. Das Plugin ist in Python geschrieben und hat außer dem "snmpget"-Binary keinerlei Abhängigkeiten.

Es existiert allerdings eine Version, welche auf den NET-SNMP Python-Bindings aufsetzt - diese ist zwar schneller, dafür werden aber die Bindings benötigt, welche noch nicht in allen Distributionen (z.B. nicht in Debian 4.0 "Etch", aber in 5.0 "Lenny") zu finden sind.

PNP-Graph für ein NetApp-Volume
Grafische Visualisierung mit Hilfe von PNP und RRDTool

Es gibt noch keine richtige HomePage für das Plugin, allerdings ein paar Informationen dazu (auf Englisch) befinden sich unter http://people.teamix.net/~svelt/check_netappfiler/.

Wer sich weiterhin mit NetApps beschäftigt (oder beschäftigen muss), dem sei MyNetApp.de an's Herz gelegt. Eine kleine aber feine Community mit vielen Tipps, Tricks und schnellen Antworten auf Fragen!

check_netappfiler - New "homepage"

I just want to let you know that there is a new... err... "homepage" for my check_netappfiler-Plugin. You can find it - as I do most work for it at http://people.teamix.net/~svelt/check_netappfiler/. There are also some example graphs of PNP4Nagios.

If you have problems and/or ideas what to monitor on your NetApp Toaste^WFAS don't hesitate to contact me!

German readers: Soll ich noch ein Forum auf MyNetApp.de eröffnen (lassen)?

check_netappfiler with support for "libsnmp-python"

As ''snmpget'' from Debian Etch is a real performance killer I rewrote parts of my check_netappfiler plugin for Nagios.

The Good News[tm]:
Look at the load at the time of switchting to the new version:
Load-Graph

The Bad News[tm]:
You need NET-SNMP's Python bindings which aren't in Debian/Etch so I did a quick ("works for me") backport of NET-SNMP out of Lenny

Feedback welcome! ;-)

Extend host search in Nagios navigation frame

Just a small patch to add

Step by Step:

* Download my small patch file ["Nagios_Nav_Autocomplete.diff" (from source, no custom paths)](/static/Nagios_Nav_Autocomplete.diff) or ["Nagios_Nav_Autocomplete.Debian.diff" (for Debian packages)](/static/Nagios_Nav_Autocomplete.Debian.diff)

* `cd` to `/usr/local/nagios/share/` for self compiled Nagios or `/usr/share/nagios3/htdocs/` (Debian)

* If `patch --dry-run </path/to/download/Nagios_Nav_Autocomplete.diff` gives you no error try without "`\--dry-run`"

* If PNP is **not** in `/nagios/pnp/` (URL!) change `side.html`'s paths to PNP in lines 24, 25 and 212.

* Reload left frame of Nagios

* Enter at least 3 characters

* Be happy ;-)

If it doesn't work:

* Check if you **reloaded** the left frame and your browser knows the patched `side.html`

* Make sure there are no 404 (file not found) errors in your Apache logfiles (correct paths to PNP)

check_netappfiler.py - Nagios-Plugin for FAS systems by NetApp

Some people asked me at NETWAYS Nagios Konferenz if my check_netappfiler plugin is dead.

No, it's not!

With ONTAP 7.3 NetApp added support for SNMP v2c and v3! W00t!

Get the plugin (and some minimal documenation - you have been warned! ;) on http://people.teamix.net/~svelt/check_netappfiler/!

And PLEASE send me feedback (yes, "it's wonderful!" IS feedback ;) if you're using it!

Who watches the watchman - err... Nagios? Part II

As many people only read my RSS content feed (but not the comment feed) I decieded to repeat this script here as new content ;-)

The previous solution has some drawbacks (only one check, so sometimes you get false negatives). So here we go:

!/bin/sh

CMD="/usr/lib/nagios/plugins/check_nagios -F /var/cache/nagios3/status.dat -e 1 -C nagios3"
EMAIL=foobar@...spambox.com

OUTCHECK=$CMD

if [ $? -ne 0 ]
then
sleep 300
OUTCHECK=$CMD
if [ $? -ne 0 ]
then
OUTPROC=ps ax | grep "/usr/sbin/nagios3" | grep -v grep
if [ $? -eq 0 ]
then
(
echo -e "Output of check_nagios_check:\n| $OUTCHECK\n\n"
echo -e "Output of ps:\n| $OUTPROC"
) | /usr/bin/mail -s "[NAGIOS] Log file stale, but process found" $EMAIL
else
(
echo -e "Output of check_nagios_check:\n| $OUTCHECK\n\n"
echo "NO output of ps, Nagios process is NOT running"
) | /usr/bin/mail -s "[NAGIOS] Log file stale, NO process found" $EMAIL
fi
fi
fi

exit 0

Same script (hope so...) in german/Script mit deutschen Ausgaben

Vim Syntax-Highlighting für Nagios

Zwar nicht ganz auf dem aktuellen Stand, aber trotzdem durchaus ganz hilfreich:

http://dev.gentoo.org/~ramereth/vim/syntax/nagios.vim oder die lokale Kopie.

Upgrade! Upgrade! Upgrade!

http://people.teamix.net/~svelt/debian/ has some new packages:

* [.../etch/nagios3/current/](http://people.teamix.net/~svelt/debian/etch/nagios3/current/) now has **3.0rc3**

* [.../etch/pnp/current/](http://people.teamix.net/~svelt/debian/etch/pnp/current/) is updated to 0.4.7

* [.../etch/ndoutils/current/](http://people.teamix.net/~svelt/debian/etch/ndoutils/current/): Added a init.d-Script, thanks to Oliver Boos!

* [.../etch/nrpe/current/](http://people.teamix.net/~svelt/debian/etch/nrpe/current/) is an initial backport of NRPE. Needed for multiline output with Nagios 3. Be careful! More testing needed!

And a little Add-On for all AMD64-Users:

Have a look at http://people.teamix.net/~svelt/debian/etch64/! But beware! These packages are not well tested! They may eat your cat or dog... or both! ;-)

Who watches the watchman - err... Nagios?

Did you ever wonder how to get informed when Nagios doesn't run anymore?

Just use this line...

OUT=/usr/lib/nagios/plugins/check_nagios -F /var/cache/nagios3/status.dat -e 1 -C nagios3|| echo $OUT | /usr/bin/mail -s "[NAGIOS] Nagios LogFile STALE" spambox@....com

... called once an hour by Cron and you will at least get informed.

« 1 2 3 »