Checkmk 2.0 is here! See what's new.

Werk #16: Linux+Windows agent: allow spooling plugin outputs via files

Component Checks & Agents
Title Linux+Windows agent: allow spooling plugin outputs via files
Date Dec 4, 2013
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 1.2.3i7
Level Prominent Change
Class New Feature
Compatibility Compatible - no manual interaction needed

The Windows and Linux agent now have a new feature for sending the contents of files as a part of the agent output. This is useful for generating monitoring data asychronously, e.g. by a cron job.

Simply let the job create or update a file in the directory /etc/check_mk/spool (Linux) or in the subdirection spool of the agent directory (Windows). If that directory is missing, simply create it. The agent will then add the contents of all files contained in that directory to its output. You can use any filename you like. Just files beginning with a dot are ignored. This is an easy way to have applications on the host drop monitoring data into Check_MK. Especially conveniant is using a local <<<local>>> section here.

If you prefix the file name with a number (e.g. 600MyOutput or 3600_app_data.txt) then that number is interpreted as a number of seconds. If the last modification of the file is older than that number, it will be ignored. This will usually set the corresponding services in the monitoring to UNKNOWN. That way you can make sure that you will be alarmed if no fresh monitoring data is available.

Here is an example for a spool file using a [localchecks|local] section:

C:\Program Files\Check_MK\spool\600_foobar.txt
<<<local>>>
0 Service_FOO V=1 This Check is OK
1 Bar_Service - This is WARNING and has no performance data
2 NotGood V=120;50;100;0;1000 A critical check
To the list of all Werks