Page 1 of 1

How to check a service in all hosts with external commands?

Posted: Mon Feb 25, 2019 7:01 am
by iam33
Hi!!
thanks in advance!

I would like to schredule to check an service in ALL hosts (with externals commands).
would it be posible with "*" ?
I can´t find an external commnad that doesn´t need enter the host name like:

Code: Select all

 echo "[%lu] SCHEDULE_SVC_CHECK;*;Disk space;1110741500\n" `date +%s` > /opt/nagios/var/rw/nagios.cmd
thats writes in log:

Code: Select all

[1551095994] Error: External command failed -> SCHEDULE_SVC_CHECK;Disk space;1110741500\n 1551095994
[1551095994] External command error: Command failed

Re: How to check a service in all hosts with external comman

Posted: Mon Feb 25, 2019 5:52 pm
by scottwilkerson
there isn't the ability to do wildcards in this spot, you would need to loop through all hosts

Re: How to check a service in all hosts with external comman

Posted: Tue Feb 26, 2019 7:59 am
by iam33
thank U so much!

It's what I thought ...

Re: How to check a service in all hosts with external comman

Posted: Tue Feb 26, 2019 8:02 am
by scottwilkerson
iam33 wrote:thank U so much!

It's what I thought ...
No problem

Locking thread