How to implement a return code?


#1

Thanks in advance.

I am creating a shell script that collets data from the system and prints the output , yet I don’t know how to implement a return code that indicates wheather it is in a critical state or not.

It is easy to implement a return code in a passive state, because it is done by just writing the return code into a file to be sent to Nagios.

Please let me know How to inform Nagios of its state.

Sorry for my terrible English


#2

Maybe your answer is in the utils.pm utils.sh files in libexec.