On Monday 04 March 2019 at 22:37:37, Ivo Kidze wrote:

> Hi Antony,
> 
> Try the following as system sudo user or system root user
> 
> 1. ICINGA2_API_PASSWORD=api_user_password icinga2 console --connect
> 'https://api_user@localhost:5665/' 2. s =
> get_service("hostname","icinga_internal_servicename").last_check_result 3.
> s

Thanks, that helped me track down (and fix) the problem.

It turned out to be a discrepancy between a service check_command and the 
service name.

For all the examples I had which were working, these were the same.

For all the examples I had which were broken, they were different.

I then realised that I had been trying to get the check result for a 
check_command, and instead I had to reference its name, which had not been 
apparent to me when they matched :)


Thanks,


Antony.

-- 
The Magic Words are Squeamish Ossifrage.

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to