Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Allow using a specific EMI and add an output option to write a file Nagios can parse #99

wants to merge 2 commits into


None yet
2 participants

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?

Tom Ellis added some commits Oct 23, 2012

@tomellis tomellis referenced this pull request in monolive/nagios-eucalyptus Oct 23, 2012


Nagios Eutester checks #1


viglesiasce commented Oct 24, 2012

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.
More info can be found here:

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.
I'd rather read that in from a file than call eutester directly from Nagios. Currently, I just parse the results file for a PASS or FAIL based on the output created with my patch.
We could get Nagios to run the eutester script directly, in which case the test would need to return specific retvals that nagios can interpret:


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.


viglesiasce commented Nov 14, 2012

Hey @tomellis,

Can you use the following as a regex:
RESULT: failed


viglesiasce commented May 22, 2013

Fixed in latest instancetest.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment