Install Monitoring Agents in IBM Cloud Pak for Multicloud Management on UNIX and Linux
Automate installation of Monitoring Agents in IBM Cloud Pak for Multicloud Management in a Unix or Linux environment using Ansible or Red Hat Ansible Tower.
For information on how to run this playbook in Ansible, see Automating with Red Hat Ansible Tower.
For
information on how to run this playbook in Red Hat Ansible Tower, see Automating with Ansible.
For a list of agents that are supported on UNIX and Linux, see the Installing agents on UNIX systems,
and Installing agents on Linux systems topics.
Playbooks
Activity | Playbook | Description |
---|---|---|
Install agents | icam/install_icamagent.yml |
This playbook installs the agents that are listed in the agent_name variable on a remote UNIX or Linux machine. This playbook generates a silent installation file based on the values that are provided in the agent_name variable, and install agents silently. This playbook can be run with root or non-root credentials. |
agent_image
(Required)
The fully qualified path of the agent_image.
For example, /tmp/icam/cp4mcm_Agents_xlinux_2.0.tar.gz
agent_name
(Required)
List the agents that you want to install, separated by comma. For example, os,mq
image_type
(Optional)
The type for the agent_image
variable. There are three options for this variable:
local
- the file exists on the remote agent box. It can be on a mount drive.copy
- copy the file from theagent_image
location to/tmp/icam
download
- copy the file from the public url to/tmp/icam
The default islocal
.
agent_home
(Optional)
If your agent is installed at a non-default location, specify the agent_home
variable. The agent_home
variable replaces the AGENT_HOME that is specified in the silent
option file.
For example, /opt/ibm/apm-test/agent
dest_dir
(Optional)
By default all the image files and silent config files are copied to /tmp/icam
(if the copy
or download
option is specified. Change this by specifying a
dest_dir
value. This option is ignored if the src_type
is set to local
.
For example, /images/icam
Activity | Playbook | Description |
---|---|---|
Upgrade agents | icam/upgrade_icamagent.yml |
This playbook upgrades and starts your existing agents. You can run this playbook as root or non-root user, but run it with the same user that was used to install the previous version otherwise you can experience a permission issue. If your
agent is installed at a non-default location, ensure you specify it in the agent_home variable. If the agent is not installed, then this playbook does a fresh installation instead of an upgrade. |
All variables are the same as the icam/install_icamagent.yml
playbook.
Activity | Playbook | Description |
---|---|---|
Uninstall agents | icam/uninstall_icamagent.yml |
This playbook uninstalls the agent. Run it with the same credentials that you ran to install and upgrade the agent. |
agent_name
(Required)
List the agents that you want to uninstall with the playbook, separated by comma. If agent_name
variable is set as all
or smai
, all agents in the agent_home
folder will be uninstalled completely.
For example,: os,mq
agent_home
(Optional)
If your agent is installed at a non-default location, specify the agent_home. This variable is only needed if you are using a non-default agent_home.
For example, /opt/ibm/apm-test/agent
Activity | Playbook | Description |
---|---|---|
Run secure.sh script | run_secure.yml |
This playbook runs the secure.sh file on a remote agent box so that agent can be configured as a different user other than the one that was used for installation. Run this playbook with root credentials. |
group_name
(Required)
For example, icamuser
agent_home (Optional)
If your agent is installed at a non-default location, specify the agent_home. This variable is required if you are using a non-default agent_home.
For example, /opt/ibm/apm-test/agent
Activity | Playbook | Description |
---|---|---|
Configure a Monitoring Agent | icam/configure_icamagent.yml |
This playbook configures and starts the agent. |
agent_name
(Required)
For example, db2
instance_name
The name of the instance you want to configure. For multiple-instance agents, it is required. For single instance agents, do not set it.
For example, db2inst1
config_file
(Required)
The fully qualified path of the silent configuration file.
For example, /img/icamconfigured/db2_silent_config.txt
config_file_type
(Optional)
Type for the config_file
variable. There are three options for this variable:
copy
- the file is copied from the location that is specified in thesilent_file
variable to the default/tmp/icam
directory.local
- the file is copied from theagent_image
location to/tmp/icam
download
- the file is copied it from the public url to/tmp/icam
By default it is set tolocal
.
agent_home
(Optional)
If your agent is installed at a non-default location, specify the agent_home.
For example, /opt/ibm/apm-test/agent
dest_dir
(Optional)
By default all the image files and silent config files are copied to /tmp/icam
(if the copy
or download
option is specified. Change this by specifying a
dest_dir
value. This option is ignored if the src_type
is set to local
.
For example, /images/icam
Activity | Playbook | Description |
---|---|---|
pd collect | icam/pdcollect.yml |
This playbook generates pdcollect and then copies it to the location specified in the log_dir variable. This log_dir requires write permission and can be a mounted drive on any central server. |
log_dir
(Required)
For example, /tmp/pdcollect
agent_home
(Optional)
If your agent is installed at a non-default location, specify the agent_home.This is the directory path if your agent is installed at a non-default location.
For example, /opt/ibm/apm-test/agent
Activity | Playbook | Description |
---|---|---|
os logging | icam/os_logging.yml |
This playbook can get sample configuration files, get current configuration files, distribute specific configuration files, and undistribute specific configuration files of OS logging function. |
logging_type
(Required)
Choose one of the following four values:
getsampleconfig
getsample conf/fmt
files fromsamples/logfile-monitoring
toworking_dir
getconfig
getconf/fmt
files fromlocalconfig/nt/log_discovery
toworking_dir
distribute
distributeconf/fmt
files fromworking_dir
tolocalconfig/nt/log_discovery
undistribute
undistributeconf/fmt
files fromlocalconfig/nt/log_discovery
working_dir
(Required)
The working folder for getsampleconfig/getconfig/distribute
filelist
(Required)
Use all
, or specify the file names separated by comma
For example, my1.fmt, my1.conf
agent_dir
: (Optional)
The default is /opt/ibm/apm/agent
Activity | Playbook | Description |
---|---|---|
Mount the nfs server | icam/mount_nfs_server.yml |
This playbook mounts the nfs server on the remote agent box. |
nfs_server_path
(Required)
The NFS server IP address and directory path that you want to mount.
For example, 9.46.74.128:/images
local_dir
: (Required)
The local directory to mount the value that is specified in nfs_server_path to.
For example, /img
force
(Optional)
If this option is set to true and there is an existing mount, it un-mounts that and remounts it to the path specified by nfs_server_path. By default the option is no.
Activity | Playbook | Description |
---|---|---|
Multiple tasks | icam/filemanager.yml |
This playbook can perform multiple tasks such as copy/download and then extract or copy/download and then run the script or just copy/download the file to remote box. If you want to copy/download, extract and run all three at once then you must run this playbook twice. |
src_image
(Required)
Provide a fully qualified path of the file. It can be a shell script or tar or tar.gz file.
For example, /tmp/k.sh
src_type
(Optional)
The type for the src_image
variable. There are three options for this variable:
local
- the file exists on the remote agent box. It can be on a mount drive.copy
- copy the file from theagent_image
location to/tmp/icam
download
- copy the file from the public url to/tmp/icam
The default islocal
.
dest_dir
(Optional)
By default all the image files and silent config files are copied to /tmp/icam
(if the copy
or download
option is specified. Change this by specifying a
dest_dir
value. This option is ignored if the src_type
is set to local
.
For example, /images/icam
untar
(Optional)
If you want to extract the file specified in src_image
, mark this variable as true
. The default is false
.
run
(Optional)
If the file specified in src_image is a shell script and you want to run it, specify run as true. By default run is false.
args_script
(Optional)
If the file specified in src_image
variable is a shell script and if you want to pass an argument you can specify it in the args_script
variable. By default it is
blank. You can have any number of arguments that are separated by a space.
For example, "arg1 arg2 arg3"