Anchor | ||||
---|---|---|---|---|
|
Info |
---|
Agents are the tools data collectors of Insights. These are python snippets which connects to DevOps tools and collect data using REST protocol. Each agents needs to be registered in system (Postgres DB, agent_configuration table) to start collecting data. Agent Management section under 'Configuration' helps to Add / Change Status / Edit / Delete Agents. When Insights is installed, one of the important steps is to install Agent Daemon. This is daemon process running on server where you want to run your tools agents. Daemon Agents helps Insights in Adding / Changing Status / Editing / Deleting Agents. Daemon Agent needs connectivity to RabbitMQ. It is essential to ensure that agent Daemon is running (preferably on server 2, or as per the requirement) prior to registering an Agent from Insights UI (Under Configuration). We recommend to take latest artifacts for PlatformService.war , PlatformEngine.jar and UI app. NOTE - Current out-of-box agent daemon and agents support Windows, RHEL 7.x, CentOS 7.5.x and Ubuntu 16.04 OS. For other OS flavors, one need to follow specific instructions given below in Other OS section. Agent Daemon is available in doc root at - https://infra.cogdevops.com:8443/repository/docroot/insights_install/release/latest/agentdaemon.zip Follow below installation instructions for Daemon agent configuration. |
Expand | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
On Agent server
For example - D:\\Agents\\AgentDaemon and D:\\Agents\\PlatformAgents
Create AgentDaemon as service - RHEL 7.x/Ubuntu/CentOS OS
Windows OS
Once agent daemon start running successfully, it should have creates a queue in RabbitMQ with name 'INSIGHTS.AGENTS.PACKAGE' On Application/Platform server (Tomcat)
server-config.json should be updated as follows -
Offline agent registration
For Example typical structure assuming offlineAgentPath as "D://download//agents" -- "D:\\download\\agents\v1.0\git\com\cognizant..." "D:\\download\\agents\v1.0\jenkins\com\cognizant..." Deploy new PlatformService WAR Run below SQL query to register Daemon Agent using PostgreSQL pgAdmin tool (Administration tool or SQL developer for PostgreSQL) Update highlighted value '{"key":"value"}' in below query with daemon config.json.
|
Expand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
1. Stop all existing running agents 2. Make sure agents are in stop states. 3. Very Important - Take backup of existing agent code including tracking.json. This tracking.json is used during re-registration purpose. 4. Let Insights Engine consume all queues data. Verify all the queues have 0 pending data 5. Shut down Insights Engine. 6. Undeploy PlatformService WAR 7. Take back up of AGENT_CONFIGURATION table in PostgreSQL 8. DELETE all records from AGENT_CONFIGURATION table in PostgreSQL (using PostgreSQL pgAdmin tool (Administration tool or SQL developer for PostgreSQL)) after taking backup 9. DROP unique constraint on 'unique_key' column in PostgreSQL DB if you have that column. 9. Deploy new PlatformService WAR. 10. Register all required agents using Agent management tab under Configuration tab in Admin screen. Follow Agent Management
11. Update all latest records from all health record.
12. Validate all agents are running successfully and collecting data as usual |
Info |
---|
Other OS Running an application as a OS service differs based on Unix flavor. For example, Linux RHEL it runs from /etc/init.d folder, in Ubunut it runs from /etc/systemd/system. Hence to run agent daemon and agents on OS other than Insights supported OS version, follow below steps.
If you have successfully run agents on OS other than currently supported OS version, we will encourage you to check-in those files in Github repository to help others. |