The IBM CMC Data Collector is a Java application packaged as an RPM that you install on a RHEL or SLES partition that is running on a Power System in Public Cloud. Data Collector uses the SSH authorized_keys mechanism to connect to your AIX, IBM i, RHEL, and SLES endpoints and gather data. In this way, one Data Collector instance can collect data from multiple endpoints for monitoring in the CMC Inventory and Patch Planning apps.
Note: Stale VDC partitions will continue to show in the CMC Inventory and the Patch Planning applications even after Data Collector is disconnected.
Prerequisites
- Java 8 must be installed on the Linux (RHEL or SLES) system.
- Python 3.x must be installed and should generate the following output:
$ python -V
Python 3.8.7 - You must have root access to the Data Collector system.
- You must have, or be able to create, a user with sufficient privileges to run inventory and patch planning commands on the endpoint system.
VDC start command syntax
vdc -o <start|stop|status>
vdc -o start [-f <file> | -k <start_key>] [--configpath <config_file_path>] [--sshuser <ssh_username>]
[--privkeypath <private_key_path>] [--passphrase <passphrase>] [--region <dallas|washingtondc|saopaulo|toronto|montreal|frankfurt|london|sydney|tokyo|osaka|any>]
where:
- start_key is the key displayed in the CMC UI.
- configpath is the location of the configuration file described below.
- sshuser is the username of a user with sufficient privileges to run inventory and patch planning commands on your behalf on the endpoint.
- privateKeyPath is the path on the Data Collector system to the private key you create.
- passphrase is the password for the private key.
- region is needed only in a multi-region cloud environment where you want to collect inventory and patch-planning information from only the particular region. You can otherwise skip this parameter or specify any.
Download Data Collector
The Data Collector installation file is a digitally signed .sh (shell archive) file that contains a set of packaged files along with a digital signature to ensure its authenticity and integrity.
- Download the Data Collector installation file from https://www.ibm.com/servers/eserver/ess/ProtectedServlet.wss. This file may be named IBM_Cloud_Management_Console_Data_Collector_latest.sh or IBM_Cloud_Management_Console_Data_Collector_latest.bin, where latest is the actual version value. Entitlement is required to download the software from this web site.
- Verify the signed .sh or the .bin file by running the following command:
openssl dgst -sha256 -verify <filename>.pem -signature <filename.sig> <filename.sh> or <filename.bin>
Install Data Collector
- Log in as root to the system on which you want to install Data Collector.
- Change directories to the distribution directory.
- Install the Data Collector package on the target system:
./IBM_Cloud_Management_Console_Data_Collector_latest.sh
or
./IBM_Cloud_Management_Console_Data_Collector_latest.bin
where latest is the actual version value. Respond to the license query when prompted. Data is written to /var/log/data-collector.
Create the public/private key pair
Data Collector connects to the systems you specify and executes commands with an SSH connection. This requires that you copy the public key to the systems and add them as trusted hosts.
Note: The steps describe how to manually create private and public keys and how to copy the public key to the endpoint system. You can also use the ssh-copy-id command for this task if you are familiar with its use.
- Identify (or create) a user with sufficient privileges to run inventory and patch planning commands on your behalf on the endpoint.
- Open an SSH connection for the user to the endpoint system:
ssh user@system-name.com
user@system-name.com's password: - Ensure that you're in the user's home directory:
pwd
/home/user - Create a .ssh subdirectory if one does not already exist:
mkdir .ssh - Switch back to the Data Collector system.
- Run the /usr/bin/ssh-keygen command to create a public and private key. Specify a location for the keys. Do not use a file extension. Enter a passphrase for the private key. You must remember this password for later use.
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): ………
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in…………..
Your public key has been saved in……………. - Change directory to the location of the keys and ensure that both the private and public keys were created. The private key does not have a file extension.
- Secure copy (scp) the public key to the endpoint system.
- Switch back to the endpoint system.
- Append the public key to the authorized_keys file in the user’s .ssh directory:
cat public_key.pub >> authorized_keys - Repeat these steps for every endpoint on which you want to use Data Collector to gather data.
Allow network access
The Data Collector requires network connectivity to the listed fully qualified domain names or IP addresses. Please make the required network changes to allow this access.
Get the Data Collector key and startup command from CMC
The CMC UI generates a startup command that you must use as the basis for Data Collector startup.
- Click the navigation menu icon () in the portal header and click the Settings icon ().
- In the Settings page, click Power Virtual Servers.
- Click Configuration at the top of the page.
- Click Copy to Clipboard to copy the startup command.
Starting Data Collector without a configuration file
Run the start command, paste in the key from the CMC UI, and specify the actual values for sshuser, privkeypath, passphrase, and optionally region.
vdc -o start -k <paste-key-from-CMC> --sshuser “auser” --privkeypath “/opt/data-collector/private_key” --passphrase “password”
--region “actual-region”
Starting Data Collector with a configuration file
You have the option to start Data Collector with a configuration file, or to enter all of the required parameters on the command line. If you start Data Collector from the configuration file, add each endpoint in separate stanzas in the configuration file.
- Edit the /var/data-collector/config.json file and provide the following information for each endpoint:
|
Field |
Description |
|
Hostname |
The fully-qualified hostname of the endpoint system. This value is required. |
|
Ip |
The IP address of the endpoint system. This value is required. |
|
Type |
One of the following types: Case is sensitive. This value is required. · aix · ibm i · rhel · sles |
|
Username |
The user name of a user with sufficient privileges to run inventory and patch planning commands on your behalf on the endpoint. You must specify this value either in the configuration file or on the command line. |
|
privateKeyPath |
The path on the Data Collector system to the private key you created. You must specify this value either in the configuration file or on the command line. |
|
Passphrase |
The password for the private key. You must specify this value either in the configuration file or on the command line. |
For example:
{
"vmDetails": [
{
"hostName": "yourendpointhostname",
"ip": "ipaddress",
"type": "rhel",
"username":"auser",
"privateKeyPath": "/opt/data-collector/private.key",
"passPhrase": "password"
},
{
"hostName": "anotherendpointhostname",
"ip": "ipaddress",
"type": "rhel",
"username":"auser",
"privateKeyPath": "/opt/data-collector/private.key",
"passPhrase": "password"
}
]
}
- Run the start command, paste in the key from the CMC UI, and specify the configuration file:
vdc -o start -k <paste-key-from-CMC> --configpath “/var/log/config.json” --region “actual-region”
Checking command status from the command line
vdc -o status
data-collector status: active
Checking status from CMC
- Click the navigation menu icon () in the portal header and click the Settings icon ().
- In the Settings page, click Power Virtual Servers.
- Click Status at the top of the page.
- The following information for the configured Data Collectors is displayed. You can sort the display by these fields.
- State
- Name
- IP address
- Last data transmission date
Stopping Data Collector from the command line
vdc -o stop
Running Data Collector diagnostics
Run the diagvdcconn command to display Data Collector diagnostic information.
diagvdcconn
** Validating Data Collector status
Data collector status=active
** Validating if the portal is reachable
Portal is: hostname
Portal is reachable
Xsrf-Token: 5xfUvQ5D-RS41WnVx9KEo7EMkkd5ulLuxHWY
** Validating if the portal gateway api is reachable
Portal Gateway API URL is: hostname
Portal gateway api is reachable
*** Validating if Logstash is reachable
Logstash config: "IP-address:5045"
Logstash "IP-address:5045" is reachable
Comments
0 comments
Please sign in to leave a comment.