Linux Host Integration
Monitoring Linux hosts is easy with Wavefront. This integration installs and configures Telegraf to send host metrics into Wavefront. Telegraf is a light-weight server process capable of collecting, processing, aggregating, and sending metrics to a Wavefront proxy.
In addition to setting up the metrics flow, this integration also installs a dashboard. Here’s the CPU section of a dashboard displaying Linux host metrics.
To see a list of the metrics for this integration, select the integration from https://github.com/influxdata/telegraf/tree/master/plugins/inputs.
Linux Host Setup
This integration uses various Telegraf input plugins and offers several setup options
- Use a proxy already running in your environment (preferred) or create a new proxy.
- Install the Wavefront proxy and Telegraf agent on the same host or on separate hosts.
You can choose automatic installation or manual installation and configuration. For proxy installation prerequisites, see the Proxy Host Requirements.
Install Wavefront Proxy and Telegraf Agent Automatically
Log in to your Operations for Applications instance, navigate to the integration, and follow the instructions on the Setup tab to install Telegraf and the Wavefront proxy in your environment. If a proxy is already running in your environment, you can select that proxy and the Telegraf install command connects with that proxy. Sign up for a free trial to check it out!
Install and Configure Wavefront Proxy and Telegraf Agent Manually
You can install the Wavefront proxy and Telegraf agent manually from our package cloud repositories.
- Install the Wavefront proxy packages.
- Go to the Wavefront proxy directory created during the package installation:
cd /opt/wavefront/wavefront-proxy
. - Run the interactive configuration script:
bin/autoconf-wavefront-proxy.sh
. The script prompts you for the following properties:- server - https://YOUR_CLUSTER.wavefront.com/api/
- token - YOUR_API_TOKEN
- proxyname - A name (alphanumeric plus periods) unique across your entire account representing the machine that the proxy is running on. The proxyname is not used to tag your data; rather, it’s used to tag data internal to the proxy, such as JVM statistics, per-proxy point rates, and so on.
- enable graphite - Indicate whether to enable the Graphite format. See the Graphite integration for details on Graphite configuration.
When the interactive configuration is complete, the Wavefront proxy configuration at
/etc/wavefront/wavefront-proxy/wavefront.conf
is updated with the input that you provided and thewavefront-proxy
service is started.
- Restart the proxy:
sudo service wavefront-proxy restart
(Optional). - Verify that the proxy has registered with the Wavefront server.
- Install the Telegraf packages.
- Create a file called
10-wavefront.conf
in/etc/telegraf/telegraf.d
and enter the following:[[outputs.wavefront]] host = "WAVEFRONT_PROXY_ADDRESS" port = 2878 metric_separator = "." source_override = ["proxyname", "agent_host", "node_host"] convert_paths = true
- Restart the Telegraf agent:
sudo service telegraf restart
Uninstall the Wavefront Proxy and Telegraf Agent
Debian/Ubuntu:
sudo apt-get remove wavefront-proxy
sudo apt-get remove telegraf
RHEL/CentOS:
sudo yum remove wavefront-proxy
sudo yum remove telegraf
Linux Logs Setup (Beta)
This integration uses Fluentd input plugins and offers several setup options. For Fluentd installation prerequisites, see the Fluentd Requirements.
- Use a proxy already running in your environment (preferred) or install a new proxy.
- Install the Wavefront proxy and Fluentd agent on the same host or on separate hosts.
Install the Wavefront Proxy
The Wavefront proxy is required to send logs from your systems into Tanzu Observability. If you have not already done so, install a Wavefront proxy (version 11.4 or later).
Install Fluentd
Install Fluentd to send logs data to Wavefront proxy.
-
See the prerequisites for installing Fluentd.
-
To install the stable distribution package of Fluentd, called
td-agent
, use one the following cURL commands, depending on the Linux distribution that you use:# Ubuntu 20.04 Focal curl -L https://toolbelt.treasuredata.com/sh/install-ubuntu-focal-td-agent4.sh | sh # Debian Bullseye curl -L https://toolbelt.treasuredata.com//sh/install-debian-bullseye-td-agent4.sh | sh # Redhat/CentOS 7/8 curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh
The command automatically installs Fluentd and starts the daemon. To make sure that everything is running as expected, run the following command:
systemctl status td-agent.service
If you use a different Linux distribution, see the Fluentd installation documentation.
Configure Fluentd
Use the following example to configure the input and output sources for Fluentd logs. In this example, we’ll use syslog logs as the input.
- Open the Fluentd configuration file:
sudo vi /etc/td-agent/td-agent.conf
- Define syslog as the input source for Fluentd:
# You can add additional files as sources. <source> @type tail path /var/log/syslog pos_file /var/log/td-agent/syslog.pos pos_file_compaction_interval 72h read_from_head true format none path_key tailed_path tag linux.syslog </source>
- Define the Wavefront proxy as a “match” (the Fluentd term for an output destination):
# ------- Tagging and sending the tags to the Wavefront proxy. ------- # You can add additional fields. <filter linux.**> @type record_transformer enable_ruby <record> source ${hostname} timestamp ${time.to_datetime().strftime('%Q')} log_integration_source "linux" service ${tag_suffix[-1]} application wavefront </record> </filter> <match linux.**> @type copy <store> @type http endpoint http://WAVEFRONT_PROXY_ADDRESS:2878/logs/json_array?f=logs_json_arr open_timeout 2 json_array true <buffer> flush_interval 10s </buffer> </store> </match>
Replace WAVEFRONT_PROXY_ADDRESS with the address of your Wavefront proxy.
Restart Fluentd
Restart the Fluentd service:
systemctl restart td-agent.service
View the Linux Logs
In the Logs Browser you can see your Linux logs. You can also search and filter the logs, and troubleshoot your issues.