Telegraf Agent Unhealthy Due to Capitalized Boolean in HTTP Plugin Configuration
search cancel

Telegraf Agent Unhealthy Due to Capitalized Boolean in HTTP Plugin Configuration

book

Article ID: 435962

calendar_today

Updated On:

Products

VCF Operations

Issue/Introduction

While saving the HTTP plugin configuration, the insecure_skip_verify field is incorrectly populated with the capitalized string True instead of the lowercase true. This causes a parsing failure within the Telegraf configuration, resulting in the Telegraf Agent entering an Unhealthy state.

Environment

VCF Operations 9.0.x
VCF Operations Cloud Proxy 9.0.x

Cause

The Telegraf configuration parser requires boolean values to be strictly lowercase. The injection of a capitalized True value causes a syntax validation failure during service startup.

Resolution

To rectify the configuration parsing failure and restore the Telegraf Agent health, perform the following steps:

1. Extract the current configuration to a temporary debugging directory:

   /opt/vmware/ucp/ucp-minion/bin/ucp-minion.sh --config /opt/vmware/ucp/salt-minion/etc/salt/grains --action xtract_config --dest_dir=/tmp/ucp-debug/
   
2. Execute a configuration test to validate the parsing error and identify the exact line failure:

   /opt/vmware/ucp/ucp-telegraf/usr/bin/telegraf -config /tmp/ucp-debug/telegraf.conf -test
   
3. Edit the extracted configuration file (/tmp/ucp-debug/telegraf.conf) and replace the capitalized True keyword with true for the insecure_skip_verify field.

4. Edit the secondary plugin file (/tmp/ucp-debug/telegraf) and similarly replace any True keywords with true.

5. Copy the corrected configuration files back to their active directories:

    cp /tmp/ucp-debug/telegraf.conf /opt/vmware/ucp/ucp-telegraf/etc/telegraf/
  cp /tmp/ucp-debug/telegraf /opt/vmware/ucp/plugins/
   
6. Restart the UCP minion service:

    systemctl restart ucp-minion
   
7. Restart the Telegraf service:

   systemctl restart ucp-telegraf