Bootstrap FreeKB - Introscope - Getting Started with Command Line Workstation (CLW)
Introscope - Getting Started with Command Line Workstation (CLW)

Updated:   |  Introscope articles

This assumes the Enterprise Manager is running.

Command Line Workstation, or just CLW, is Introscope's command line tool that lets you perform certain tasks on the command line. Following is an example of how to issue a command using CLW. 

cd <EM_root>/lib

java -Duser=<your username> -Dpassword=<your password> -jar CLWorkstation.jar help

 

The help command should display something like this, which is the listing of the various Command Line Workstation commands.

Command Line Workstation Commands:
(activate|enable) report templates matching [REGULAR EXPRESSION] in management modules matching [REGULAR EXPRESSION]
(activate|enable) triage map groups matching [REGULAR EXPRESSION] in management modules matching [REGULAR EXPRESSION]
(activate|enable) snmp collections matching [REGULAR EXPRESSION] in management modules matching [REGULAR EXPRESSION]
(activate|enable) differential controls matching [REGULAR EXPRESSION] in management modules matching [REGULAR EXPRESSION]
. . .

 

If you are able to successfully connect, IntroscopeEnterpriseManager.log should have the following.

Command Line Work Station User "john.doe" connected successfully from host "Node=Workstation_1623, Address=localhost/127.0.0.1:52242, Type=socket"

Command Line Work Station User "john.doe" disconnected successfully from host "Node=Workstation_1623, Address=localhost/127.0.0.1:52242, Type=socket"

 

On the other hand, if you are not able to connect, IntroscopeEnterpriseManager.log should have something like this. You may want to configure Command Line Workstation to log events at log level DEBUG.

Failed to connect to the Introscope Enterprise Manager at server1@5001 (1) because: java.net.ConnectException: Connection refused (Connection refused)

 


Username / Password

Notice Command Line Workstation requires the -Duser and -Dpassword options. The username and password should be defined in users.xml or LDAP and realms.xml should be configured to get users from users.xml or LDAP.

 


MoM (Manager of Managers) vs. Collector

When first getting acquainted with CLW, it is usually best to issue CLW commands on the server that is running the collector. In other words, you wouldn't want to start by issuing commands on the Manager of Managers (MoM) server. Once CLW is working as expected on the collector, you can then try the same on the MoM. One way to do this would be to used the -Dhost option, like this.

java -Duser=<your username> -Dpassword=<your password> -Dhost=<your collector server> -jar CLWorkstation.jar help

 

However, a better approach is to define the collector servers in <em root>/config/IntroscopeEnterpriseManager.properties. In this example, CLW commands run on the MoM would run against server1. In this scenario, there is no need to use the -Dhost option.

introscope.enterprisemanager.clustering.login.server1.host=server1
introscope.enterprisemanager.clustering.login.server1.port=5001
introscope.enterprisemanager.clustering.login.server1.publickey=example.crt

 

If you have two or more collector servers, you will also want to define the collector servers in <em root>/config/loadbalancing.xml. In this example, there are two collector servers (collector1.example.com and collector2.example.com), and each collector servers will load balancer server1.example.com and server2.example.com.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<loadbalancing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="loadbalancing0.1.xsd">

<agent-collector name="collector1.example.com">
  <agent-specifier>server1.example.com\|.*\|.*</agent-specifier>
  <agent-specifier>server2.example.com\|.*\|.*</agent-specifier>
  <include>
    <collector host="collector1.example.com" port="5001"/>
  </include>
</agent-collector>

<agent-collector name="collector2.example.com">
  <agent-specifier>server1.example.com\|.*\|.*</agent-specifier>
  <agent-specifier>server2.example.com\|.*\|.*</agent-specifier>
  <include>
    <collector host="collector2.example.com" port="5001"/>
  </include>
</agent-collector>

 

When using this approach, IntroscopeEnterpriseManager.log on the MoM should show a successful connection to the collector server.

mm/dd/yy hh:mm:ss [INFO] [Manager.Cluster] Connected to the Introscope Enterprise Manager at server1@5001

 

To put this another way, you want to ensure that IntroscopeEnterpriseManager.log does not have "failed to connect".

mm/dd/yy hh:mm:ss [WARN] [Manager.Cluster] Failed to connect to the Introscope Enterprise Manager at server1@5001 (1) because: java.net.ConnectException: Connection refused (Connection refused)

 

Note that the server name (server1 in this example) is defined in <em root>/config/loadbalancing.xml, like this.

<agent-collector name="server1">
<collector host="server1" port="5001"/>

 

If verbosing logging is enabled, IntroscopeEnterpriseManager.log on the MoM should show have something like this.

mm/dd/yy hh:mm:ss [VERBOSE] [Manager.PostOfficeHub] Connected To: Node=Agent_1104, Address=server1.example.com/10.1.2.3:12345, Type=socket
mm/dd/yy hh:mm:ss [VERBOSE] [Manager.LoadBalancer] Assign SuperDomain/Tomcat|server1|Tomcat|JVM1 to collector1@5001 (22337 metrics)

 


Remote server

Command Line Workstation can also be invoked from remote servers, as long as the remote servers are able to communicate with the Enterprise Manager server on the network. You would simply copy the CLWorkstation.jar file from the Enterprise Manager server to the remote server, and then include the -Dhost option on the command line, where -Dhost is the hostname of the Enterprise Manager server.

java -Duser=<your username> -Dpassword=<your password> -Dhost=<hostname> -jar CLWorkstation.jar help

 

A good starting point is the list agents command.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 965774 in the box below so that we can be sure you are a human.