The application is based on a floating / roaming task execution system, but what tasks are we talking about and what does this floating actually mean?
- sending out emails
- LDAP synchronization
- doing the actual synchronization and documenting changes
Those two tasks need to be check constantly and every time a task is due – e.g. send out an email or searching and finding current changes in Active Directory – will only happen if at least one workstation has the application open.
This is simply due to the fact that there is no central management service behind all of this – at least one workstation therefor needs to have the IT Assets management Microsoft Access application open in order to execute those tasks.
If all applications are closed, the reminders will be send out shortly after the first user opens the application and the Active Directory synchronization will happen then as well – if a change was made and undone within that time window, it would not be detected.
How can you assure that there is always someone having the database open and the e.g. Active Directory synchronization is actually happening?
Good question – the answer is you use your monitoring solution with the following or a similar SQL query against the database and make sure everything is fine. The following script can easily be used in Paessler PRTG – just copy it to the SQL script folder and add a Microsoft SQL v2 sensor and set the error limits to “Lower Error Limit” is “1” for both “LDAPSyncFinishedWithinTime” and “ActiveUsers” – so you get alerted when there are not enough users online or the LDAP synchronization did not happen.
(SELECT Count(UserId) FROM tblUsersLastSeen WHERE DATEDIFF(n,LastSeen,GETDATE()) < 3) AS ActiveUsers,
(SELECT Count(ID) FROM tblLDAPLog WHERE LogText LIKE 'LDAP sync finished on %' AND DATEDIFF(n,CreatedDate,GETDATE()) < ((SELECT CAST(ParameterValue AS int) FROM SysConfig WHERE ParameterGroup = 'LDAPSync' AND ParameterSubGroup = 'IntervalInMinutes')*2)) AS LDAPSyncFinishedWithinTime