RefChecker v1.0

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.

Example:




  1. 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


  2. 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.)



Utility Syntax:



-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)

-u [username_for_iMonitor_login]

-w [password_for_iMonitor_login]

-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!

-o [output_file]

-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.
Attachments

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2008-02-18 21:20
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.