Absolutely. I was actually originally thinking about writing a wrapper around the rake task for Nagios which did govuk_setenv etc. and parsed the keyword at the beginning to set it's own exit code, but I don't see a reason not to make the Rake task exit with 2 (for critical) and pass through that exit code in the wrapper.