Just about everything you need to know can be found in the following
In a nutshell:
Your relevant output is limited to one line, up to the first new-line (or
1024 characters, whichever comes first.)
Everything after the first line is discarded.
The key is to set the exit code of your shell script to one of the
3 (Unknown Error)
In shell script, just use the "exit" command, like:
exit 0 # Success
exit 2 # Critical error
That's about all there is to it.
> I'll have to preface this that I'm a beginner at both Nagios, and Creating
> plugins. We have a small deployment in our office, and I'm trying to get
> it tomonitor our RADIUS servers.
> We initially wanted to use the check_radius_adv plugin, but we found that
> wasn't capable of performing a full EAP conversation. (If it is, please
> me so I don't reinvent the wheel here)
> Poking around, I found that wpa_supplicant includes a utility called
> EAPOL_TEST which DOES perform a full EAP conversation with the RADIUS
> Here's where i get stuck...
> What should I be returning Nagios? Right now I have it as a simple (5
> shell script. All it really does is dump all the program output of
> into /dev/null and return a pass or fail. (eapol_test returns a 1 if
> or 0 if bad, so i just stuck it in an IF statement)
> There is a wealth of information that is in the program output. (Round
> times, exact error of why EAP failed) I just don't have the skill to
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> opinions on IT & business topics through brief surveys - and earn cash
> Nagios Plugin Development Mailing List
> Unsubscribe at
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null