Integration – Monitoring Tools – Command Line Interface

Configure and run the Command Line Interface (CLI) Utility

The PuzzleLogic Command Line Interface (CLI) Utility is accessed through the script that is packaged in the PuzzleLogic Agent archive file agent-XXXXXX.tar.gz.

IMPORTANT: The CLI Utility requires Python 2.6.x or 2.7.x and the Python "requests" module. You can use the command sudo pip install requests to install the Python module.

Configure the PuzzleLogic CLI Utility

  1. Navigate to the directory where you extracted the PuzzleLogic Agent archive file; for example ~< PL_Agent_directory >/plviewer-agent-XXXXXX.
  2. Open the file (located in the /bin subdirectory) in a text editor and modify the severity mappings located in the Severity to Priority Mappings section of the file. For each data source, the severity values must be mapped to one of the valid values used by Service Advisor: Low, Medium, High, or Critical.In the example below, the values (warning, minor, major and critical) listed on the left side of the equal sign are values from a data source; those on the right side (Low, Medium, High or Critical) are the values used by PuzzleLogic Service Advisor. Note that the severity values used by PuzzleLogic Service Advisor must be capitalized.
    • severity.warning=Low,3
    • severity.minor=Medium,2
    • severity.major=High,1
    • severity.critical=Critical,0

    If the data source has severity values of informational, success, warning, error, and failure, the mapping might look like the following. Note that you can map multiple values to the same PuzzleLogic value, if needed.

    • severity.informational=Low,3
    • severity.success=Low,3
    • severity.warning=Medium,2
    • severity.error=High,1
    • severity.failure=Critical,0
  3. (Optional) Modify the port that the Agent will use to listen on, if needed. By default, the Agent uses port 8083. If you wish to use a different port, add the following line to the file:
    server.port= <port number>
  4. Re-start the PuzzleLogic Agent.
    $ ./ start

Run the PuzzleLogic CLI Utility

IMPORTANT: Make sure the PuzzleLogic Server and PuzzleLogic Agent have been be properly installed and configured before you run the CLI Utility.

To import a message with the CLI Utility, run the script with the parameters listed in the table below:

NOTE: Use the --help (-h) option to display help for using the CLI Utility. Always use proper quoting per shell convention to enclose parameter values.

Example 1:

$  --source=“IBM Tivoli Netcool” --type=“event”  --summary=“This is a test event from Netcool.” --severity=“WARNING” --attributes=“region='CA', hostip=''” --status=“open”  --timestamp="1416529249000"

Example 2:

$  -s “IBM Tivoli Netcool” -t “event”  -m “This is a test event from Netcool.” -v “WARNING” -a “region='CA', hostip=''” –u “open”  -c "1416529249000"
Parameter Description Type Required?
--source (-s) System or tool that the event is generated from. String Y
-- type (-t) Type of message.

Valid values: Event, Log, Incident, Problem, or Change

String Y
--summary (-m) Summary of the event that occurred. String Y
--objectname (-n) Name of the CI or service the event is associated with.

In order for the event to be associated with the CI, the name of the CI must match what is on record in PuzzleLogic Service Advisor.

String Y
--id (-i) Unique identifier of the event from the data source. String N
--details (-d) Detailed description of the event that occurred. String N
--severity (-v) Level of severity. The severity values from each data source needs to be mapped to the appropriate PuzzleLogic Service Advisor values (Low, Medium, High or Critical) in the file. String N
--status (-u) Event status.
Valid values: Open, Completed, Cancelled or Closed.
String N
--timestamp (-c) Timestamp of when the event occurred. Measured in milliseconds from 1/1/1970 00:00:00. Integer N
--attributes (-a) String composed of key/value pairs separated by commas.

Attributes appear in the Details field of the message.

String N
NEXT: Add a data source