email notification when LDAP connection is broken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 09:35 AM
Is there a way to generate an email notification when the connection between ServiceNow and the LDAP server breaks? We recently had this issue and I saw entries in the LDAP logs when the scheduled group and user imports tried to run:
2013-07-08 00:00:13InformationLDAP Processing RDN and rangeLDAP
2013-07-08 00:00:23InformationCommunication error: [server URL]LDAP
2013-07-08 00:00:23InformationLDAP Processing RDN and rangeLDAP
2013-07-08 00:00:23Information[server URL]LDAP
2013-07-08 00:00:23Informationjava.net.SocketTimeoutException: connect timed outLDAP
2013-07-08 00:00:33Information[server URL]LDAP
2013-07-08 00:00:33Informationjava.net.SocketTimeoutException: connect timed outLDAP
2013-07-08 00:00:33InformationCommunication error: [server URL]
Is there a way I can use this information to generate an email notification or create an event when this information is generated? Or is there a better way to detect a broken connection?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 12:36 PM
Off the top of my head, you could create a Business Rule against the syslog table to detect when the error occurs, then biz rule calls gs.eventqueue to generate the email notification. (After rule, Insert only, condition filtered for Source = LDAP & Message contains 'connect timed out').
My concern is the performance impact of a biz rule against syslog table if there's a lot of volume being written to it. It might be fine, I've just not researched this much yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2013 03:11 PM
Thanks, I'll test it out. I also found a business rule called Update Import Set Complete, so I'll see if I can use that as a template of sorts for an incomplete or cancelled import set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2013 12:46 PM
Email notification is a great idea. I'm going to put this into the development backlog for a future release. Thanks for the suggestion.
Since syslog is a very busy table, I wouldn't really recommend running a business rule on it. A better solution would be to create a scheduled job script to replicate the LDAP server "test connection" ui action every 5 minutes or so. The script would perform a test connection then fire an event (you'd need to add a custom event registry), the event would trigger the email notification to admins letting you know connection was lost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2013 02:32 PM
Here's a followup with some detailed steps.