With icinga2 one can use icingacli monitoring list
to get the monitoring results on the commandline.
I'm looking for the detailed output of the plugins/services (shown in icinga2 as 'plugin output', in icinga1 as 'status information').
With icinga2 one can use icingacli monitoring list
to get the monitoring results on the commandline.
I'm looking for the detailed output of the plugins/services (shown in icinga2 as 'plugin output', in icinga1 as 'status information').
I want to answer the question with an example:
icingacli monitoring list services --host=myHostName --service=myServiceName --columns "host,service,service_output" --format='$host$: $service$ ($service_output$)'
To get just the plugin-output (so, exactly what was asked for) for all services on the machine "myHostName" ( the "--host" parameter can even be omitted):
icingacli monitoring list services \
--host=myHostName \
--columns "service_output" \
--format='$service_output$'
The icingacli help is very good. One can get information and examples with:
icingacli --help # basic help
icingacli monitoring list --help # what information can you list
icingacli monitoring list services --help # what information can you get from the services