2026-01-18 19:21:16 +00:00
|
|
|
package sender
|
|
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
|
|
// SnapshotPayload is the wire format sent to bugs.watch.
|
|
|
|
|
type SnapshotPayload struct {
|
|
|
|
|
Timestamp time.Time `json:"timestamp"`
|
|
|
|
|
|
|
|
|
|
CPUAvg float64 `json:"cpu_avg"`
|
|
|
|
|
MemAvg float64 `json:"mem_avg"`
|
|
|
|
|
DiskAvg float64 `json:"disk_avg"`
|
2026-06-15 17:29:53 +01:00
|
|
|
Uptime uint64 `json:"uptime"`
|
2026-06-18 14:41:04 +01:00
|
|
|
Load float64 `json:"load"`
|
2026-01-18 19:21:16 +00:00
|
|
|
|
2026-06-15 17:29:53 +01:00
|
|
|
HostID string `json:"host_id,omitempty"`
|
|
|
|
|
Environment string `json:"environment,omitempty"`
|
|
|
|
|
|
2026-06-18 14:41:04 +01:00
|
|
|
// Optional. only present when DB monitoring is enabled.
|
2026-06-15 17:29:53 +01:00
|
|
|
// DBDriver is a numeric identifier: 1=mysql/mariadb 2=postgres 3=redis 4=mongodb 5=sqlite
|
|
|
|
|
DBDriver *uint8 `json:"db_driver,omitempty"`
|
|
|
|
|
DBConnPct *float64 `json:"db_conn_pct,omitempty"`
|
|
|
|
|
DBThreadsRunning *float64 `json:"db_threads_running,omitempty"`
|
|
|
|
|
DBSlowQueries *uint64 `json:"db_slow_queries,omitempty"`
|
|
|
|
|
DBSizeBytes *uint64 `json:"db_size_bytes,omitempty"`
|
2026-01-18 19:21:16 +00:00
|
|
|
}
|