监控
本文档介绍如何使用Prometheus或兼容工具配置Pinecone索引的监控。
概述
您可以将Pinecone索引的性能指标传输到自己的Prometheus实例中,或传输到Prometheus和OpenMetrics兼容的监控工具中。Prometheus度量端点是用于想要使用自己的Prometheus度量记录器监控和存储系统健康度量的用户的。
⚠️警告
此功能处于公共预览阶段,仅适用于企业或专属企业用户。
连接
指标可在以下网址中获得:
https://metrics.YOUR_ENVIRONMENT.pinecone.io/metrics
您的API密钥必须通过Authorization标头作为Bearer令牌传递,如下所示:
Authorization: Bearer \<api-key\>
此URL仅提供与API密钥关联的项目的指标。
对于Prometheus,请按以下方式配置prometheus.yml:
YAML
scrape_configs:
- job_name: pinecone-job-1
authorization:
credentials: <api-key-here>
scheme: https
static_configs:
- targets: ['metrics.YOUR_ENVIRONMENT.pinecone.io']
可用指标
可用指标如下:
Name | Type | Description | Labels |
---|---|---|---|
pinecone_vector_count | gauge | pinecone_vector_count给出索引中每个pod的项目数。标签:pid:进程标识符;index_name:索引名称;project_name:Pinecone项目名称 | |
pinecone_request_count_total | counter | pinecone_request_count_total给出客户端发起的数据平面调用次数。标签:pid:进程标识符;index_name:索引名称;project_name:Pinecone项目名称;request_type:之一,upsert,delete,fetch,query,describe_index_stats | |
pinecone_request_error_count_total | counter | pinecone_request_error_count_total给出导致客户端发起的数据平面调用失败的调用数。标签:pid:进程标识符;index_name:索引名称;project_name:Pinecone项目名称;request_type:之一,upsert,delete,fetch,query,describe_index_stats | |
pinecone_request_latency_seconds | histogram | pinecone_request_latency_seconds给出pinecone数据平面调用的服务器端处理延迟分布。标签:pid:进程标识符;index_name:索引名称;project_name:Pinecone项目名称;request_type:之一,upsert,delete,fetch,query,describe_index_stats | |
pinecone_index_fullness | gauge | pinecone_index_fullness给出0到1的比例尺中的索引填充度。标签:pid:进程标识符;index_name:索引名称;project_name:Pinecone项目名称 |
示例查询
以下Prometheus查询收集有关您的Pinecone索引的信息。
平均请求延迟
以下查询返回针对Pinecone索引example-index
的所有请求的平均延迟时间(秒)。
avg by (request_type) (pinecone_request_latency_seconds{index_name="example-index"})
以下查询返回Pinecone索引example-index
的向量计数。
sum ((avg by (app) (pinecone_vector_count{index_name="example-index"})))
以下查询返回一分钟内针对Pinecone索引example-index
的总请求数。
sum by (request_type)(increase(pinecone_request_count_total{index_name="example-index"}[60s]))
以下查询返回一分钟内针对Pinecone索引example-index
的总upsert请求数。
sum by (request_type)(increase(pinecone_request_count_total{index_name="example-index", request_type="upsert"}[60s]))
以下查询返回Pinecone索引example-index
返回的错误总数,时间范围为1分钟。
sum by (request_type) (increase(pinecone_request_error_count{
index_name="example-index"}[60s]))
以下查询返回Pinecone索引example-index
的索引填充度指标。
round(max (pinecone_index_fullness{index_name="example-index"} * 100))
更新时间 5个月前