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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
iam33
Posts: 58
Joined: Mon Mar 18, 2013 5:30 am

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

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

there isn't the ability to do wildcards in this spot, you would need to loop through all hosts
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
iam33
Posts: 58
Joined: Mon Mar 18, 2013 5:30 am

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

Post by iam33 »

thank U so much!

It's what I thought ...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

iam33 wrote:thank U so much!

It's what I thought ...
No problem

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked