Cron-Jobs Collector: System-Crontab + OPNsense config.xml Jobs
- Neuer Collector: agent/collector/cron.go - Zwei Quellen: crontab -l (System) + config.xml OPNsense-Jobs - Daten im Heartbeat unter 'cron_jobs' - Pro Job: source, schedule, enabled, command, description, uuid, origin - Backend Model CronJob in models/system.go - Getestet: 18 Jobs auf Produktion (8 System + 10 OPNsense) - README + Dateistruktur aktualisiert - Agent auf allen 3 Firewalls deployed
This commit is contained in:
@@ -20,6 +20,7 @@ type SystemData struct {
|
||||
Certificates []CertificateInfo `json:"certificates,omitempty"`
|
||||
Plugins []PluginInfo `json:"plugins,omitempty"`
|
||||
Updates *UpdateInfo `json:"updates,omitempty"`
|
||||
CronJobs []CronJob `json:"cron_jobs,omitempty"`
|
||||
}
|
||||
|
||||
type WireGuardTunnel struct {
|
||||
@@ -152,6 +153,23 @@ type PendingUpdateInfo struct {
|
||||
NewVer string `json:"new_version"`
|
||||
}
|
||||
|
||||
type CronJob struct {
|
||||
Source string `json:"source"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Minutes string `json:"minutes"`
|
||||
Hours string `json:"hours"`
|
||||
Days string `json:"days"`
|
||||
Months string `json:"months"`
|
||||
Weekdays string `json:"weekdays"`
|
||||
Command string `json:"command"`
|
||||
Parameters string `json:"parameters,omitempty"`
|
||||
Who string `json:"who,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
UUID string `json:"uuid,omitempty"`
|
||||
Origin string `json:"origin,omitempty"`
|
||||
Schedule string `json:"schedule"`
|
||||
}
|
||||
|
||||
// HeartbeatRequest
|
||||
type HeartbeatRequest struct {
|
||||
AgentID string `json:"agent_id"`
|
||||
|
||||
Reference in New Issue
Block a user