In highly dynamic cloud environments such as IBM SmartCloud Enterprise, virtual machines must be provisioned as needed to handle critical workloads. Virtual machine monitoring is an essential ingredient for meeting this requirement. This article shows you how to set up a virtual machine monitoring solution for SmartCloud Enterprise that uses IBM Tivoli Monitoring. It takes you through the steps for monitoring an IBM WebSphere® Application Server virtual machine instance, as an example.
You can leverage the procedure you learn in this article to help scale your SmartCloud infrastructure automatically to meet workload demands. Events detected by Tivoli Monitoring can trigger actions such as sending an alert message to the network operations center when a disk threshold limit is reached; provisioning a new virtual machine when a CPU is overloaded; or provisioning a new virtual machine when a certain number of clients are connected to a web front end.
Create your first business virtual machine instance
To follow the steps used in this article, Start by creating a virtual machine instance to monitor.
- Begin by signing in to the SmartCloud Enterprise
dashboard with your User ID and password, as shown in Figure 1.
Figure 1. SmartCloud Enterprise dashboard sign-in
- In SmartCloud Enterprise, you need to generate a security key pair and request at least two IP addresses. For instructions, select the Support tab and click Demo #3 - Working with IP, Storage & Keys. (Or you can access the same demo directly on YouTube; see Resources.)
- From the Account tab, shown in Figure 2, check the Security Key Pairs table to verify that you have generated a new security key.
Figure 2. The Account tab
- Select the Control panel tab and click Add instance to bring up the
first in a series of Add instance dialog pages. Generating a new instance using these pages is a four-step process:
- Choose a data center and select an image.
- Configure the image.
- Verify the configuration.
- Accept the service agreement.
Step 1: Choose a data center and select an image
- Choose a data center from the data center list shown in Figure 3.
Figure 3. The Select Data Center list
- From the available images, select IBM WebSphere Application Server v7.0 - PAYG, as shown in Figure 4, and click Next.
Figure 4. Creating a WebSphere Application Server instance (step 1 of 4)
Step 2: Configure the image
- In the Step 2 of 4: Configure image page, shown in Figure 5, enter a request name and a quantity, select a server configuration from the Server configuration list, and select your security key from the Key list.
- Click Next.
Figure 5. Creating a WebSphere Application Server instance (step 2 of 4)
- In the Step 2b of 4: Configure additional parameters page, shown in
Figure 6, enter the WebSphere administrator ID and password, choose
yes for Configure IHS server, choose Default single server profile for Select a configuration profile, and choose None for Select feature packs to enable.
Figure 6. Creating a WebSphere Application Server instance (step 2b of 4)
Step 3: Verify the configuration
On the Step 3 of 4: Verify configuration page, shown in Figure 7, verify the configuration you completed in step 2 and click Next.
Figure 7. Creating a WebSphere Application Server instance (step 3 of 4)
Step 4: Accept the service agreement
- On the Step 4 of 4: service agreement page, shown in Figure 8, click I agree and then click Submit.
Figure 8. Creating a WebSphere Application Server instance (step 4 of 4)
- As you wait for the instance to be created, you'll see the "Submitting..." status message shown in Figure 9.
Figure 9. Message displayed after instance-creation request is submitted
- When you see that your request has been submitted successfully, as shown in Figure 10, click Return to control panel.
Figure 10. Successful request submission
- In the control panel, shown in Figure 11, the Status column of the My instances
table initially indicates a status of "Requesting".
Figure 11. Control panel showing Requesting status
- The status then changes to "Provisioning" and finally to "Active", as shown in Figure 12.
Figure 12. Control panel showing Active status
The transition from Requesting to Active status takes about 10 minutes.
Create your virtual machine monitoring instance
Now you'll create a monitoring instance based on the IBM Tivoli Monitoring software image.
- On the Step 1 of 4: select image page, shown in Figure 13, select
IBM Tivoli Monitoring 126.96.36.199 Pre-Release from among the available
images and click Next.
Figure 13. Creating an IBM Tivoli Monitoring instance (step 1 of 4)
- Configure the image by completing the fields in the Step 2 of 4: Configure
image page, shown in Figure 14. Enter a request name and a quantity, select a
server configuration from the Server configuration list, and select your security key from the Key list. Click Next.
Figure 14. Creating an IBM Tivoli Monitoring instance, step 2 of 4
- Configure the additional parameters in the Step 2b of 4: configuration
additional parameters page, shown in Figure 15. Enter the CTIRA hostname and
a sysadmin password, and select Normal as the startup option. Click Next.
Figure 15. Creating an IBM Tivoli Monitoring instance, step 2b of 4
- After verifying the configuration in the step 3 screen (not shown), accept the service agreement, as shown in Figure 16, and click Submit.
Figure 16. Creating an IBM Tivoli Monitoring instance, step 4 of 4
- When you see that your request has been submitted successfully, as shown in Figure 17,
click Return to control panel.
Figure 17. Successful request submission
- As you can see in Figure 18, the control panel's My instances table
first indicates "Requesting" in the Status column for the monitoring image that you've
Figure 18. Control panel showing Requesting status
- After about 10 minutes, the status changes from "Provisioning" and then to "Active", as shown in Figure 19.
Figure 19. Control panel showing Active status
Connect to the Tivoli Monitoring instance and verify that Tivoli Monitoring is running
- Set up the PuTTY SSH client to connect to the Tivoli Monitoring virtual machine instance that you just created, as shown in Figure 20. Instructions on setting up PuTTY to connect to your SmartCloud instances are available in two places. In SmartCloud Enterprise, open the Support tab and click Demo #2 Connecting to an instance using an SSH Client. Or you can access the same demo directly from YouTube (see Resources).
Figure 20. Connecting via PuTTY to the Tivoli Monitoring virtual machine instance
- When you see the security alert shown in Figure 21, click Yes to
accept the key.
Figure 21. The PuTTY security alert
- In your PuTTY session, log into SmartCloud Enterprise as
idcuser, as shown in Figure 22.
Figure 22. Logging in as
- To verify that the Tivoli Monitoring server processes are running, run the
ps -aef |grep ITMcommand and make sure the
kcawdprocesses are running, as shown in Figure 23.
Figure 23. Verifying that the Tivoli Monitoring server is running
- If Tivoli Monitoring isn't running, start the processes manually. The command to start
Tivoli Monitoring server is:
The command to stop Tivoli Monitoring server is:
Connect to the IBM Tivoli Enterprise Portal
- Run the
sudo bashcommand, as shown in Figure 24, to make idcuser a root-level user.
Figure 24. Switching to root-level user
- Run the
vi /etc/hostscommand to open the /etc/hosts file, as shown in Figure 25, so that you can easily retrieve the IP address and hostname of the Tivoli Monitoring server.
Figure 25. Opening /etc/hosts with
- Check to see if the same IP address and hostname appear in a line in your
workstation's hosts file (probably C:\Windows\System32\drivers\etc\hosts if you are
using a Microsoft Windows OS). For example:
188.8.131.52 vhost1677.site2.compute.ihost.com vhost1677
- If the line doesn't exist in your workstation's hosts file, add a line containing the IP address and hostname that you just retrieved.
- Launch a web browser and go to the following URL, where ITM_hostname is the
hostname of the ITM instance you created previously:
You must use the hostname, not the host's IP address.
- Configure your browser to use the supported version of the IBM Java™ runtime. Figure 26
shows that Java 1.5 (the supported version as of this writing) is selected in the
Windows Internet Explorer 9 Options window.
Figure 26. Selecting the Java version
- When you see the warning message shown in Figure 37, click in the check box next to
Do not show this message again, then click
Figure 27. Dismissing the Java warning message
- The Tivoli Enterprise Portal authentication window appears, as shown in Figure 28. Log
sysadminusing the same password you set up in Step 2b of creating the Tivoli Monitoring instance.
Figure 28. Tivoli Enterprise Portal authentication window
- Accept the security certificate by choosing Accept this certificate
temporarily for this session only, as shown in Figure 29, and click
Figure 29. Accepting the security certificate
- The Tivoli Enterprise Portal console displays the default monitoring windows shown in
Figure 30. Default monitoring windows
Register your node into IBM Tivoli Monitoring
Now you'll register your node into IBM Tivoli Monitoring so that you can monitor it from the Tivoli Enterprise Portal.
- From your workstation, set up PuTTY to connect to the WebSphere Application Server
virtual machine instance that you created earlier, as shown in Figure 31.
Figure 31. Setting up PuTTY to connect to the WebSphere Application Server virtual machine instance
- Open a PuTTY session on the virtual machine you wish to monitor — in this example, the WebSphere Application Server virtual machine with the hostname of vhost1409. At the prompt, log into SmartCloud Enterprise as
idcuser, as shown in Figure 32. (You must use that username.)
Figure 32. Logging into SmartCloud Enterprise
- Run the
sudo bashcommand to make idcuser a root-level user, and run
passwdcommand to set a password for root, as shown in Figure 33.
Figure 33. Switching to root level and setting a root password
- Edit the /etc/ssh/sshd_config file to modify these three lines:
PermitRootLogin yes PasswordAuthentication yes AllowUsers idcuser root
- Save the file.
- Run the
service sshd restartcommand to restart the SSHD service.
- Edit the /etc/passwd file to change the
- Open a PuTTY session as idcuser on the Tivoli Monitoring virtual machine (or use the existing session that you opened earlier if it's still open.)
sudo bashto switch to root, and the
sshcommand to exchange the key with the target server, as shown in Figure 34. Use the following remote
target_hostnameis the hostname of the target server you want to monitor:
ssh target_hostname ls /tmp
Figure 34. Running the
- Change to the /opt/IBM/ITM/bin directory and run the
./tacmd login -s localhostcommand, as shown in Figure 35, to open a session in Tivoli Monitoring. Use
sysadminas the username, with the same password you set up in step 2b of creating the Tivoli Monitoring instance.
Figure 35. Logging into a Tivoli Monitoring session
- After you're logged in, create a node on the target system (the WebSphere Application Server virtual machine in this example) by running the following command (where
hostname_to_monitoris the hostname of the virtual machine to monitor and
path to installis the path where the Tivoli Monitoring agent will be deployed):
./tacmd createNode -h ssh://hostname_to_monitor) -d path_to_install -p PROTOCOL=IP.PIPE PORT=1918
You'll use the transaction ID returned from this command in the next step, so be sure to keep it at hand.
Note: You must use the root username and password when you are prompted, as shown in Figure 36, because the agent must be installed as root.
Figure 36. Creating a node on the target system and logging in as root
- Run the following command, as shown in Figure 37, to monitor the deployment status of the agent and the node creation:
./tacmd getdeploystatus -g your_transaction_ID
Figure 37. Monitoring the agent's deployment status
- You might see a message that the request is processing. If so, run the command again (about 5 minutes later) to verify that you get a success status, as shown in Figure 38.
Figure 38. Successful node creation
- Log out of the Tivoli Monitoring command session, as shown in Figure 39.
Figure 39. Logging out of the Tivoli Monitoring command session
Check the implementation
- Open a PuTTY session on the virtual machine you want to monitor (in this example, the WebSphere Application Server virtual machine with the hostname of vhost1409) and verify that the /opt/IBM/ITM directory exists and contains the Tivoli Monitoring agent, as shown in Figure 40.
Figure 40. Verifying that the /opt/IBM/ITM directory exists and contains the agent
- To verify that the agent has been started and is running, execute the
ps -aef |grep ITMcommand, as shown in Figure 41, and ensure that the
kcawdprocesses are running.
Figure 41. Verifying that ITM agent processes are running
- Refresh your web browser and verify that the node you just created appears in the Tivoli Enterprise Portal navigation window, as shown in Figure 42.
Figure 42. Verifying that the new node appears in the portal
You can configure Tivoli Enterprise Portal with your monitoring window preferences. Refer to the Tivoli Monitoring documentation for this purpose (see Resources).
By following the steps in this article for setting up a monitoring solution for your IBM SmartCloud infrastructure, you can:
- Compare a report generated today to a previous report whenever new virtual machines are added to the environment.
- Ensure that you don't receive false alarms when a virtual machine is deprovisioned.
- Monitor application resources comprehensively.
- Automatically identify all unmonitored resources.
- Integrate with IBM Tivoli Monitoring to provision agents automatically (launch them in context).
- Perform faster closed-loop troubleshooting.
- Identify all infrastructure changes (using the Tivoli Application Dependency Discovery Manager Change Event module).
- Correlate infrastructure health with changes to reduce mean time to recovery.
- Perform discovery through Tivoli Monitoring agents.
- Eliminate credential problems.
- Move toward near-real-time discovery.
- Be alerted when a guest OS goes offline.
- Tie into your change-control process or self-service catalog to know when a guest OS should be offline.
- View performance, availability, and capacity-planning reports even if your resources are constantly changing.
- Know how many snapshots are using up disk space.
- Set limits on the number of snapshots and monitor them.
- Monitor virtual machines to see whether they are using all of their allocated resources.
See Resources for a link to a video demonstrating elastic provisioning — the capability to provision new instances in SmartCloud Enterprise automatically based on events detected by Tivoli Monitoring.
- Demo: Working with IP, Storage & Keys: This video covers working with IP addresses, storage, and key pairs in IBM SmartCloud.
- Demo: Connecting to an Instance using an SSH Client - IBM SmartCloud, v2.1: This video demo shows how to use the PuTTY SSH client to connect to an IBM SmartCloud virtual machine.
- IBM Tivoli Monitoring: Find out more about IBM Tivoli Monitoring and how helps you optimize IT infrastructure performance and availability.
- IBM Tivoli training and certification: Search the global training finder to locate courses by training type, country or provider.
- IBM Tivoli Monitoring support portal: Get everything you need to support IBM Tivoli Monitoring.
- IBM Tivoli Monitoring information center: Consult the Tivoli Monitoring documentation.
- Demo: Elastic provisioning on IBM SmartCloud Enterprise using ITM: View a video demonstrating the capability to provision new servers automatically on IBM SmartCloud Enterprise based on events detected by IBM Tivoli Monitoring.
Get products and technologies
- Use Tivoli Monitoring on the cloud.
- IBM SmartCloud Enterprise: Take advantage of a free trial on IBM's enterprise-class public cloud infrastructure-as-a-service (IaaS).
- PuTTY: Download PuTTY and PuTTYgen.