Feature: PF States, HAProxy + Caddy collectors and dashboard

This commit is contained in:
cynfo3000
2026-03-05 09:29:14 +01:00
parent 31369381d0
commit f4a28463b7
6 changed files with 469 additions and 1 deletions
+53
View File
@@ -25,6 +25,9 @@ type SystemData struct {
Proxmox map[string]interface{} `json:"proxmox,omitempty"`
Backups map[string]interface{} `json:"backups,omitempty"`
Security *SecurityInfo `json:"security,omitempty"`
PFStates *PFStatesInfo `json:"pf_states,omitempty"`
HAProxy *HAProxyData `json:"haproxy,omitempty"`
Caddy *CaddyData `json:"caddy,omitempty"`
}
type LicenseInfo struct {
@@ -216,6 +219,56 @@ type SecuritySummary struct {
LastLogin string `json:"last_login"`
}
type PFStatesInfo struct {
CurrentEntries int `json:"current_entries"`
HardLimit int `json:"hard_limit"`
SearchRate float64 `json:"search_rate"`
InsertRate float64 `json:"insert_rate"`
RemovalRate float64 `json:"removal_rate"`
MatchRate float64 `json:"match_rate"`
}
type HAProxyInfo struct {
Uptime string `json:"uptime"`
CurrentConns int `json:"current_conns"`
TotalConns int `json:"total_conns"`
TotalReqs int `json:"total_requests"`
CurrentSSL int `json:"current_ssl"`
TotalSSL int `json:"total_ssl"`
MaxConns int `json:"max_conns"`
}
type HAProxyEntry struct {
ProxyName string `json:"proxy_name"`
ServerName string `json:"server_name"`
Type string `json:"type"`
Status string `json:"status"`
CurrentSessions int `json:"current_sessions"`
TotalSessions int `json:"total_sessions"`
BytesIn int64 `json:"bytes_in"`
BytesOut int64 `json:"bytes_out"`
RequestsTotal int `json:"requests_total"`
ErrorsReq int `json:"errors_req"`
ErrorsConn int `json:"errors_conn"`
ErrorsResp int `json:"errors_resp"`
}
type HAProxyData struct {
Info HAProxyInfo `json:"info"`
Entries []HAProxyEntry `json:"entries"`
}
type CaddySite struct {
Domain string `json:"domain"`
Upstream string `json:"upstream"`
TLS bool `json:"tls"`
}
type CaddyData struct {
Version string `json:"version"`
Sites []CaddySite `json:"sites"`
}
// HeartbeatRequest
type HeartbeatRequest struct {
AgentID string `json:"agent_id"`