Closed tfhartmann closed 9 years ago
Hi Tim,
Thanks for contributing!
The argparse bits look good, but the return code should stay as 3 for bad arguments, as per http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN76 .
I'll merge your argparse change later today, if I can figure out how to keep the 3 return value, so we're following the nagios plugin dev guidelines. :-)
Cheers, Frode
Hey Frode, thats great! I'll take a look also and see if I can come up with something as well.
From memory, I couldn't figure out the return value. Since I've left this PR to linger for a while and it has conflicts now, I'll close it..
Updated script to use the argparse python module, which prints a slightly nicer example and usage message, and puts some of the logic into the arparse object
This does change the default output when arg's are wrong from exiting 3 To exiting to a '2' state
I would have suggested merging it into a separate branch to check it out, but I wasn't sure how to request that in a Pull request.