SAP Überwachung mit Nagios und Icinga

Wer sich schon mit dem Thema “SAP Überwachung” beschäftigt hat, kennt wahrscheinlich das SAP-eigene CCMS und die dazugehörige Transaktion RZ20. Es gibt eine Reihe vorgefertigten Prüfungen (die sogennante “Monitoring Templates”) die interessante Messwerte aus den SAP-Systeme liefern. Diese gehen von Festplatten oder Datenbank Füllgrad bis zum Applikations-Antwortzeit, und viel mehr.
Der erfahrene Admin kommt sofort auf die Idee, die Ergebnisse in dem Unternehmensübergreifenden Monitoringsystem weiterzuleiten. Damit bekommt er eine einheitliche Problemansicht und kann seine Alarmierungskette (Mail, SMS, Voice usw.) einfach weiter verwenden. Aber wie können wir die Daten am einfachsten anzapfen? Das Plugin check_sap kann diese Daten aus dem CCMS rausholen und in Icinga/Nagios 3 Multiline-Format zeigen. Die aktuelle Version des Plugins kann jetzt mit dem Klassischen RFC oder mit dem neueren NetWeaver SDK kompiliert werden. Das ganze ist natürlich schnell, 64-bit kompatibel, Unicode fähig, und einfach zu benutzen!
Die Installation ist ganz einfach:

  • RFC SDK von runterladen und entpacken
  • Die Bibliotheken unter lib nach /usr/local/lib oder ähnliches kopieren
  • ldconfig aufrufen
./configure --with-rfc-headers=/pfad/zu/sdk/include --with-rfc-libs=/usr/local/lib
make install

(siehe auch die Datei README)
Anbindung SAP
Als erstes sollte ein RFC-Benutzer mit passenden Rechten angelegt werden (siehe die Tabelle unter
Wenn alles funktioniert liefert den Plugin die SAP-Version:

~/ /usr/local/libexec/check_sap --host saphost --sysnr 00 --client 000 --dest SID --user NAGIOS --pass nagios --mode sapinfo
Connected to SAP release 701

Weitere Beispiele sind wie immer unter NETWAYS.ORG zu finden

NoMa release 2.0.2

Those of you who have been following the ongoing development of NoMa in the GIT repository
know that there are lots of exciting new features in the 2.x series; SQLite support, an improved configuration interface, a powerful timeframe concept, and much more.
Now finally we’ve packaged it all into a release 2.0.2 (with an installer, and updated documentation 🙂 ) available at
Many thanks go to Rune “TheFlyingCorpse” Darrud and Sebastian Wolf for all their hard work
on the project.

Switch monitoring via SNMP

Chances are you will at some point need to monitor a switch, and the Nagios community offers many plugins to do this.
Because no two setups are exactly the same, there are two interface checks actively maintained by NETWAYS which are designed for very different environments.
The first plugin was designed for monitoring large numbers of switches over low-bandwidth links, and is optimized for minimal system load.
check_interfaces (

* very fast c-based plugin
* uses bulk get mode to reduce traffic
* runs on embedded appliances
* no external status files required
* SNMP v1, 2c and 3 supported
* 10GB port support
* fully integrated into Nagios 3 / Icinga
* 64 bit counter support
* Interface aliases
* Human-readable bandwidth measurement
* PNP compatible output

The second plugin is orientated towards large switches, and offers a graphical overview of the switch status.
check_interface_table_v2 (

* adapted from check_interface_table from ITdesign
* Perl-based plugin
* Separate colour HTML overview
* Monitor switch ports for changes
* VLAN support
* 64 bit counter support
* Interface aliases
* Human-readable bandwidth measurement
* PNP compatible output
Both are naturally GPL-Licensed and available for download from the usual places.

SAP monitoring simplified

Monitoring SAP systems with Nagios or Icinga has been possible for a while with the SAP CCMS plugin hosted on SourceForge. It has some nice features, has however also a rather unusual configuration method which makes it difficult to work with.
And it doesn’t support unicode SAP systems. This problem was important, because we needed to connect to a Unicode system. Looking at the code, It seemed to be easier to start afresh with a brand-new plugin and take the opportunity to make the program more compliant with Nagios and Icinga. New features that it offers are:

  • fast
  • resource friendly
  • easy to compile
  • can connect to unicode SAP-Systems
  • runs on 64-bit Linux
  • has a simple command-line configuration
  • switches to multi-line output (Nagios 3 compatible)
  • has full-path matching capability
  • outputs graphable performance data
  • list mode allows easy searching for monitoring objects

You can find more details and download check_sap at

Quick Tip: Testing Nagios Plugins

Sometimes when testing a Nagios Plugin on the command line, it’s useful to know the exit code.
You can always use echo $?, but that becomes tedious if you have to type it often.
Additionally you have to remember what the exit codes mean.
The following snippet adds a prompt that changes colour according to the exit code; 0 is green, 1 is yellow, 2 is red and 3 is grey. This makes it easy to see at a glance what the exit code was.
Add the following to a file e.g.

export colormap=([0]=32 [1]=33 [2]=31 [3]=37)
export PS1='\[\e[${colormap[$?]}m\]\u@\h:\w\$\[\e[30m\] '

Then source it in .bashrc or on the command line with


and enjoy.

nagios@localhost:~$ ./check_plugin
OK - 1824 bytes in 0.002 seconds
nagios@localhost:~$ ./check_plugin
Unable to open TCP socket

Plugin fuer SEP Sesam

sep_logo…und hier gibt’s wieder ein Plugin aus einem Kundenprojekt. Das check_sepsesam Plugin ermöglicht die Überwachung des Backupsystems Sesam des Herstellers SEP.
Das Plugin kann via SSH oder NRPE abgefragt werden und erlaubt die Auswertung der letzten Backup Tasks gefiltert auf Hosts und Tasks. Es erlaubt außerdem die Angabe spezifischer Host- und Tasklisten sowie die Einschränkung auf angegebene Zeiträume um die mehrzeilige Ausgabe des Plugins zu konfigurieren. Auf Wunsch kann die Ausgabe der Performancedaten auch unterdrückt werden.
Es ist wie immer auf und MonitoringExchange zu finden.

Temperature visualization

So you’ve covered the Data Centre in temperature sensors, and added them into your Nagios / Icinga monitor. You’ve configured the monitoring server to send alerts when things get too hot and everything works perfectly. You proudly explain how it all functions to anyone who will listen.
Unfortunately your colleagues aren’t impressed… What you need is some pretty graphics!

The Generate-a-Heatmap-with-data-from-the-NDO-Database Addon for Nagios / Icinga, otherwise known as heatmap.
It’s a pretty little drag-n-drop AJAXy thing that certainly won’t replace a proper Data Centre CFD Model, but it looks realistic enough to show your co-workers.
Parts of the first version were sponsored by Wilken-Group.
Have fun

Nagios at Tyrolit

Recently I visited one of our Austrian customers in the city of Schwaz. Tyrolit, part of the Swarovski Group and one of the world’s leading suppliers of abrasives, are based there.
In common with most large companies their IT department needs to respond 24×7 to any serious problems, and they have a weekly on-call rota for the system administrators.
As always with Nagios, there is more than one way to solve this – one of the most popular being to send all alerts to a single email address and/or ‘phone number which is passed to whomever has the rota. It’s a simple and fairly easy way to manage the problem, especially if you use one of the managed group-call-number services available on the market (e.g. Vodafone CorporateVPN). One of the biggest disadvantages however is that you can no longer find out who received the alert. Plus you are adding another point-of-failure into the notification chain.
For some customers I would recommend handing all notifications to an external handler (e.g. NoMa), which offers a simple configuration GUI; but it wasn’t suitable in this case – so we decided to send the alerts to a Nagios contact group and built a small webpage to manage this group and create Nagios configuration files. With a couple of mouse clicks the Admin-on-Call can be changed.
This is one of the strengths of Nagios. The ability to easily expand the functionality with a script if need be. Which reminds me: I must upload it to