promsql:软件包promsql导出* sql.DB统计信息作为Prometheus指标收集器

时间:2024-04-20 20:28:00
【文件属性】:

文件名称:promsql:软件包promsql导出* sql.DB统计信息作为Prometheus指标收集器

文件大小:22KB

文件格式:ZIP

更新时间:2024-04-20 20:28:00

go golang sql database prometheus

Promsql的 软件包promsql导出* sql.DB统计信息作为Prometheus指标收集器。 例子 package promsql_test import ( "bufio" "database/sql" "fmt" "net/http" "strings" "time" "github.com/johejo/promsql" _ "github.com/go-sql-driver/mysql" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) func Example () { db , err := sql . Open ( "mysql" , "CONNECTION_STRING" )


【文件预览】:
promsql-main
----go.mod(95B)
----promsql.go(4KB)
----promsql_test.go(1KB)
----LICENSE(1KB)
----go.sum(39KB)
----codecov.yaml(52B)
----.github()
--------workflows()
----example_test.go(834B)
----README.md(1KB)
----renovate.json(133B)

网友评论