Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow using a specific EMI and add an output option to write a file Nagios can parse #99
These commits have been used to help use the instancetest.py as part of a Nagios check on cloud availability.
First commit adds the option to specify a particular EMI with --emi . This is useful when running the basic instancetest.py on a regular basis as you may not want it to pick a random EMI. It defaults to the original behaviour of picking a random instance-store backed EMI.
The second commit adds an output option --nagios to output a PASS or a FAIL into /tmp/results. I parse this results file with a Nagios check script. I'm open to other ways to adapt that so it's useful in other tests. Perhaps using the --xml output and using something to parse the junit style xml output?
Thanks @tomellis This is a great use case for eutester.
A few notes:
Our procedure for pull requests is to submit to the testing branch then things will get merged to master along with a version bump once we know they are good. So we will need to get you to resubmit your request.
We have been doing lots of work in the testing branch on consolidating our test harness class (EutesterTestCase). That case has changed quite a bit since the last version. I have baked in your fix for --emi flag in this commit: bda8b1e . Please let me know if that works for you.
On the nagios front, what is the required output? Would it be required for each testcase in a testscript or just for the whole script? We can probably bake this straight in EutesterTestCase with a flag for --nagios.
Thanks @viglesiasce for adding in the emi flag.
For Nagios, we really just need a result to grok with a nagios check script.
Any info returned on stdout is passed back to the plugin in Nagios too, these tend to be useful messages such as "FAIL: Eutester tests failed to complete successfully" or something similar.