1 Star 0 Fork 0

sqos/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
data.go 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
Tudor Golubenco 提交于 2016-08-12 17:53 . PostgreSQL module (#2253)
package activity
import (
"time"
s "github.com/elastic/beats/metricbeat/schema"
c "github.com/elastic/beats/metricbeat/schema/mapstrstr"
)
// Based on: https://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW
var schema = s.Schema{
"database": s.Object{
"oid": c.Int("datid"),
"name": c.Str("datname"),
},
"pid": c.Int("pid"),
"user": s.Object{
"id": c.Int("usesysid"),
"name": c.Str("usename"),
},
"application_name": c.Str("application_name"),
"client": s.Object{
"address": c.Str("client_addr"),
"hostname": c.Str("client_hostname"),
"port": c.Int("client_port"),
},
"backend_start": c.Time(time.RFC3339Nano, "backend_start"),
"transaction_start": c.Time(time.RFC3339Nano, "xact_start", s.Optional),
"query_start": c.Time(time.RFC3339Nano, "query_start"),
"state_change": c.Time(time.RFC3339Nano, "state_change"),
"waiting": c.Bool("waiting"),
"state": c.Str("state"),
"query": c.Str("query"),
}
var eventMapping = schema.Apply
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sqos/beats.git
git@gitee.com:sqos/beats.git
sqos
beats
beats
v5.6.1

搜索帮助