Freeware and Plugins

Freewaregruppe Monitoring/Nagios-Plugins


Windows-Plugin: which evaluates return values ​​of invoked programs


check_output is a Windows-Plugin for Nagios, which evaluates return values ​​of invoked programs. Supports regular expressions (Regex).



Usually you run the script with the path to the program, the parameter(s) and the necessary string for alerting:

C:> check_ouput.exe path=<program> args=<arguments> exp=<expression>

It can be used on German and English systems.

For debugging purposes, it may also be called with a more detailed output option (this mode is not suitable for continuous operation, but for testing purposes only).

Afterwards it will output the detailed status of the individual components:

C:> check_output.exe path=“ C:\program files (x86)\oracle\bin\db-parser.exe“ args=„-sql-db=MYDB –sql-user=ORA –sql-password=secret –sql-db=MY_TESTDB –sql-table=ORA_SYS_01 –sql-cmd=‘select * from testtable;‘ exp=blabla debug

Path: C:\program files (x86)\oracle\bin\db-parser.exe
Args: „-sql-db=MYDB –sql-user=ORA –sql-password=secret –sql-db=MY_TESTDB –sql-table=ORA_SYS_01 –sql-cmd=‘select * from testtable;‘
Exp: blabla
Timeout: 15
Tester; Fritz; 01.01.1970
Tester2; Karl; 02.02.1970
Tester3; Xaver; 03.03.1970

OK: No matches found

For information on the plugin and its usage you can call it with the help command:

C:> check_output.exe help

check_output - Revision: 1.1
Copyright (C) 2014 LuftEngineering GmbH
Report Bugs
check_output plugin for Nagios. Search for errormessages in program output with regular expression


     path     - Full path to customer exe (required)
     args     - Arguments for customer exe (required)
     exp      - Search string as regular expression (required)
                Example: exp="error;fail" will search for error and fail
     timeout  - Seconds before the plugin times out (default = 15)
     version  - Plugin version
     help     - Show this text
     debug    - Print details. NOT for use with nagios


Preferably the plugin is copied into the script directory where you will store your checks under Windows

When using NSClient ++ an entry in NSC.INI similar to this is generated:


allow arguments=true  
[/settings/external scripts/scripts] 
check_backup_log=check_output.exe path=d:\programme\logchecker.exe args=“-stringeval –files *.log“ exp=fatal


Check data security protocols for fatal error messages:

C:> check_output.exe path=d:\programme\logchecker.exe args=“-dir d:\logs\backuplogs –files *.log“ exp=fatal

CRITICAL: Match: D:\Logs\Backuplogs\Dienstagsicherung.log>
FATAL: SCSI-Timeout bei Zugriff auf Bandbibliothek 

Check with a small test script:

C:> check_output.exe path=C:\batches\date_time.cmd args=echo exp=bla

OK: No matches found

The contents of the file date_time.cmd are this:

echo %date:~0% - %time:~0,8% Uhr


1.1 – Support for .Net 4.0

1.0 – First public version


check_output is licensed under the GNU General Public License.


Joachim Luft will answer your questions to this plugin and is happy about your donation.

Freeware name


  • System: Nagios Plugins und Addons
  • Date: 06.July 2014
  • Author: Joachim Luft
  • Version: 1.1

Category: Monitoring/Nagios-Plugins

Tags: Windows-Plugin