Yes I do. A plugin is run on a schedule by Nagios, usually every 5 minutes. Nagios (in C-lingo) uses, I believe, execv() to run the plugin and capture the output and exit code. The code is used to determine the state of the host/service that the plugin is ran for.MaxHeadroom wrote:When you say "Exit code", you don't actually mean the plugin exits, do you?tmcdonald wrote:The exit code of 0 through 3 determines the OK, WARNING, CRITICAL, or UNKNOWN status
Then you should either create dozens of services, one for each different type of threshold, or you should code your plugin in such a way that it considers all of those thresholds and knows what to do with them.MaxHeadroom wrote: These look like command line options. What if I have dozens of thresholds? thanks for the great dialog.
Randy
If you are familiar with the UNIX philosophy of things, it's "Write programs that do one thing, and do it well". Plugins should be written this way. They should be only as configurable as they need to be - if an email-checking plugin starts considering DHCP offers, it is probably time to split it into two plugins. In your case, with that many thresholds I almost wonder if your plugin is doing too much.