ccfos / nightingale

An all-in-one observability solution which aims to combine the advantages of Prometheus and Grafana. It manages alert rules and visualizes metrics, logs, traces in a beautiful web UI.
https://flashcat.cloud/docs/
Apache License 2.0
9.84k stars 1.42k forks source link

postgres数据库自定义sql监控 #2192

Closed 352140532 closed 2 months ago

352140532 commented 2 months ago

[[instances.metrics]] mesurement = "sessions" label_fields = [ "status", "type" ] metric_fields = [ "value" ] timeout = "3s" request = ''' SELECT status, type, COUNT(*) as value FROM v$session GROUP BY status, type

请问下我自定义了一个查询,写到时序里面的数据标签里面没有outputaddress或者跟数据库相关的标识,请问该怎么才能加上。标签上只有busigroup跟ident,categraf运行不在数据库主机上。

352140532 commented 2 months ago

1

UlricQin commented 2 months ago

采集问题把 issue 提到 github.com/flashcatcloud/categraf 哈,提 issue 的时候,贴一下 ./categraf --test --inputs postgresql 测试这个 postgresql 插件的 output