Warning
This article was automatically translated by OpenAI (gpt-4o).It may be edited eventually, but please be aware that it may contain incorrect information at this time.
Installing Wavefront Proxy on Rocky Linux.
In this article, we will use OrbStack Linux Machine as the Rocky Linux environment.
Table of Contents
Creating a Linux Machine
orb create -a amd64 rocky:8 wf-proxy
Access the shell.
orb shell -m wf-proxy
Install the CLI tools needed for the task.
sudo yum update -y && sudo yum install wget less vim jq -y
Installing JDK
Java 11 is recommended. Install Bellsoft's Liberica JDK using yum.
echo | sudo tee /etc/yum.repos.d/bellsoft.repo > /dev/null << EOF
[BELLSOFT]
name=BELLSOFT Repository
baseurl=https://yum.bell-sw.com
enabled=1
gpgcheck=1
gpgkey=https://download.bell-sw.com/pki/GPG-KEY-bellsoft
priority=1
EOF
sudo yum update
sudo yum install bellsoft-java11 -y
$ java -version
openjdk version "11.0.23" 2024-04-16 LTS
OpenJDK Runtime Environment (build 11.0.23+12-LTS)
OpenJDK 64-Bit Server VM (build 11.0.23+12-LTS, mixed mode, sharing)
Installing Wavefront Proxy
Refer to https://docs.wavefront.com/proxies_manual_install.html and install using yum.
curl -s https://packagecloud.io/install/repositories/wavefront/proxy/script.rpm.sh | sudo bash
sudo yum install wavefront-proxy -y
Configure Wavefront Proxy in /etc/wavefront/wavefront-proxy/wavefront.conf.
Set the WAVEFRONT_URL and API Token. Also, enable reception via OTLP (OpenTelemetry Protocol).
WAVEFRONT_URL=https://<tanent_id>.wavefront.com/api
WAVEFRONT_TOKEN=*******
WAVEFRONT_PROXY_NAME=${HOSTNAME}
sudo sed -i.bak \
-e "s|server=SERVER_URL_HERE|server=${WAVEFRONT_URL}|" \
-e "s|#proxyname=my.proxy.name.com|proxyname=${WAVEFRONT_PROXY_NAME}|" \
-e "s|#token=WF_TOKEN_HERE|token=${WAVEFRONT_TOKEN}|" \
-e "s|#otlpGrpcListenerPorts=4317|otlpGrpcListenerPorts=4317|" \
-e "s|#otlpHttpListenerPorts=4318|otlpHttpListenerPorts=4318|" \
/etc/wavefront/wavefront-proxy/wavefront.conf
Start the Wavefront Proxy.
sudo service wavefront-proxy start
If the status is running, it is OK.
$ sudo service wavefront-proxy status
Wavefront Proxy is running (PID 3731)
You can check the logs with the following command.
tail -f /var/log/wavefront/wavefront.log
2024-06-04 17:32:18,500 INFO [proxy:main] Wavefront Proxy version 13.5 (pkg:jar), runtime: OpenJDK Runtime Environment (BellSoft) 11.0.23
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/opt/wavefront/wavefront-proxy/bin/wavefront-proxy.jar!/BOOT-INF/lib/log4j-slf4j-impl-2.23.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
2024-06-04 17:32:18,629 INFO [Utils:detectLocalHostName] Hostname: 'wf-proxy' (detected using 'hostname' command)
2024-06-04 17:32:18,830 INFO [proxy:start] Wavefront Proxy version 13.5 (pkg:jar), runtime: OpenJDK Runtime Environment (BellSoft) 11.0.23
2024-06-04 17:32:18,832 INFO [proxy:start] OS Max File Descriptors: 1048576
2024-06-04 17:32:20,008 INFO [ProxyConfig:parseArguments] modifyByArgs: pushConfigFile
2024-06-04 17:32:20,072 INFO [ProxyConfig:parseArguments] modifyByFile: server, pushListenerPorts, otlpHttpListenerPorts, proxyname, otlpGrpcListenerPorts, token
2024-06-04 17:32:20,080 INFO [ProxyConfig:constructTenantInfoObject] Wavefront api token for further authentication. For the server https://vmware.wavefront.com/api
2024-06-04 17:32:20,093 INFO [ProxyConfig:parseArguments] Unparsed arguments:
2024-06-04 17:32:20,094 INFO [ProxyConfig:parseArguments] Using proxyname:'wf-proxy' hostname:'wf-proxy'
2024-06-04 17:32:20,103 INFO [ProxyConfig:parseArguments] Config: (* command line argument)
2024-06-04 17:32:20,104 INFO [ProxyConfig:parseArguments] * pushConfigFile = /etc/wavefront/wavefront-proxy/wavefront.conf
2024-06-04 17:32:20,104 INFO [ProxyConfig:parseArguments] server = https://vmware.wavefront.com/api
2024-06-04 17:32:20,104 INFO [ProxyConfig:parseArguments] pushListenerPorts = 2878
2024-06-04 17:32:20,105 INFO [ProxyConfig:parseArguments] otlpHttpListenerPorts = 4318
2024-06-04 17:32:20,105 INFO [ProxyConfig:parseArguments] proxyname = wf-proxy
2024-06-04 17:32:20,105 INFO [ProxyConfig:parseArguments] otlpGrpcListenerPorts = 4317
2024-06-04 17:32:20,105 INFO [ProxyConfig:parseArguments] token = ******
2024-06-04 17:32:20,189 INFO [proxy:getOrCreateProxyId] Ephemeral proxy id created: 300fcde5-6d59-467c-b227-5a4b17f01ed3
2024-06-04 17:32:22,284 INFO [proxy:checkin] Checking in tenants: https://vmware.wavefront.com/api
2024-06-04 17:32:24,290 INFO [proxy:<init>] initial configuration is available, setting up proxy
2024-06-04 17:32:24,299 INFO [proxy:processConfiguration] Proxy trace span sampling rate set to 0.05
2024-06-04 17:32:24,449 INFO [proxy:scheduleCheckins] scheduling regular check-ins
2024-06-04 17:32:24,923 INFO [ProxySendConfigScheduler:lambda$new$0] Configuration sent to the server successfully.
2024-06-04 17:32:26,002 INFO [proxy:lambda$startListeners$8] listening on port: 2878 for Wavefront metrics
2024-06-04 17:32:26,086 INFO [proxy:startOtlpGrpcListener] listening on port: 4317 for OTLP data over gRPC
2024-06-04 17:32:27,834 INFO [proxy:startOtlpHttpListener] listening on port: 4318 for OTLP data over HTTP
2024-06-04 17:32:32,869 INFO [proxy:run] setup complete
...
You can check if the Proxy is registered on the Wavefront SaaS side with the following command.
curl -s -H "Authorization: Bearer ${WAVEFRONT_TOKEN}" "${WAVEFRONT_URL}/v2/proxy?offset=0&limit=100" | jq '.response.items | map(select(.hostname == "wf-proxy" and .status == "ACTIVE"))'
You can check the metrics of the Wavefront Proxy itself on the "Operations for Applications Service and Proxy Data" dashboard (https://<tenant_id>.wavefront.com/dashboards/integration-system).
Filter by entering source=wf-proxy in the "Filter".
Let's send some test data.
$ curl -sv http://localhost:2878 -X POST -d "test.metric 100 source=test.source"
> POST / HTTP/1.1
> Host: localhost:2878
> User-Agent: curl/7.61.1
> Accept: */*
> Content-Length: 34
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 202 Accepted
< content-type: text/plain
< content-length: 0
< connection: keep-alive
<
You can confirm that the data is received on the SaaS side from the dashboard.
Check the sent metrics from "Browse" -> "Metrics". Filter by entering test.metrics in "Metrics".
Installing Telegraf
Install Telegraf as an agent to send metrics to Wavefront Proxy.
This time, we will install Telegraf in the same environment as the Wavefront Proxy.
Refer to https://docs.wavefront.com/proxies_manual_install.html#installing-telegraf-manually and install telegraf using yum.
curl -s https://packagecloud.io/install/repositories/wavefront/telegraf/script.rpm.sh | sudo bash
sudo yum install telegraf -y
Use the output plugin for Wavefront Proxy.
https://github.com/influxdata/telegraf/blob/master/plugins/outputs/wavefront/README.md
cat <<EOF | sudo tee -a /etc/telegraf/telegraf.d/10-wavefront.conf
[[outputs.wavefront]]
url = "http://localhost:2878"
metric_separator = "."
source_override = ["proxyname", "agent_host", "node_host"]
convert_paths = true
EOF
If you are installing it in a different environment from the Wavefront Proxy, use the IP or hostname of the Wavefront Proxy instead of localhost.
Start telegraf.
sudo service telegraf start
You can check the logs with the following command.
$ journalctl -u telegraf
-- Logs begin at Tue 2024-06-04 16:32:31 JST, end at Wed 2024-06-05 00:53:00 JST. --
6月 05 00:52:51 wf-proxy systemd[1]: Starting Telegraf...
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loading config: /etc/telegraf/telegraf.conf
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loading config: /etc/telegraf/telegraf.d/10-wavefront.conf
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Starting Telegraf 1.28.2 brought to you by InfluxData the makers of InfluxDB
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Available plugins: 240 inputs, 9 aggregators, 29 processors, 24 parsers, 59 outputs, 5 secret-stores
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loaded inputs: cpu disk diskio kernel mem processes swap system
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loaded aggregators:
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loaded processors:
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loaded secretstores:
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Loaded outputs: wavefront
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! Tags enabled: host=wf-proxy
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"wf-proxy", Flush Interval:10s
6月 05 00:52:52 wf-proxy systemd[1]: Started Telegraf.
6月 05 00:52:52 wf-proxy telegraf[7751]: 2024-06-04T15:52:52Z I! The Wavefront SDK will communicate with a Wavefront Proxy.
6月 05 00:53:00 wf-proxy telegraf[7751]: 2024-06-04T15:53:00Z I! [inputs.processes] Unknown state "0" in file "/proc/7751/stat"
You can check the metrics of the host where Telegraf is installed on the "Linux Host" dashboard (https://<tenant_id>.wavefront.com/dashboards/integration-linux-host).