# /opt/vmware/ucp/ucp-telegraf/usr/bin/telegraf -config /tmp/ucp-debug/telegraf.conf -test return:
YYYY-MM-DDTHH:MM:SS E! [inputs.jolokia2_agent] Error in plugin: unable to gather metrics for "http://localhost:<port>/jolokia": Post "http://localhost:<port>/jolokia/read": dial tcp [::1]:<port>: connect: connection refused
# curl -I -k https://[IP_ADDRESS]:<port>/jolokia/version return:
HTTP/1.1 503 Service Unavailable
VMware Aria Operations 8.18.x
The issue occurs because the Jolokia agent, which is a required prerequisite for gathering JMX metrics from WebLogic, is either not deployed, not started within the WebLogic environment, or is being accessed via an incorrect protocol/address.
The "Connection Refused" error typically indicates the Telegraf agent cannot reach the Jolokia listener on the specified port.
To successfully collect WebLogic metrics, follow these steps to deploy Jolokia and update the Telegraf configuration.
Base URL: https://localhost:<port>
Installed Path: The path on the target machine where WebLogic is installed.
Skip SSL Verification: true