CLI for icinga checks on a specific service

Hi,

I am on RHEL 7 please advise how I can do a Icinga check using the CLI for a particular service. I need to do a “check now” for a particular service on a bunch of hosts where it is in pending status. Thank you.

if you use the monitoring module:
icingacli monitoring list services --service=*weather*
the check now does not work with that.

you could use icinga2 api or icingaweb2 api to trigger the check now and fetch the result.

TY. I’ve been googling but can’t find it…please share the cli. I appreciate it.

When a host is permanently in pending state then you have an issue. Forcing any check would not work.

When I click the service check, it gives me a “pending” when I click that “pending” to “check now” the check goes through and it becomes green…I’d like to automate this please