Synchronize custom scripts

Hey everyone,

For the past 6 months or so, I decided to setup some basic icinga2 monitoring for our in-house developed IT solutions. It’s head first into what I’ve experienced as a steep learning curve, but so far I’ve managed to read plenty of documentation, a lot of long days with tearing my hair out, but I have something that is somewhat simple, efficient, and fast, so no complaints there.

In order to probe these solutions, I have made some custom scripts that is required to run on agents.
As a result, I have setup a single Master node and multiple static Agents with no satellite in between.

Here comes my problem: The custom scripts I have made is not recognized on the agent, unless I place the executable manually in the pluginsdir on said agent.
Does the director allow to synchronize the actual executable from the master to the agents?
I’m well aware the director can synchronize command definitions, but as far as I can tell, it’s only the DSL and configs that is synchronizable.

Am I required to do a parallel deployment script in order to push my custom executables to all the agents, or is there a hidden feature somewhere that can just push the script to the agent from the master?

Thanks in advance.

It is possible but not recommended.

I use Ansible to deploy the Agent und the monitoring plugins with the roles from the Linuxfabrik.

This role also allows to install custom plugins.

We solved this with Saltstack - we sync a Git repo with all of our scripts to it:

https://docs.saltproject.io/en/latest/topics/tutorials/gitfs.html

Our state file looks something like this, along installing required Python libraries/yum packages, etc:

Icinga Plugins
  file.recurse:
    - name: /usr/lib64/nagios/plugins/
    - source: salt://your-git-fs-backend
1 Like