diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-06-17 12:59:15 +0100 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-06-17 12:59:15 +0100 |
| commit | b7b528277014879e436ae7fe1f3851024938fbd3 (patch) | |
| tree | 8be1cc0ecf3a25c390c9a7ad97afb5aa52a6c512 /internal/config | |
| parent | 4da9ed0f4ded049e28607cc7ea78c8b091ca721b (diff) | |
initial log monitoring support
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 4 | ||||
| -rw-r--r-- | internal/config/server.go | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 7241276..39149bc 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -9,8 +9,8 @@ import ( // ControlUser is used for various DTail specific operations. const ControlUser string = "DTAIL-CONTROL-USER" -// ScheduleUser is used for scheduled queries. -const ScheduleUser string = "DTAIL-SCHEDULE-USER" +// BackgroundUser is used for non-interactive scheduled queries and log monitoring and such. +const BackgroundUser string = "DTAIL-BACKGROUND-USER" // Client holds a DTail client configuration. var Client *ClientConfig diff --git a/internal/config/server.go b/internal/config/server.go index bc2f40a..43b4c34 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -26,6 +26,19 @@ type Scheduled struct { AllowFrom []string `json:",omitempty"` } +// Monitoring on log files. +type Monitoring struct { + Name string + Enable bool + Files string + Query string + ExcludeRegexes []string `json:",omitempty"` + Outfile string `json:",omitempty"` + Discovery string `json:",omitempty"` + Servers []string `json:",omitempty"` + AllowFrom []string `json:",omitempty"` +} + // ServerConfig represents the server configuration. type ServerConfig struct { // The SSH server bind port. @@ -46,6 +59,8 @@ type ServerConfig struct { HostKeyBits int // Scheduled mapreduce jobs. Schedule []Scheduled `json:",omitempty"` + // Monitoring on log files. + Monitoring []Monitoring `json:",omitempty"` } // Create a new default server configuration. |
