Configuration of Component Agent
Set the key basic.properties attributes for the Component Agent on AIX and Windows.
This section provides information on how to configure the component agent on the AIX server and Windows.
Steps for Configuration on AIX Server#
1. Navigate to ComponentAgent/config folder
Open the basic.properties file and provide the values for the following key attributes:
a. Component Agent identifier,
component.agent.uniqueid=<Provide the component-agent identifier, which is created through config generator tool for this host>
For example:
component.agent.uniqueid=e570de02-c585-4917-bbb7-5c97b35e-10
b. HEAL Control Center URL,
component.agent.configserver.url=<Provide the HEAL Control Center URL>
For example:
component.agent.configserver.url=https://keycloak.example:8443/appsone-controlcenter/v2.0/api/agent-config-data
Note:
Make sure both these key attributes are valid and not empty, if invalid or empty component-agent stops its service.
2) Navigate to the ComponentAgent/config folder.
a. Open the advanced.properties file (optional).
Uncomment and configure the following lines to set the minimum and maximum pool sizes for JDBC connections:
#component.agent.jdbc.producer.min.pool.size = 1
#component.agent.jdbc.producer.max.pool.size = 5
b. Uncomment and configure the following line to set the SQL query for JDBC test connections:
#component.agent.jdbc.test.query=select 1 from dual
c. If the data fails to send to HEAL, it will automatically be added back to the local queue.
d. Uncomment and set the following lines to specify the number of retry attempts and the wait time between each retry:
#data.connection.retry=3
#data.connection.retry.sleep.mills=1000
3) Navigate to the below directory.
<agents>/<physical-agent-id>/selfheal
and configure the selfhealconfig file.
| Property | Default Value | Description |
|---|---|---|
| PROCESS_NAME | Component agent | Don't change the default value. |
| HOST_MEM_THRESHOLD | 60% | Used for host memory check. |
| HOST_CPU_THRESHOLD | 40% | Used for host CPU check. |
| PROC_MEM_THRESHOLD | 60 % | Used for processing memory check of respective agent. |
| PROC_CPU_THRESHOLD | 40 % | Used for processing CPU check of respective agent. |
| PERSIST_DURATION | 3 (consecutive number of times) | This attribute is applicable only for process thresholds. Persistence duration after which remedial action (stop/restart) is taken. If the configured threshold is breached for consecutive "PERSIST_DURATION", then the "Stop" action is performed on the respective agent. But still, the selfheal script is invoked for every configured interval of time in the Supervisor. If the self-heal script gets the threshold as below the configured thresholds for consecutive "PERSIST_DURATION", then the "Start" action is performed on the respective agent. Note: Whenever the "Start" action comes from the UI or whenever the selfHeal.sh script is invoked, the CPU & memory utilization is checked, and if the values are lower than the configured values, then only the "Start" action is performed. |
| SLEEP_PS_COMMAD | 30 seconds | Sleep time between two consecutive PS commands to check the CPU utilization in seconds. |
| JAVA_CUSTOM_ARGS | "" | If you need to add a JVM custom variable, it needs to be added as a value for this attribute. |
| PROCESS_UPTIME | 60 seconds | This value is set to skip the process memory and CPU utilization checks until the process uptime is more than the set value for this attribute. |
| XMS_VALUE | 128 MB | The purpose of these two attributes is to configure the heap size while starting the agent. You can reconfigure these values based on the requirement and resource availability on respective servers and can start the agent. XMS specifies the initial and minimum heap size for a process. XMX specifies the maximum heap size for a process. This indicates that a process starts with an XMS amount of memory and can utilize a maximum of XMX amount of memory. For Example: Starting a JVM or process with 256 MB of memory and allowing the process to use a maximum of 2048 MB of memory. |
| XMX_VALUE | 512 MB | |
| PURGE_LOGS | 5 days | To delete the logs that are older than X days. |
| LOG_Enable | 0 | To enable the logging. Set as 1 to enable the logging. |
Note:
Make sure both the key attributes are valid and not empty if the invalid or empty component agent stops its service.
4. Navigate to the below directory.
<agents>/<physical-agent-id>/selfheal/external_command
a. To access the forensic data through CA, add the below forensic script in the above directory:
<agents>/ForensicAgent/<forensic agents ID>
b. Configure the externalconfig file as follows.
| Property | Default Value | Description |
|---|---|---|
| Load_Average_Threshold | 80 | The load average is the average of the number of runnable processes over a given time period. Provide the percentage value for the threshold. Provide only positive value. |
| Disk_Space_Threshold | /run, 80 | Disc name and threshold. Provide the percentage value for the threshold. Provide only positive value.Note: '/run,80' is the default disk name and threshold. '/run' may not be available in your environment. Change the disk name to the available disk in your environment. |
| Process_Count_Threshold | 300 | The maximum number of processes that can execute in the system. If the process count exceeds this number, the agent stops. Provide the percentage value for the threshold. Provide only positive value. |
| Process_Pattern | All | Type of the process. For example: Java, Crontab, etc. |
5. Connect to the MySQL server by executing below command:
mysql -h <mysql_ip> -u <mysql_username> -p'<mysql_password>' -P <mysql_port>
6. Access the data_communication_details table and assign the forensic endpoint value by executing the below command:
update data_communication_details set forensic_endpoint=https://<HAProxy_IP>:<HAProxy_Port>/forensic-result
7. In HAProxy, update the HAProxy config file with the below endpoints:
- Frontend:
acl url_sc_forensic path_beg -i /forensic-result
- Backend:
use_backend supervisor_controller_backend if url_sc_forensic
Note:
Ensure the above values are present in HAProxy, if not update the using the above command.
8. Component Agent collects KPIs using producers. Sshproducer collects AIX, CentOS, RHEL, HPUX, and Solaris KPIs. Shell producer collects Windows and IIS KPIs.
The collection of KPIs happens without checking the host address, domain, username, and password attributes for Windows and IIS. These attributes are needed for creating component instances.
9. The default KPI collection frequency is 1 minute. It should always be in multiple minutes. Convert minutes to seconds while updating the interval in Percona DB.
You can update the same at the component instance level as follows:
Non-Group KPIs:
update comp_instance_kpi_details set collection_interval = <time_interval> where com_instance_id = <instance_id> and mst_kpi_details_id = <kpi_id> and mst_producer_id = <producer_id>;
Group-KPIs:
update comp_instance_kpi_group_details set collection_interval = <time_interval> where com_instance_id = <instance_id> and mst_kpi_details_id = <kpi_id> and mst_producer_id = <producer_id>;
10. Configuring advanced attributes for Component Agent.
This is for fine-tuning of CA:
a) Navigate to the ComponentAgent/config folder.
b) Open the advanced.properties file.
c) Update the properties in the file as follows:
Uncomment the properties from the file and provide values.
| Property | Description |
|---|---|
| component.agent.producers. minute.threadpool.size |
These properties indicate the number of threads CA uses for data collection. Data collection intervals can be in minutes or seconds. Each thread executes the scripts for data collection. If the KPIs count is higher, you can increase the thread pool size. The default value is 16. |
| component.agent.producers. second.threadpool.size |
Thread pool size = No. of cores on the system where the CA is running * Thread pool factor. This auto calculation is disabled when the thread pool factor is 0. |
| component.agent.shell.producer.execute.type | To run the SSH producer with a specific shell type. Provide the shell type. Possible shell types are – bash, ksh, sh. |
| component.agent.producers. minute.threadpool.factor |
The default value is 1. The factor of no. of cores. This is a decimal number. |
| component.agent.producers. minute.threadpool.warning.factor |
Define warning threshold. A warning message is written to logs when the (Thread pool size)/ (number of cores ratio) crosses a warning threshold. |
| component.agent.producers. execution.threshold |
The default value is 5 seconds. CA executes scripts for data collection. If the time to execute the script and process the data is more than defined for this property, messages are logged to the component-agent-diagnostics.log file. Total time is also logged. The load average of the system is logged post-execution of the script which breaches the threshold. |
d) Navigate to the below directory.
<installpath>/ComponentAgent/<physical-agent-id>/config
e) Edit the conf.properties file as follows.
There are thread pool statistics in the component agents for scheduling all the producers for data collection.
There are possibilities that the long-running producers occupy all the threads. This impacts data collection as other producers do not get the required resources for execution. This causes data breakage for all KPIs.
To mitigate this, you have the following configurations.
| Property | Description |
|---|---|
| component.agent.producers.long. running.threadpool.factor |
This indicates the size of the new thread pool for long-running producers. By default, this is a minimum of 1/4th of the cores available in the system. |
| component.agent.producers.long. running.execution.threshold |
This indicates the time in seconds. If a producer takes more time for execution, it is marked as a long-running producer. |
f) Component Agent supports auto-sizing of the thread pool. As per the requirement of the number of threads, pool size increases to a maximum (2 * number of cores) by default. Once all the jobs are processed, the thread pool size is reset to the number of cores in the box.
Edit the conf.properties file as follows.
| Property | Description |
|---|---|
| component.agent.producers.minute. threadpool.max.factor.multiplier |
This defines the auto size of the thread pool. Auto-size of thread pool = maximum of (value of this attribute * number of cores). Auto sizing is disabled if the value of this attribute is 0. |
g) For PostgreSQL 15.x or above versions, uncomment the below property and change the query accordingly.
| Property | Description |
|---|---|
| component.agent.jdbc.test.query | This query is used to check the functionality of the JDBC connection or to validate data from the database. The value of this property could be "SELECT 1 FROM dual". If the property value is left empty, then no JDBC connection validation test query will be executed. |
11. For Windows OS, provide the IBM MQ name in the environment variable manager.
For example:
set Manager="myquemanager1"
12. Add the following in the "hostDetails" section in the agent_details.json file for remote forensics collection.
{
"file_path":"",
"Description":"",
"Threshold_Percentage":"",
"HostPassword":"*******",
"HostUsername":"root",
"SshPort":"22",
"HostAddress":"19x.xyz.xy.xyz",
"status":1.0
}
- Do not modify values of file_path, Description, and Threshold_Percentage attributes.
- Provide an encrypted password in the HostPassword attribute to connect to the DB server.
- Provide the name of the user in the HostUsername attribute to connect to the DB server.
- Provide SSH port number in SshPort attribute.
- Provide the IP address of the DB server in the HostAddress attribute.
- Provide either a 1 or 0 value for the status attribute. If the value of the status attribute is 1, CA collects KPIs data from the DB server. If the value of the status attribute is 0, then CA doesn't receive data from the DB server.
Managing Services#
Start, stop, or restart the agent from the control center user interface. Users can also check the status of the agent from the control center UI.
Refer to the Agent Health Status.docx.
Make sure the following commands are available and have the execute permission for the user.
| OS | Utilities |
|---|---|
| AIX | awk, bc, df, egrep, iostat, lparstat, lsattr, lscfg, lsps, lssrc, mount, mpstat, netstat, ps, sar, sed, svmon, swap, tail, topasout, topasrec, uptime, proctree, procstack, /usr/bin/truss, date |
| Solaris | awk, bc, df, egrep, iostat, mount, mpstat, nawk, pagesize, prtconf, prtdiag, ps, sar, sed, swap, uname, uptime, zpool, ptree, pstack, /usr/bin/truss, date |
| RHEL/CentOS | awk, bc, cat, cut, df, egrep, free, grep, ifconfig, iostat, lsblk, lsof, mount, ps, sar, sed, sort, tail, top, tr, uptime, vmstat, pstree, cat /proc/1/stack, wc, date |