认证
此提供商需要身份验证。
- url: Prometheus 服务器 URL(必需:True,敏感:False)
- username: Prometheus 用户名(必需:False,敏感:False)
- password: Prometheus 密码(必需:False,敏感:True)
- verify: 验证 SSL 证书(必需:False,敏感:False)
某些范围可能需要才能通过提供商执行特定操作或查询。以下是相关范围及其用例的摘要:
- connectivity: 连接测试(强制)
在工作流中
此提供商可用于工作流。
作为"步骤"来查询数据,示例:
yaml
steps:
- name: Query prometheus
provider: prometheus
config: "{{ provider.my_provider_name }}"
with:
query: {value}请查看以下工作流示例:
- create_service_now_ticket_upon_alerts.yml
- enrich_using_structured_output_from_deepseek.yaml
- enrich_using_structured_output_from_openai.yaml
- enrich_using_structured_output_from_vllm_qwen.yaml
- http_enrich.yml
- multi-condition-cel.yml
通过 Webhook 连接(双向)
此提供商利用 Prometheus Alertmanager 的可配置 webhook。使用以下模板配置 AlertManager:
route:
receiver: "keep"
group_by: ['alertname']
group_wait: 15s
group_interval: 15s
repeat_interval: 1m
continue: true
receivers:
- name: "keep"
webhook_configs:
- url: 'KEEP_BACKEND_URL/alerts/event/prometheus'
send_resolved: true
http_config:
basic_auth:
username: api_key
password: {api_key}连接 Provider
- 设置一个 Prometheus 服务器并确保它正在运行。
- 获取可访问您的 Prometheus 实例的
prometheus_url。 - (可选)如果受保护,从 Prometheus 配置中获取 API 令牌。
- 在 provider 配置中提供这些值。
相关链接
-Prometheus Querying API Documentation -Prometheus Official Documentation