Runs on: Linux
Command Dependencies: "which" & "wget"
Audience: Automated troubleshooting using iMonitor. Adapt script to cater for many situations where iMonitor is required for automation.
This utility will allow a cross reference check between two objects against specified attributes using iMonitor.
There used to be a utility around that could check the reference between user and group objects. This utility will check the reference between any object types, even for hidden schema attributes.
- Specify a source (initial) object name and the attribute which contains a list of objects to check, e.g. a group and the group's "member" attribute
- Specify the attribute on the object referenced by the "member" attribute, which should contain the name of the source/initial object, e.g. groupmembership
The problem: There is a GroupWise object which reports -618 errors due to users in the Member attribute not being cleared when the user is deleted.
Example of how this works: The util gets a list of the users listed in Member attr on the GroupWise object "PO1" (from a specified server, IP address), then checks that server and each other server listed (on command-line or from serverlist file) to see if those users have a "Reference" attribute value of "PO1".
- This version uses the &ref tag to make all requests through the first server listed
- Will auto-check the schema to see if the attribute on the remote object is hidden. If so use an additional URL request to get the data, because we need the object entry info as well, which is not provided when requesting specific attributes. (iMon enhancement logged against this.)
-n [name_of_initial_object] the TREE name is required!/
-a [attribute_name] on the initial object. (Case Sensitive)
-r [referenced_attribute_name] on the objects being checked/ (Case Sensitive)
-s [DNS_server_OR_ipaddress] of all servers to contact for checking. Separated by ; or ,
-f [Filename] listing servers to contact. Place each servername or IP Addr on a new line. (Overrides -s)
-p [iMonitor_port] Default is (8028). Must be the non-SSL port!
-k Report report all Values Details on the referenced object/s. Default is OFF
-x Use this option, instead of -w, to use the password hard-coded in the script
(Used for command-line privacy).
-z Don't clean up the temporary working directory '_tmpwget' after execution
-d Append the date and time to the output file name to make the file unique
-e If no errors are reported only create an empty file called 'lastrun_<date_time>'
(There will be max one 'lastrun' file)
Example: ./refchecker.pl -n "group1,services,acme,novell,TEST1" -a "Member" -r "group membership" -u "admin.novell" -w "novell" -s "10.10.10.1,10.20.10.50,10.30.10.70" -o group1-refs.txt
Specify the name of the initial object to be checked. This object could be a Group, GroupWise Post Office or ZEN application.
Feedback: If you have other requirements let me know, if it sounds like a good idea I can adapt the code to cater for that situation.
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.