Configure Telegraf Integration on Partner Gateway
search cancel

Configure Telegraf Integration on Partner Gateway

book

Article ID: 381140

calendar_today

Updated On:

Products

VMware VeloCloud SD-WAN

Issue/Introduction

This article provides a step-by-step configuration guide for setting up Telegraf on VMware SD-WAN Private Gateway. Telegraf, a plugin-driven agent for collecting and sending metrics, can be integrated with VMware SD-WAN to gather metrics for enhanced monitoring and visibility. It can be configured to output data to Wavefront or Prometheus and receive syslog data from the gateways.

Environment

 

  • Product: VMware SD-WAN by VeloCloud
  • Components: VMware SD-WAN Private Gateway, Telegraf monitoring agent, Wavefront/Prometheus
  • Network Requirements: Ensure the required ports are open and accessible for communication between Telegraf and the monitoring tools.

 

Resolution

CONFIGURATION STEPS

1. Install Telegraf and Configure Input and Output Plugins

Telegraf Input Plugin
The Input plugin is defined in the file /etc/telegraf/vcg_metrics.py. This file includes the necessary counters to be collected from the gateway.

Telegraf Output Plugin
The output can be configured for either Wavefront or Prometheus, depending on your monitoring requirements.

 

2.Configure Telegraf Output for Wavefront

Open the Telegraf configuration file, usually located at /etc/telegraf/telegraf.conf.
Configure the Wavefront output settings with the following command:

[[outputs.wavefront]]
host = "wavefront_proxy_IP"
port = 2878
metric_separator = "."
source_override = ["hostname", "agent_host", "node_host"]
convert_paths = true

Replace wavefront_proxy_IP with the actual IP address of the Wavefront proxy server.

 

3. Configure Telegraf Output for Prometheus
To set up Prometheus as the output plugin, add the following configuration in telegraf.conf:

[[outputs.prometheus_client]]
listen=":9273"
metric_version=2

The listen parameter defines the port on which Telegraf will expose the metrics to be scraped by Prometheus.


4. Configure Telegraf Permissions and Add IP Table Rules

Add Telegraf to Sudo Group
For Telegraf to run the /opt/vc/bin/dispcnt command (required for metrics collection), it needs sudo privileges. Run: "sudo usermod -G sudo telegraf"

       
       To allow access from external monitoring systems, add IP table rules for Wavefront and Prometheus:

       For Wavefront:  
       sudo iptables -I INPUT -p tcp -m tcp --source <wavefront_proxy_IP> --sport 2878 -m comment --comment "wavefront" -j ACCEPT

       For Prometheus:
       sudo iptables -I INPUT -p tcp -m tcp --source <prometheus_IP> --dport 9273 -m comment --comment "prometheus" -j ACCEPT

       Persistence:
       Since IP table rules are not persistent across reboots, save them using:

 

5. Restart Telegraf Service

After configuring the plugins and IP table rules, restart Telegraf to apply changes:

      systemctl restart telegraf