Automatic Agent Deployment
Introduction
The Automatic Agent Deployment feature allows you to deploy select monitoring agents to one or more monitorable systems at one time. This feature is also useful for conducting periodic agent version checks and can be used to update one or many agents.
NOTE: This feature’s functionality assumes your Nagios xi instance has the necessary dependencies and network configurations.
How To Get There
Navigate to Configure > Deploy Agent on the Nagios xi banner menu.
The Deploy Agent screen is the default landing page. There is also a new Auto Deployment menu on the left navigation menu that displays additional Automatic Deployment options.
Deploy Agent
Nagios xi now allows you to deploy agents automatically to one or many systems with the click of a button. The automatic deployment of agents to your monitored systems has several advantages:
- Saves countless hours of individual installation and setup of monitored systems
- Ensures that each system you deploy to has the same version of the agent installed
- Much less maintenance due to the centralized location of agent management
The Deploy Agent page is simple and powerful. The fields and processes on the page are detailed below.
Fields
IP Addresses: Enter one or more host IP addresses. Separate addresses with a carriage return. NOTE: If entering more than one host, the hosts entered must have the same operating system and username/password combination.
Operating System: The operating system of the host system(s). The currently supported operating systems are:
- Linux
- Mac OS X
- Solaris
Auth Type: The type of authorization used to access the host.
Username and Password: The user account and password with appropriate administrative or root level access.
Agent Software: The agent that will be deployed to the host(s).
Process
To Deploy an Agent:
- Enter host data into all the fields on the Deploy Agent screen.
- Click Deploy.
- The system will attempt to deploy the selected agent.
- After the deployment has been initiated, the status of each installation will be shown.
- If the agent installation fails on any remote system, the error that occurred will be displayed. See Troubleshooting.
- After agents have been successfully installed, you can click on the Run Wizard button to run the agent configuration wizard on the selected host system. If your agent deploy fails, you can make the necessary changes and click on the Run Again button to re-run the deploy.
Important Notes
- NCPA tokens are set in the Deployment Settings screen. All NCPA deployments will use the same token.
- Python must be installed on any Linux or Solaris remote host systems. Install python if necessary.
Example: - All remote host systems must have accessibility to the Internet in order to install the most recent version of the monitoring agent.
- If deploying an agent from Nagios xi hosted on Centos 6, a python file called ‘python’ must exist in /usr/bin/ on any systems you are deploying to that are EL-8 (Centos 8 or RHEL 8). One method of accomplishing this is to copy the EL-8 version of python (python3, python2, etc…).
Example:
- An ssh key only server will not be able to use Automatic Agent Deploy.
- Debian/Ubuntu requires sshpass to be installed.
Manage Deployed Agents
You can easily manage your deployed agents through the Manage Deployed Agents page. The page contains agent details like version, status, OS, and vital dates. The interval that the system uses to monitor deployed agents is set on the Deployment Settings page.
You can also add an agent to monitor on a system that is not currently supported in Automatic Agent Deployment (ex. Windows).
Fields
IP Addresses/Hostname: Address of host.
Agent Status: The status returned after last status check.
Agent: The name of the agent deployed.
Agent Version: The version number of the agent deployed.
OS: Operating system of host.
Last Status Check: The date and time of the last status check.
Last Update: The date and time of the last agent update.
Creator: Name of the logged in user that deployed the agent.
Deployed/Added On: The date and time the agent was deployed.
Actions:
- Run Wizard – Runs the configuration wizard of the agent.
- Edit – Provides the ability to edit agent information.
- Remove – Removes the deployed agent record from the Managed Deployed Agents list. Status checks will no longer be run on the agent.
Processes
To update an NCPA token on an agent:
If an NCPA token is updated on the host system, you can update that token in the Managed Deployed Agents list.
- Find the agent to update in the Managed Deployed Agents list.
- Click on the edit icon on the record.
- Enter the updated NCPA token in the resulting popup window.
- Click Save.
To add an agent that is already deployed (Example: Windows Server):
If you want to manage and check the status of an agent that has already been deployed on a host (a NCPA agent on a windows server for example), you can add that agent to the Managed Deployed Agents list.
- Click the Add Agent button.
- Fill in the required data on the resulting popup window.
- Click Add.
Deployment Settings
Based on your business needs, you can set the interval that Nagios xi will check the status of the deployed agents. You can also change the NCPA token that will be distributed among your deployments to a universal token that is already in use by your business.
Fields
Status Check Interval: The interval that Nagios xi will conduct status checks on deployed agents that will display on the Manage Deployed Agents page. Time interval is in hours.
NCPA Token: The token that will be used in each new NCPA agent deployment.
Process
- Choose the hourly interval to run status checks on agents.
- Enter an NCPA token to deploy across managed hosts.
- Click Update Settings.
Important Notes
- The token saved here will be the same token applied to all agent deployments through the Automatic Agent Deployment feature on this instance of Nagios xi.
Troubleshooting
Common Deploy Failure Messages
On deploy failure, the verbose message displayed should be informational enough to troubleshoot the issue. A couple of common errors and solutions are:
- Python does not exist on host system – Install python or ensure that /usr/bin/python exists.
- User does not have root access – Change the username to a user that has root access or can sudo into root.
- Ansible version on the Nagios xi system is too low to deploy to this host – Update ansible version on the Nagios xi system.
- To use the 'ssh' connection type with passwords, you must install the sshpass program - Install sshpass on the Nagios xi system.
View Auto Deploy Jobs and Raw Output
On the Deploy Agent screen, you can click on the View past auto deploy jobs link to view a list of past Automatic Deployment jobs. From there, you can view raw job output to troubleshoot issues or re-run the deploy job.
Scroll down to find the job record you are interested in. You can troubleshoot possible issues by viewing raw job output, drill into the job name to re-run the auto deploy job, or remove the job from the job list.
Processes
- Click on the View Raw link to display the raw job output. This output shows all the ansible tasks, data, and error messages (if applicable).
- Click the X icon on the record to remove the job from the Deploy Agent Jobs list.
- Click on the job name link to go back to the deploy results screen for the job. You can run the Configuration Wizard by clicking Run Wizard or attempt another deployment by clicking Run Again.