目录
输入和输出集成概述
使用 Azure Monitor API 从 Azure 资源收集指标。
此插件使用 HTTP 将 Telegraf 指标直接发送到 Grafana 的 Mimir 数据库,为 Prometheus 兼容的指标提供可扩展且高效的长期存储和分析。
集成详情
Azure Monitor
Azure Monitor Telegraf 插件专为使用 Azure Monitor API 从各种 Azure 资源收集指标而设计。 用户必须提供特定的凭据,例如 client_id
、client_secret
、tenant_id
和 subscription_id
,以进行身份验证并获得对其 Azure 资源的访问权限。 此外,该插件还支持从单个资源以及资源组或订阅收集指标的功能,从而可以根据用户需求灵活且可扩展地收集指标。 该插件非常适合利用 Azure 云基础设施的组织,它可以深入了解资源性能和长期利用率,从而促进云资源的积极管理和优化。
Mimir
Grafana Mimir 支持 Prometheus Remote Write 协议,使 Telegraf 收集的指标能够高效地摄取到 Mimir 集群中,以实现大规模长期存储。 这种集成利用了 Prometheus 的成熟标准,允许用户将 Telegraf 广泛的数据收集功能与 Mimir 的高级功能(如查询联合、多租户、高可用性和经济高效的存储)相结合。 Grafana Mimir 的架构经过优化,可以处理大量指标数据并提供快速查询响应,使其成为复杂监控环境和分布式系统的理想选择。
配置
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>
Mimir
[[outputs.http]]
url = "http://data-load-balancer-backend-1:9009/api/v1/push"
data_format = "prometheusremotewrite"
username = "*****"
password = "******"
[outputs.http.headers]
Content-Type = "application/x-protobuf"
Content-Encoding = "snappy"
X-Scope-OrgID = "****"
输入和输出集成示例
Azure Monitor
-
动态资源监控:使用 Azure Monitor 插件根据特定标准(如标签或资源类型)动态收集 Azure 资源的指标。 组织可以自动化加载和卸载资源指标的过程,从而根据资源利用率模式更好地跟踪和优化性能。
-
多云监控集成:使用集中式监控解决方案将从 Azure Monitor 收集的指标与其他云提供商集成。 这使组织能够查看和分析跨多个云部署的性能数据,从而全面了解资源性能和成本,并简化运营。
-
异常检测和警报:利用通过 Azure Monitor 插件收集的指标以及机器学习算法来检测资源利用率的异常。 通过建立基线性能指标并自动警报偏差,组织可以减轻风险并在性能问题升级之前解决它们。
-
历史性能分析:通过将数据输入到数据仓库解决方案中,使用收集的 Azure 指标进行历史分析。 这使组织能够跟踪随时间变化的趋势,从而可以根据历史性能数据进行详细的报告和决策。
Mimir
-
企业级 Kubernetes 监控:将 Telegraf 与 Grafana Mimir 集成,以企业级规模流式传输来自 Kubernetes 集群的指标。 这实现了全面的可见性、改进的资源分配以及跨数百个集群的主动故障排除,从而利用了 Mimir 的横向可扩展性和高可用性。
-
多租户 SaaS 应用程序可观测性:使用此插件将来自不同 SaaS 租户的指标集中到 Grafana Mimir 中,从而实现租户隔离和基于资源使用情况的准确计费。 这种方法提供了可靠的可观测性、高效的成本管理和安全的多租户支持。
-
全球边缘网络性能跟踪:将来自全球分布式边缘服务器的延迟和可用性指标流式传输到 Grafana Mimir。 组织可以快速识别性能下降或中断,利用 Mimir 的快速查询功能来确保最佳的服务可靠性和用户体验。
-
高容量微服务实时分析:在高容量微服务架构中实施 Telegraf 指标收集,将数据馈送到 Grafana Mimir 以进行实时分析和异常检测。 Mimir 强大的查询功能使团队能够检测异常并快速响应,从而保持高服务可用性和性能。
反馈
感谢您成为我们社区的一份子! 如果您有任何一般性反馈或在这些页面上发现任何错误,我们欢迎并鼓励您提出意见。 请在 InfluxDB 社区 Slack 中提交您的反馈。