Why sync_monitoringscripts.yml takes longer to finish in opsview 6.7.5?
Symptoms Copied
- sync_monitoringscripts.yml takes much longer to complete in opsview 6.7.5 and later
Cause: Enhanced Security Copied
On Opsview version 6.7.5 we have added a security feature where it has to work in an entirely new way, but slower, rsync has been removed as it needs NOPASSWD sudo access, whereas now it uses built-in ansible functionality, which takes longer to complete, therefore if you need to copy over just a specific folder you can use the below command
Solution: rsync Copied
If you need to rsync a folder when you create/modify your plugin, simply use the below command:
rsync -avzh /opt/opsview/monitoringscripts/plugins root@<x.x.x.x>:/opt/opsview/monitoringscripts/plugins
x.x.x.x will need to be replaced with your opsview IP address as per your host respectively.
rsync options: -h is outputs numbers in a human-readable format -v is verbose -z is to enable compression -a indicates archive mode. -a option does the following,
- Recursive mode
- Preserves symbolic links
- Preserves permissions
- Preserves timestamp
- Preserves owner and group
we require this, as opsview needs to identify them.
OR
Alternatively, you may use the below:
prerequisite being having the latest support scripts, run the legacy_sync_monitoringscripts playbook.
legacy_sync_monitoringscripts has been updated, you can get the latest version by running
curl -sLo- https://downloads.opsview.com/opsview-support/legacy-sync-monitoringscripts.shar | sudo bash -s -