Bulk Installation of Linux agent using Puppet
Unattended installation of the Linux agent can be done using Puppet by performing the below-mentioned steps.
Supported Flavors
Debian, Ubuntu, CentOS, RedHat, Fedora, Suse
Prerequisite
curl - This command is needed in all the Puppet Agent machines where the OpManager Nexus server monitoring agent needs to be installed.
Params
- $site24x7agent_devicekey = Your device key is available under the OpManager Nexus Add Server Monitor page. Log in to your OpManager Nexus account and navigate to Home > click on the (+) icon next to Monitors and click on Linux Server Monitoring. You can find the key in the command panel.
- $site24x7agent_proxy = Proxy server required to connect to the OpManager Nexus servers. Example : user:password@proxyhost:proxypor
Installation Steps:
- Execute the following command in the Master Puppet machine terminal:
puppet module install site24x7-site24x7_agent
- After executing the installation command in your Master Puppet machine terminal, edit the file to enter your device key:
etc/puppetlabs/code/environments/production/modules/site24x7/manifests/params.pp
- Set '$site24x7agent_devicekey' with your unique OpManager Nexus device key.
Example:
$site24x7agent_devicekey = 'xxxxxxxxxxxxxxxxxxxxxxxx'
- Set the proxy attribute, if needed.
Example:
$site24x7agent_proxy= "user:password@proxyhost:proxyport
- If proxy is needed for downloading OpManager Nexus Linux Server Monitoring Agent, kindly uncomment the environment value in the download_handler.pp file. This confirms that the proxy you've mentioned in the params.pp file is the proxy needed for downloading the agent file.
- Edit the file, /etc/puppetlabs/code/environments/production/manifests/site.pp to include the OpManager Nexus module and to specify the machine on which you want the OpManager Nexus agent to be installed.
Example to install in all the Puppet Agent machines:
Example to install in specific Puppet Agent machines:node default
{
class { 'site24x7': }
}
node "hostname1","hostname2"
{
class { 'site24x7': }
}NoteHostname is the hostname of the puppet agents and should be written within quotes.
- Your Master Puppet machine will automatically install the OpManager Nexus Server Monitoring Agent in all the Puppet Agents within the configured interval, which is by default, 30 minutes. This interval can be altered in the puppet.conf file in your Master Puppet machine. If it doesn't, execute the following command in those Puppet Agent machines:
puppet agent -t
- View your servers from your OpManager Nexus account: https://www.site24x7.com.
Uninstallation steps:
Execute the following command in the Master Puppet machine to uninstall the OpManager Nexus Server Monitoring Agent:
puppet module uninstall site24x7-site24x7_agent --ignore-changes
Refer this link to uninstall the OpManager Nexus Server Monitoring Agent from specific Puppet Agent machines.
Related Articles
- Add a Linux server monitor
- Bulk install using Ansible
- Bulk install using Chef
- Bulk install using SaltStack
- Remote install using SSH