Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
This all looks correct, the next thing I would suggest would be to turn on nagios debug log in the nagios.cfg and see if you can see what is being received when the command is run
[1534411627.327299] [016.0] [pid=215878] ** Handling ACTIVE async check result for service 'database-backup-age' on host 'SQLSERVER' from 'Core Worker 215895'... [1534411627.327313] [016.1] [pid=215878] * OPTIONS: 1, SCHEDULED: 1, RESCHEDULE: 1, EXITED OK: 1, RETURN CODE: 0, OUTPUT:
OK
[1534411627.327328] [001.0] [pid=215878] get_service_check_return_code()
[1534411627.327339] [016.1] [pid=215878] Service is OK
[1534411627.327350] [016.1] [pid=215878] Service was OK at last check.
[1534411627.327360] [016.1] [pid=215878] Service is still OK.
[1534411627.327372] [001.0] [pid=215878] check_for_service_flapping()
[1534411627.327383] [016.1] [pid=215878] Checking service 'database-backup-age' on host 'SQLSERVER' for flapping...
[1534411627.327394] [016.1] [pid=215878] Service is not flapping (0.00% state change).
[1534411627.327408] [001.0] [pid=215878] check_for_host_flapping()
[1534411627.327419] [016.1] [pid=215878] Checking host 'SQLSERVER' for flapping...
[1534411627.327430] [016.1] [pid=215878] Host is not flapping (0.00% state change).
[1534411627.327468] [016.1] [pid=215878] Rescheduling next check of service at Thu Aug 16 12:57:07 2018
This is strange.
The output is OK from command line but Nagios gets just an "OK" ??
Try running the command from the command line and add "| hexdump -C" at the end to make sure there are no "special" characters that Nagios "chokes" on.