Book Image

Learning Nagios 3.0

Book Image

Learning Nagios 3.0

Overview of this book

Table of Contents (16 chapters)
Learning Nagios 3.0
Credits
About the Author
About the Reviewer
Preface

Passive Checks — Services


Passive service checks are very similar to passive host checks. In both the cases, the idea is that Nagios receives information about host statuses over the external commands pipe.

As with passive checks of hosts, all that is needed is to enable the global Nagios option to accept passive check results, and also enable this option for each service that should allow the passing of passive check results.

The results are passed to Nagios in the same way as they are passed for hosts. A command to submit passive checks is PROCESS_SERVICE_CHECK_RESULT (visit http://www.nagios.org/developerinfo/externalcommands/commandinfo.php? command_id=114). This command accepts the host name, service description, status code, and the textual output from a check. Service status codes are the same as those for active checks — 0 for OK, 1 for WARNING, 2 for CRITICAL, and 3 for an UNKNOWN state.

The following is a sample script that will accept the host name, status code, and output from...