Custom special agent not able to call file in libexec folder

I just remembered that we first installed the ultimate MT package by mistake on this server.

When we realized quite quickly, we removed the site and MT package, then reinstalled the normal ultimate package and recreated the site.

Maybe there is a leftover of the MT setup somewhere … I won’t have time today but I’ll test tomorrow on another VM and let you know. I just hope that if it’s the reason we can backup and re-import the backup without bringing the issue with the backup import, as have now quite a lot of time invested in this configuration and I don’t want to really restart from scratch.

Ahhhhh. Indeed there might be something leftover. Anyway, if that’s the case, it’s a bug I’ll forward to dev.

Backup and restore of 2.5.0p3/p4 works very well on the command line with omd backup and omd restore. I just hope, the leftover is in the config for the omd command. Experiencing the same issue on a freshly created site seems to point in that direction.

I finally figured it out …

It was working on the new server with a test site, but when I imported my site backup it was not working and gave a very interesting error:

[special_hellospecial] Relay client: Task timed out received from Relay Internal API. Possible causes: Relay or host is unreachable, host timeout or invalid configuration. Please check relay connectivity, host status and your configuration.(?)

The folder where the host is located has “Monitored on relay” enabled, but the host is configured to not inherit this and has the “Monitored on relay” property explicitly set to “No relay”. This obviously doens’t work the host is still trying to be monitored with the relay and (I didn’t notice before) still has the labels [cmk/relay:], [cmk/relay_monitored:yes]

So in the end the bug has nothing to do with special agents (it just happened that this was the use case I had of a host with a special agent in this folder), but the relay setting is not properly overwritten at the host level when it’s configured at the folder level.

Oh, that’s an interesting find. The bug here is clearly that there is no error message like: “Hey, you are trying to execute a special agent that is not available on the relay!”

The relay currently only executes special agents shipped via the relay. We might enable a selection of special agents from the Exchange later.

Yes that would be one improvement to have this warning but I think the main bug is that the “Monitored on relay” property set on the host should overwrite what is set on the folder (that’s the usual behaviour for all other properties).