Bad return of icinga2 command


I got a problem with my command output:

It return “Icinga 2 has been running for 10 minutes and 5 seconds. Version: r2.10.3-1” but it’s didn’t supposed to return this.

I used a script located in “/usr/lib/nagios/plugins/” and i configured it like this:

and a template command:

thanks for reply !


first you import “icinga-check-command” twice. In your template and in your command.
Can you please post the output of icinga2 object list --type command --name 'check-container-cpu'


Hello Carsten !
Thanks for your reply. I finally found a solution but i DON’T KNOW where was the probleme: probably when i choose the wrong zone.

But I ask me a question: why mandatory add a template for creating a service ?

Service Template gives few additional controls. Over single service

The downside is if you use 1 template for 2 single service and you want to change the sampling interval for one of the service - then you are in trouble. But that is how icinga is architect ed - just a matter of getting used to it

If there is a common field / custom field you may want to change across all your service - you don’t have to change on all single service - but just on the template and you are done. Thats a huge benefit.

1 Like

Yes i understand but i think that we should have choice between using templates or not. Because as for me, I got a command which can be used like this: “ -n NAME” and different options like, -ir, -m etc … so i create a templates with “-n” mandatory argument and many with this options commands herited from my templates.
But in my situation i don’t need a service template because i just associate a service with a command.