将Cassandra作为状态集部署在AKS中,为其提供导出器并按照建议的here启用基于Prometheus的指标之后,我想可视化一些Cassandra特定指标,以便可以开始理解我期间的Cassandra行为具体测试。
因为OMS代理没有打印日志,所以我尝试使用不同的配置选项进行实验,以指定Prometheus抓取端点。实际上,我尝试使用内部K8s服务和外部Azure内部负载均衡器。
例如:
prometheus-data-collection-settings: |-
# Custom Prometheus metrics data collection settings
[prometheus_data_collection_settings.cluster]
# Cluster level scrape endpoint(s). These metrics will be scraped from agent's Replicaset (singleton)
#Interval specifying how often to scrape for metrics. This is duration of time and can be specified for supporting settings by combining an integer value and time unit as a string value. Valid time units are ns, us (or µs), ms, s, m, h.
interval = "1m"
## Uncomment the following settings with valid string arrays for prometheus scraping
fieldpass = ["*"]
#fielddrop = ["metric_to_drop"]
# An array of urls to scrape metrics from.
urls = ["http:/ 10.192.85.7:8080/metrics"]
# An array of Kubernetes services to scrape metrics from.
kubernetes_services = ["http://cassandra-http-metrics.cassandra.svc.cluster.local:8080/metrics"]
使用这些配置,我希望看到指标显示在Azure Monitor中;但不幸的是,Documentation并不能解决这种类型的集成问题,因为带有Prometheus的容器的Azure Monitor仍处于预览状态。