Automate Telegraph Agent Installation using SaltStack for Application Monitoring in vROPs Cloud

In this blog, I would demonstrate how to automate the installation of Telegraph Agent using SaltStack. It is required for vROPs Cloud Application Monitoring. 

Once you have it successfully installed you can discover the supported services in vROPs Cloud. 

In my example, I have Apache HTTPd service installed on the CentOS machine running on VMware Cloud on AWS SDDC. 

You can also refer to my previous blog on how to automate log insight agent using salt stack. 

Pre-requisites

Following are the pre-requisites 
  • Working Setup of Saltstack with Master and Minion
    • I have 1 Master and 1 Minion on CentOS, and I will be installing a telegraph agent on the minion 
  • vROPs Cloud Proxy deployed and the vCenter where the VM has been deployed is added in vROPs Cloud 
  • vROPs Cloud Proxy is accessible from the Salt Stack minion. 
  • As we will be using the install script to deploy the agent all the required pre-requisites should be completed as per the documentation.

Procedure

The following section includes steps for installing Telegraph Agent using salt stack.

Step 1

Create the state file vrops-agent.sls. You can refer to the documentation on How to use/create the Salt States

copy-script:
   cmd.run:
      - name: sudo curl -k \"https://CloudProxyIPorFQDN/downloads/salt/download.sh\" --output /tmp/download.sh
make-script-executable:
   cmd.run:
      - name: sudo chmod +x /tmp/download.sh
install-vrops-agent:
   cmd.run:
      - name: sudo /tmp/download.sh -o install -t -d /tmp

Update the Cloud Proxy IP/FQDN which will be the source of the download.sh script

Step 2 

Test execute of the state file and ensure it succeeds 
salt  state.sls vrops-agent test

Step 3

Apply the state file to the minion
salt  state.sls vrops-agent

If you want to push it to all the minions that you can just use the following

salt \'*\' state.sls vrops-agent

When  you use an automation script, concurrent agent installation with a batch size of 20 is supported 

Step 4

Verify agent on the vROPs 

Once you configure the Service Discovery you should be able to see discover services 

 

 

0 thoughts on “Automate Telegraph Agent Installation using SaltStack for Application Monitoring in vROPs Cloud

Leave a Reply

Your email address will not be published.

%d bloggers like this: