目录
输入和输出集成概述
使用 Azure Monitor API 从 Azure 资源收集指标。
此插件允许使用 Metrics API 将指标发送到 New Relic Insights,从而实现对应用程序性能的有效监控和分析。
集成详情
Azure Monitor
Azure Monitor Telegraf 插件专门用于使用 Azure Monitor API 从各种 Azure 资源收集指标。用户必须提供特定的凭据,例如 client_id
、client_secret
、tenant_id
和 subscription_id
,以进行身份验证并访问其 Azure 资源。此外,该插件还支持从单个资源以及资源组或订阅中收集指标的功能,从而可以灵活且可扩展地收集根据用户需求定制的指标。此插件非常适合利用 Azure 云基础设施的组织,可深入了解资源性能和随时间推移的利用率,从而促进云资源的积极管理和优化。
New Relic
此插件利用 Metrics API 将指标写入 New Relic Insights,Metrics API 提供了一种将时序数据发送到 New Relic 平台的强大机制。用户必须首先获取 Insights API 密钥才能对其数据提交进行身份验证和授权。该插件旨在促进与 New Relic 监控和分析功能的轻松集成,支持各种指标类型,并允许高效的数据处理。核心功能包括为指标添加前缀以更好地识别、API 请求的可自定义超时以及对代理设置的支持以增强连接性。用户必须根据其要求配置这些选项,以实现数据无缝流入 New Relic,从而进行全面的实时分析和洞察。
配置
Azure Monitor
# Gather Azure resources metrics from Azure Monitor API
[[inputs.azure_monitor]]
# can be found under Overview->Essentials in the Azure portal for your application/service
subscription_id = "<>"
# can be obtained by registering an application under Azure Active Directory
client_id = "<>"
# can be obtained by registering an application under Azure Active Directory.
# If not specified Default Azure Credentials chain will be attempted:
# - Environment credentials (AZURE_*)
# - Workload Identity in Kubernetes cluster
# - Managed Identity
# - Azure CLI auth
# - Developer Azure CLI auth
client_secret = "<>"
# can be found under Azure Active Directory->Properties
tenant_id = "<>"
# Define the optional Azure cloud option e.g. AzureChina, AzureGovernment or AzurePublic. The default is AzurePublic.
# cloud_option = "AzurePublic"
# resource target #1 to collect metrics from
[[inputs.azure_monitor.resource_target]]
# can be found under Overview->Essentials->JSON View in the Azure portal for your application/service
# must start with 'resourceGroups/...' ('/subscriptions/xxxxxxxx-xxxx-xxxx-xxx-xxxxxxxxxxxx'
# must be removed from the beginning of Resource ID property value)
resource_id = "<>"
# the metric names to collect
# leave the array empty to use all metrics available to this resource
metrics = [ "<>", "<>" ]
# metrics aggregation type value to collect
# can be 'Total', 'Count', 'Average', 'Minimum', 'Maximum'
# leave the array empty to collect all aggregation types values for each metric
aggregations = [ "<>", "<>" ]
# resource target #2 to collect metrics from
[[inputs.azure_monitor.resource_target]]
resource_id = "<>"
metrics = [ "<>", "<>" ]
aggregations = [ "<>", "<>" ]
# resource group target #1 to collect metrics from resources under it with resource type
[[inputs.azure_monitor.resource_group_target]]
# the resource group name
resource_group = "<>"
# defines the resources to collect metrics from
[[inputs.azure_monitor.resource_group_target.resource]]
# the resource type
resource_type = "<>"
metrics = [ "<>", "<>" ]
aggregations = [ "<>", "<>" ]
# defines the resources to collect metrics from
[[inputs.azure_monitor.resource_group_target.resource]]
resource_type = "<>"
metrics = [ "<>", "<>" ]
aggregations = [ "<>", "<>" ]
# resource group target #2 to collect metrics from resources under it with resource type
[[inputs.azure_monitor.resource_group_target]]
resource_group = "<>"
[[inputs.azure_monitor.resource_group_target.resource]]
resource_type = "<>"
metrics = [ "<>", "<>" ]
aggregations = [ "<>", "<>" ]
# subscription target #1 to collect metrics from resources under it with resource type
[[inputs.azure_monitor.subscription_target]]
resource_type = "<>"
metrics = [ "<>", "<>" ]
aggregations = [ "<>", "<>" ]
# subscription target #2 to collect metrics from resources under it with resource type
[[inputs.azure_monitor.subscription_target]]
resource_type = "<>"
metrics = [ "<>", "<>" ]
aggregations = [ "<>", "<>" ]
</code></pre>
New Relic
[[outputs.newrelic]]
## The 'insights_key' parameter requires a NR license key.
## New Relic recommends you create one
## with a convenient name such as TELEGRAF_INSERT_KEY.
## reference: https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key
# insights_key = "New Relic License Key Here"
## Prefix to add to add to metric name for easy identification.
## This is very useful if your metric names are ambiguous.
# metric_prefix = ""
## Timeout for writes to the New Relic API.
# timeout = "15s"
## HTTP Proxy override. If unset use values from the standard
## proxy environment variables to determine proxy, if any.
# http_proxy = "http://corporate.proxy:3128"
## Metric URL override to enable geographic location endpoints.
# If not set use values from the standard
# metric_url = "https://metric-api.newrelic.com/metric/v1"
输入和输出集成示例
Azure Monitor
-
动态资源监控:使用 Azure Monitor 插件根据特定条件(如标签或资源类型)动态收集 Azure 资源的指标。组织可以自动化加载和卸载资源指标的过程,从而根据资源利用率模式更好地跟踪和优化性能。
-
多云监控集成:将从 Azure Monitor 收集的指标与其他云提供商集成,使用集中式监控解决方案。这使组织能够查看和分析跨多个云部署的性能数据,从而提供资源性能和成本的整体概览,并简化运营。
-
异常检测和警报:结合机器学习算法,利用通过 Azure Monitor 插件收集的指标来检测资源利用率的异常情况。通过建立基准性能指标并在出现偏差时自动发出警报,组织可以在风险升级之前缓解风险并解决性能问题。
-
历史性能分析:通过将数据馈送到数据仓库解决方案中,使用收集的 Azure 指标进行历史分析。这使组织能够跟踪随时间推移的趋势,从而根据历史性能数据进行详细的报告和决策。
New Relic
-
应用程序性能监控:使用 New Relic Telegraf 插件将 Web 服务的应用程序性能指标发送到 New Relic Insights。通过集成此插件,开发人员可以收集响应时间、错误率和吞吐量等数据,使团队能够实时监控应用程序的运行状况,并在问题影响用户之前快速解决问题。此设置有助于主动管理应用程序性能和用户体验。
-
基础设施指标聚合:利用此插件聚合来自各种服务器的系统级指标(CPU 使用率、内存消耗等)并将其发送到 New Relic。这有助于系统管理员维护基础设施性能的全面视图,从而促进容量规划并识别潜在的瓶颈。通过将指标集中在 New Relic 中,团队可以可视化随时间推移的趋势,并就资源分配做出明智的决策。
-
多租户应用程序的动态指标命名:使用 metric_prefix 选项实现动态前缀,以区分多租户应用程序中的不同租户。通过配置插件以在指标名称中包含每个租户的唯一标识符,团队可以分析每个租户的使用模式和性能指标。这提供了对租户行为的宝贵见解,支持定制的优化并提高跨不同客户群的服务质量。
-
实时异常检测:将 New Relic 插件与警报机制相结合,以根据异常指标模式触发通知。通过发送请求计数和响应时间等指标,团队可以在 New Relic 中设置阈值,当超出阈值时,将自动向责任方发出警报。这种用户驱动的方法支持对潜在问题做出立即响应,防止其升级为更大的事件。
反馈
感谢您成为我们社区的一份子!如果您有任何一般性反馈或在这些页面上发现了任何错误,我们欢迎并鼓励您提出意见。请在 InfluxDB 社区 Slack 中提交您的反馈。