lfops icon indicating copy to clipboard operation
lfops copied to clipboard

role:monitoring_plugins: Make it faster when deploying MP from source

Open markuslf opened this issue 1 year ago • 0 comments

Not idempotent, but much faster would be to use a pure shell command on localhost and do something like this (pseudo-code):

rsync --archive --rsync-path='sudo rsync' path/to/lib/*.py $target:/usr/lib64/nagios/plugins/lib/
for plugin in plugins:
    rsync --archive --rsync-path='sudo rsync' path/to/monitoring-plugins/check-plugins/$plugin/$plugin $target:/usr/lib64/nagios/plugins/
}
sudo /usr/sbin/restorecon -r /usr/lib64/nagios/plugins

Would just run a few seconds or so (instead of up to 500 seconds as of now). What do you think?

markuslf avatar Jun 24 '24 09:06 markuslf