Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Jython Libraries and Utilities
Several utility scripts are used widely in adapters. These scripts are part of the AutoDiscovery
package and are located under: C:\UCMDB\DataFlowProbe\runtime\probeManager\discoveryScripts with the other scripts that are downloaded to the Probe.
Note The discoveryScript
folder is created dynamically when the Probe begins working.
To use one of the utility scripts, add the following import line to the import section of the script:
import <script name>
The AutoDiscovery Python library contains Jython utility scripts. These library scripts are considered DFM's external library. They are defined in the jythonGlobalLibs.xml
file (located in the Configuration Files folder).
Each script that appears in the jythonGlobalLibs.xml
file is loaded by default at Probe startup, so there is no need to use them explicitly in the adapter definition.
This section includes the following topics:
The logger.py script contains log utilities and helper functions for error reporting. You can call its debug, info, and error APIs to write to the log files. Log messages are recorded in C:\UCMDB\DataFlowProbe\runtime\log.
Messages are entered in the log file according to the debug level defined for the PATTERNS_DEBUG appender in the C:\UCMDB\DataFlowProbe\conf\log\probeMgrLog4j.properties file. (By default, the level is DEBUG
.) For details, see Error Severity Levels.
##################################################################### ################ PATTERNS_DEBUG log #################### ##################################################################### log4j.category.PATTERNS_DEBUG=DEBUG, PATTERNS_DEBUG log4j.appender.PATTERNS_DEBUG=org.apache.log4j.RollingFileAppender log4j.appender.PATTERNS_DEBUG.File=C:\UCMDB\DataFlowProbe\runtime\log/probeMgr-patternsDebug.log log4j.appender.PATTERNS_DEBUG.Append=true log4j.appender.PATTERNS_DEBUG.MaxFileSize=15MB log4j.appender.PATTERNS_DEBUG.Threshold=DEBUG log4j.appender.PATTERNS_DEBUG.MaxBackupIndex=10 log4j.appender.PATTERNS_DEBUG.layout=org.apache.log4j.PatternLayout log4j.appender.PATTERNS_DEBUG.layout.ConversionPattern=<%d> [%-5p] [%t] - %m%n log4j.appender.PATTERNS_DEBUG.encoding=UTF-8
The info and error messages also appear in the Command Prompt console.
There are two sets of APIs:
-
logger.<debug/info/warn/error>
-
logger.<debugException/infoException/warnException/errorException>
The first set issues the concatenation of all its string arguments at the appropriate log level and the second set issues the concatenation as well as issuing the stack trace of the most recently-thrown exception, to provide more information, for example:
logger.debug('found the result') logger.errorException('Error in discovery')
The modeling.py script contains APIs for creating hosts, IPs, process CIs, and so on. These APIs enable the creation of common objects and make the code more readable. For example:
ipOSH= modeling.createIpOSH(ip) host = modeling.createHostOSH(ip_address) member1 = modeling.createLinkOSH('member', ipOSH, networkOSH)
The netutils.py library is used to retrieve network and TCP information, such as retrieving operating system names, checking if a MAC address is valid, checking if an IP address is valid, and so on. For example:
dnsName = netutils.getHostName(ip, ip) isValidIp = netutils.isValidIp(ip_address) address = netutils.getHostAddress(hostName)
The shellutils.py library provides an API for executing shell commands and retrieving the end status of an executed command, and enables running multiple commands based on that end status. The library is initialized with a Shell Client, and uses the client to run commands and retrieve results. For example:
ttyClient = Framework.createClient(Framework.getTriggerCIData(BaseClient.CREDENTIALS_ID), Props) clientShUtils = shellutils.ShellUtils(ttyClient) if (clientShUtils.isWinOs()): logger.debug ('discovering Windows..')
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to cms-doc@microfocus.com.
Help Topic ID:
Product:
Topic Title:
Feedback: