Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Sync Active Directory Contacts
Current Version
0.12
Last Release Date
2013-05-14
Compatible With
- Nagios 3.x
Owner
License
GPL
Hits
40221
Files:
File | Description |
---|---|
ad_sync_nagios.pl | ad_sync_nagios.pl |
run_ad_sync.bash | run_ad_sync.bash |
Perl script to synchronize Active Directory users to contact and contactgroup objects.
This works by:
1. All members of the group defined in “ALL_CONTACTS_GROUP” are fetched from “BASE_USER_DN” (recursively).
2. A contact object is created from each of the members. “mobile” and “mail” are used for the email and pager attributes in the object. The script will give a warning if either mobile or mail is undefined for the user.
3. All groups under BASE_GROUP_DN are fetched.
4. A contactgroup object is created for each group. The name is taken from ‘sAMAccountName’. All members of the group are defined under the attribute members.
5. If the flag “--gen_service” is passed to the script, a service object template is created for each of the groups, where the attribute contactgroup_name is set to the group name. This could be used as a template for services for which you want the group notified.
After each new contact or contactgroup is written a check is run by using the “–v” option. If errors are found the script will roll back the object if a previous version of the file existed, if not the file will be deleted. In either case the exit code for WARNING is given.
The Perl modules Net::LDAP, Getopt::Long and File::Copy are required for the script to run. The file paths should be adopted to your environment.
Written as part of our bachelor's thesis - "Monitoring is Key".
-MonKey, 2013.
This works by:
1. All members of the group defined in “ALL_CONTACTS_GROUP” are fetched from “BASE_USER_DN” (recursively).
2. A contact object is created from each of the members. “mobile” and “mail” are used for the email and pager attributes in the object. The script will give a warning if either mobile or mail is undefined for the user.
3. All groups under BASE_GROUP_DN are fetched.
4. A contactgroup object is created for each group. The name is taken from ‘sAMAccountName’. All members of the group are defined under the attribute members.
5. If the flag “--gen_service” is passed to the script, a service object template is created for each of the groups, where the attribute contactgroup_name is set to the group name. This could be used as a template for services for which you want the group notified.
After each new contact or contactgroup is written a check is run by using the “–v” option. If errors are found the script will roll back the object if a previous version of the file existed, if not the file will be deleted. In either case the exit code for WARNING is given.
The Perl modules Net::LDAP, Getopt::Long and File::Copy are required for the script to run. The file paths should be adopted to your environment.
Written as part of our bachelor's thesis - "Monitoring is Key".
-MonKey, 2013.
Reviews (0)
Be the first to review this listing!