/usr/local/nagios/bin/opsview_sync_ldap is a script to run nightly as the nagios User to make changes to the list of Users based on the LDAP directory. This includes which Role they have for authorisation purposes. It goes through the following steps:
Parse LDAP connect information from opsview_web.yml and opsview_web_local.yml
Connect to LDAP with the specified binddn and bindpassword
Read each group file from the specified directory
For each group, get a list of Users in that group. Find those Users and expand the group XML file based on attributes for that User
If specified at command line, commit changes and remove Users that do not belong in any of the groups
If a change has been made, initiate an Opsview Monitor reload.
This will create Users and set their contact information based on the XML data. If the User already exists (based on the Username), then his details will be updated.
Note: If you have manually added Users into Opsview Monitor for the ldap realm and then wish to use the sync script, run it without the -y option (to ignore making changes); this is because it could remove existing Users if your group permissions in LDAP have not been set up correctly.