代码拉取完成,页面将自动刷新
package activity
import (
"time"
s "github.com/elastic/beats/libbeat/common/schema"
c "github.com/elastic/beats/libbeat/common/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", s.Optional),
"state_change": c.Time(time.RFC3339Nano, "state_change", s.Optional),
"waiting": c.Bool("waiting", s.Optional),
"state": c.Str("state"),
"query": c.Str("query"),
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。