racker/virgo — pull request #336 by Kami (2013-01-22 23:29:39+00:00)
Title: [RFC] If a check exists with non-zero exit code, but a status message is provided, use it instead of using the default one

Currently if a plugin exists with non-zero exit code, but a status message is provided we discard the provided message and override it with the default non-zero exit status message (e.g. `Plugin exited with non-zero status code (code=100)`).

I think that's not OK, because I imagine a lot of times people will intentionally exit with non-zero status code and provide a status message which will contain a reason for exiting with non-zero.

Open questions:

- Do other people agree that the pattern I described above is a good one and we should support it? If not we should talk about the alternatives.

- Should we add `exit_code` as a special metric to the check in case check exists with non-zero status code.

Note: Adding this metric currently doesn't make a lot of sense anyway, because this metric is inaccessible. Currently in the CEP we have a default if statement which short circuits if `state != available`. It's just something to think about.

Note: To reduce noise, please constrain yourself from actually commenting on the code style / etc. until we agree on a solution. I just provided it a a prototype / reference implementation so it makes it easier to talk about.