It can be done, but not completely. If you’re using external script to make an output you can exit the script with the printf output which can contain newline characters like this:
whose output normally would be :
But… (there’s almost always this but… )
Nagios will type only:
in it’s output in service status detail page. But when you hit the service link of particular service for which you’ve typed multiline output, in it’s service State Information will appear both lines like you’ve expected:
So, if that satisfies you, then it can be done, but if you wanted to display multiline output in Service Detail page, then I think you’re out of luck. The only possible solution for Service detail to have multiline output is to have a long line which automaticaly breaks into multiline output, and that only because it can’t be displayed on the monitor due to resolution limitation.
All this is tested in version 3.0.2, I don’t think it will work for version 2 of Nagios