Configuration on Windows
Generate SSL certificates and import them into the JRE keystore on Windows.
Steps for Configuration on Windows#
1. Execute SSL commands to generate SSL keys:
echo -n | openssl s_client -connect '<SERVICEIP>:<SERVICEPORT>' | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/<servicename>.crt
Note:
Execute the above command on the HEAL server and copy .crt file to the Windows machine.
To open the command prompt, navigate to the ZuluJre path.
keytool.exe -importcert -trustcacerts -keystore "<JAVA_HOME>\ZuluJre\lib\security\cacerts" -storepass changeit -noprompt -alias <servicename> -file "\tmp\<servicename>.crt"
For example:
keytool.exe -importcert -trustcacerts -keystore "C:\Program Files\Appnomic Systems Pvt Ltd\ZuluJre\lib\security\cacerts" -storepass changeit -noprompt -alias haproxy1 -file "C:\Users\Administrator\Desktop\Agents\haproxy1.crt"
copy"<JAVA_HOME>\zuluJre\lib\security\cacerts"<INSTALLERPATH>\component-agent-core\<physical-agent-identifier>\config\keyfiles\
For example:
Copy "C:\JAVA_HOME\ZuluJre\lib\security\cacerts"
"C:\Installerpath\ComponentAgent\e570de02-c585-4917-bbb7-5c97b35e-2physical\config\keyfiles"
2. Navigate to the below directory:
component-agent-core/config
3. Open the basic.properties file and provide the values for the following key attributes:
component.agent.uniqueid=<Provide the component-agent identifier, which is created through the config generator tool for this host>
For example:
component.agent.uniqueid=e570de02-c585-4917-bbb7-5c97b35e-10
component.agent.configserver.url=<Provide the AppsOne Control Center URL>
For example:
a. With HAproxy (Standalone mode)
component.agent.configserver.url=https://haproxy-node1.example:9998/heal-controlcenter/v2.0/api/agent-config-data
If you use HAProxy in standalone mode, create a certificate using the HAProxy IP and port.
b. With HAproxy (HA mode)
component.agent.configserver.url=https://<haproxy_virtual_ip>:9998/heal-controlcenter/v2.0/api/agent-config-data
If you use HAProxy in HA mode, create a certificate using HAProxy's virtual IP and port.
Note:
Ensure these key attributes are valid and not empty, if invalid or empty component-agent stops its service.
4. Navigate to the below directory.
component-agent-core/config
Open the advanced.properties file. You can update the limit on the number of JDBC connections.
a. Uncomment the following lines and provide values for the attributes.
#component.agent.jdbc.producer.min.pool.size = 1
#component.agent.jdbc.producer.max.pool.size = 5
Default values for these attributes are 1 and 5, respectively, as shown above. You can update these values.
b. To support the forensic data through CA, add the below configuration line in advanced.properties file,
component.agent.forensic.signing.check=0
5. Navigate to the below directory:
<agents>/<physical-agent-id>
and configure the Config.vbs file.
| Property | Default Value | Description |
|---|---|---|
| hostMemLimit | 60 % | Used for host memory check. |
| hostCpuLimit | 40 % | Used for host CPU check. |
| procMemLimit | 60 % | Used for processing memory and checks for the respective agent. |
| procCpuLimit | 40 % | Used for processing CPU check of respective agent. |
| selfHealAct | restart | This is to start, stop, or restart the agent. |
| PURGE_LOGS | 5 days | To delete the logs which are older than X days. |
| LOG_Enable | Yes | To enable logging. Set as Yes to enable the logging. This is for selfheal logging. |
| SER_LOG_ENABLE | Yes | To enable service logging. |
| persistence | 3 (consecutive number of times) | Persistence duration after which remedial action (stop/restart) is taken. If the configured threshold is breached for the 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 Supervisor. If the self-heal script gets the thresholds as below the configured thresholds for consecutive "PERSIST_DURATION", then the "Start" action is performed on the respective agent. Note: Every time when the "Start" action comes from the UI or every time when the selfHeal.sh script is invoked, the CPU & memory utilisation is checked, and if the values are lower than the configured values, then only the "Start" action is performed. |
Note:
Ensure both the key attributes are valid and not empty, if invalid or empty component agent will stop its service.
6. Configure heap size in the component agent as follows:
Note:
The agent should be installed to change heap memory.
a. Navigate to the directory,
/<path-to>/ComponentAgent/<physical-agent-identifier>/service/
For example:
E:/Agents/AgentHealthStatus/ComponentAgent/e570de02-c585-4917-bbb7-5c97b35e-physical-112/service
b. Open the installservice.bat file in Notepad or Notepad++.
c. Find the command line arguments "Xms" & "Xmx".
d. Provide values as per the requirement and resources available.
For example:
-Xms512m -Xmx1024m
e. Save the file.
f. Execute the command prompt as administrator and navigate to the below directory.
/<path-to>/ComponentAgent/<physical-agent-identifier>/service/
For example:
E:/Agents/AgentHealthStatus/ComponentAgent/e570de02-c585-4917-bbb7-5c97b35e-physical-112/service
g. Execute the uninstallservice.bat file. This uninstalls the agent.
h. Execute the installservice.bat file. This installs the agent. Here onwards the changed xms & xmx values take effect.
7. Component Agent collects KPIs using producers. ShellProducer collects Windows and IIS KPIs. The collection of KPIs happens without checking host address, domain, username, and password attributes for Windows and IIS. These attributes are needed for creating component instances.
8. Default KPI collection frequency is 1 minute. It should always be in multiples of 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>;
9. Configuring advanced attributes for the component agent:
This is for fine-tuning of CA.
a. Navigate to the below directory.
component-agent-core/config
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 in 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. minute.threadpool.maximum.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 threadpool 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, and 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. |
10. To access the forensic data through CA, add the below forensic script in the above directory:
<agents>/ForensicAgent/<forensic agents ID>