-
Notifications
You must be signed in to change notification settings - Fork 126
Consul: Update monitor/telemetry/telegraf for v1.21 and v1.22 #1504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Vercel Previews Deployed
|
Broken Link CheckerNo broken links found! 🎉 |
boruszak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to implementing the style guide suggestions, please review the telegraf.conf configuration and the explanation that follows it. Make sure names and their order are aligned, and see my comment about the matching interfaces on inputs.net. Are you telling the user to change this value, or use it for Consul?
| Telegraf even includes a [plugin][telegraf-consul-input] that monitors the | ||
| health checks associated with the Consul agent, using Consul API to query the | ||
| data. | ||
| The `telegraf.conf` file starts with global options - you set the default collection interval to 10 seconds and ask Telegraf to include a `host` tag in each metric. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you break this down using the terms in the configuration example? "Flush interval" is set in the agent group, which appears before the global settings. And is it host that's added or the actual hostname?
|
|
||
| It's important to note: the plugin itself will not report the telemetry, Consul | ||
| will report those stats already using StatsD protocol. | ||
| Telegraf also allows you to set additional tags on the metrics that pass through it. In this case, you are adding tags for the server role `consul-server` and datacenter `us-east-1`. You can further use these tags in Grafana to filter queries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Telegraf also allows you to set additional tags on the metrics that pass through it. In this case, you are adding tags for the server role `consul-server` and datacenter `us-east-1`. You can further use these tags in Grafana to filter queries. | |
| Telegraf also allows you to set additional tags on the metrics that pass through it. This configuration adds tags for the server role `consul-server` and datacenter `us-east-1`. You can use these tags in Grafana to filter queries. |
| Telegraf also allows you to set additional tags on the metrics that pass through it. In this case, you are adding tags for the server role `consul-server` and datacenter `us-east-1`. You can further use these tags in Grafana to filter queries. | ||
|
|
||
| <CodeBlockConfig filename="telegraf.conf"> | ||
| The next config section sets up a StatsD listener on UDP port 8125, with instructions to calculate percentile metrics and to parse DogStatsD-compatible tags. Consul will use this to report telemetry stats. The full reference to all the available StatsD-related options in Telegraf is [here][telegraf-statsd-input]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The next config section sets up a StatsD listener on UDP port 8125, with instructions to calculate percentile metrics and to parse DogStatsD-compatible tags. Consul will use this to report telemetry stats. The full reference to all the available StatsD-related options in Telegraf is [here][telegraf-statsd-input]. | |
| The next section of `telegraf/conf` sets up a StatsD listener on UDP port 8125 with instructions to calculate percentile metrics and to parse DogStatsD-compatible tags. Consul uses this data to report telemetry stats. The full reference to all the available StatsD-related options in Telegraf is [here][telegraf-statsd-input]. |
| address = "localhost:8500" | ||
| scheme = "http" | ||
| ``` | ||
| The next configuration sections are used to configure inputs for things like CPU, memory, network I/O, and disk I/O. It is important to make sure the `interfaces` list in `inputs.net` matches the system interface names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by the inputs.net section. The value in it is enp0s*. What system interface name is that matching? Is that something a developer would keep the same or definitely change?
| The next configuration sections are used to configure inputs for things like CPU, memory, network I/O, and disk I/O. It is important to make sure the `interfaces` list in `inputs.net` matches the system interface names. | ||
|
|
||
| </CodeBlockConfig> | ||
| Another useful input plugin is the [procstat][telegraf-procstat-input] plugin, which reports metrics for a process matching a given pattern. In this case, you are using it to monitor the Consul agent process itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Another useful input plugin is the [procstat][telegraf-procstat-input] plugin, which reports metrics for a process matching a given pattern. In this case, you are using it to monitor the Consul agent process itself. | |
| Another useful input plugin is the [procstat Telegraf plugin][telegraf-procstat-input], which reports metrics for a process according to a given pattern. In this case, you are using it to monitor the Consul agent process itself. |
| on those metrics. To learn about other factors (in addition to monitoring) that | ||
| you should consider when running Consul in production, check the | ||
| [Production Checklist][prod-checklist]. | ||
| To read further about telemetry in Consul, check the [Consul Agent Telemetry](/consul/docs/monitor/telemetry/agent) and [Consul Dataplane Telemetry](/consul/docs/monitor/telemetry/dataplane) pages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To read further about telemetry in Consul, check the [Consul Agent Telemetry](/consul/docs/monitor/telemetry/agent) and [Consul Dataplane Telemetry](/consul/docs/monitor/telemetry/dataplane) pages. | |
| For more information about agent telemetry in Consul, refer to [Consul Agent Telemetry](/consul/docs/monitor/telemetry/agent) and [Consul Dataplane Telemetry](/consul/docs/monitor/telemetry/dataplane). |
| [Production Checklist][prod-checklist]. | ||
| To read further about telemetry in Consul, check the [Consul Agent Telemetry](/consul/docs/monitor/telemetry/agent) and [Consul Dataplane Telemetry](/consul/docs/monitor/telemetry/dataplane) pages. | ||
|
|
||
| To learn more about Consul monitoring, alerting and logging, check out the [Consul Monitoring](/consul/docs/monitor) page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To learn more about Consul monitoring, alerting and logging, check out the [Consul Monitoring](/consul/docs/monitor) page. | |
| To learn more about monitoring, alerting, and logging data generated by Consul agents, refer to [Consul Monitoring](/consul/docs/monitor). |
| Here is an example Grafana dashboard: | ||
|
|
||
|  | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Some of the important metrics to monitor include: | |
| - [Memory usage metrics](#memory-usage-metrics) | |
| - [File descriptor metrics](#file-descriptor-metrics) | |
| - [CPU usage metrics](#cpu-usage-metrics) | |
| - [Network activity metrics](#network-activity-metrics) | |
| - [Disk activity metrics](#disk-activity-metrics) |
List to make it easier to understand what's in this section and jump directly to relevant info.
| This page describes the process to set up Telegraf to monitor Consul datacenter telemetry. | ||
|
|
||
| ## Overview | ||
| Consul makes a range of metrics in various formats available so operators can measure the health and stability of a datacenter, and diagnose or predict potential issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Consul makes a range of metrics in various formats available so operators can measure the health and stability of a datacenter, and diagnose or predict potential issues. | |
| ## Introduction | |
| Consul makes a range of metrics in various formats available so operators can measure the health and stability of a datacenter, as well as diagnose and predict potential issues. |
| Consul makes a range of metrics in various formats available so operators can | ||
| measure the health and stability of a datacenter, and diagnose or predict | ||
| potential issues. | ||
| In this example you are going to use the [telegraf_plugin][] in conjunction with the StatsD protocol supported by Consul. For the full list of metrics available with Consul, refer to the [telemetry documentation](/consul/docs/reference/agent/telemetry). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| In this example you are going to use the [telegraf_plugin][] in conjunction with the StatsD protocol supported by Consul. For the full list of metrics available with Consul, refer to the [telemetry documentation](/consul/docs/reference/agent/telemetry). | |
| One monitoring solution is to use the [telegraf_plugin][] in conjunction with the StatsD protocol supported by Consul. You can also use this data with Grafana to organize and query the data you collect. | |
| For the full list of Consul agent metrics, refer to the [telemetry documentation](/consul/docs/reference/agent/telemetry). |
Description
This PR is part of the Consul tutorials to documentation conversion project.
The “Monitor Consul datacenter health with Telegraf” tutorial became the Monitor Consul datacenter health with Telegraf page.
Content reviewed, language and page structure updated.
Links
Jira: CE-923
Deploy previews: TBD
Contributor checklists
Review urgency:
Pull request:
Content:
Reviewer checklist