Debug log on the fly

reading the documentation I came across this functionality:

https://icinga.com/docs/icinga-2/latest/doc/15-troubleshooting/#enabledisable-debug-output-on-the-fly

it says that:

In case of an HA zone, the following API examples toggle the feature on both nodes.

  • Is it possible to only trigger this on one node in case of HA?

  • Is it possible to write the logfile for nodeA to a different path than nodeB?

    • or use the nodename in the filename?

Best Regards
Nicolas

Thanks for checking out some of the newer debugging features. Unfortunately, the answer to most of your questions would be no.

In the current architecture, the object will be synchronized. Thus, no.

The log files would be created on the given path on both machines. Technically, this might be another path, but this smugness would not be the desired answer.

However, you could create a template for this very use case, setting the filename based on the NodeName. This template could be given to the object creating API call with the template parameter. In theory, this should work, but I have not verified it.

Please excuse this not so promising answer.

the template file approach works, even with an implementation of a director hook:
Icinga\Module\Director\Hook\ShipConfigFilesHook

Thanks for the fast response

Best Regards

Nicolas