Documentation ¶
Index ¶
Constants ¶
View Source
const AgentVersion = "3.0.12"
AgentVersion as the name says
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { ConfigurationPath string `json:"-" mapstructure:"-"` AutoSslEnabled bool `mapstructure:"try-autossl"` CertificateFile string `mapstructure:"certfile"` KeyFile string `mapstructure:"keyfile"` AutoSslFolder string `mapstructure:"autossl-folder"` AutoSslCsrFile string `mapstructure:"autossl-csr-file"` AutoSslCrtFile string `mapstructure:"autossl-crt-file"` AutoSslKeyFile string `mapstructure:"autossl-key-file"` AutoSslCaFile string `mapstructure:"autossl-ca-file"` Address string `mapstructure:"address"` Port int64 `mapstructure:"port"` BasicAuth string `mapstructure:"auth"` ConfigUpdate bool `mapstructure:"config-update-mode"` CustomchecksFilePath string `mapstructure:"customchecks"` // EnablePPROF for debugging memory leaks with the go tool pprof command EnablePPROF bool `mapstructure:"enable-dev-pprof"` CheckInterval int64 `mapstructure:"interval"` Docker bool `mapstructure:"dockerstats"` Qemu bool `mapstructure:"qemustats"` CPU bool `mapstructure:"cpustats"` Load bool `mapstructure:"load"` Memory bool `mapstructure:"memory"` Processes bool `mapstructure:"processstats"` Netstats bool `mapstructure:"netstats"` NetIo bool `mapstructure:"netio"` Sensors bool `mapstructure:"sensorstats"` Diskstats bool `mapstructure:"diskstats"` DiskIo bool `mapstructure:"diskio"` Swap bool `mapstructure:"swap"` User bool `mapstructure:"userstats"` WindowsServices bool `mapstructure:"winservices"` WindowsEventLog bool `mapstructure:"wineventlog"` SystemdServices bool `mapstructure:"systemdservices"` LaunchdServices bool `mapstructure:"launchdservices"` Alfresco bool `mapstructure:"alfrescostats"` Libvirt bool `mapstructure:"libvirt"` Ntp bool `mapstructure:"ntp"` JmxUser string `mapstructure:"alfresco-jmxuser"` JmxPassword string `mapstructure:"alfresco-jmxpassword"` JmxAddress string `mapstructure:"alfresco-jmxaddress"` JmxPort int64 `mapstructure:"alfresco-jmxport"` JmxPath string `mapstructure:"alfresco-jmxpath"` JmxQuery string `mapstructure:"alfresco-jmxquery"` JavaPath string `mapstructure:"alfresco-javapath"` WindowsEventLogTypes []string `mapstructure:"wineventlog-logtypes"` WindowsEventLogAge int64 `mapstructure:"wineventlog-age"` // WMI Version WindowsEventLogCache int64 `mapstructure:"wineventlog-cache"` // JD Version WindowsEventLogMethod string `mapstructure:"wineventlog-method"` // WMI or PowerShell OITC *PushConfiguration `json:"oitc"` // Default is the namespace workaround we need for the configuration file format Default *Configuration `json:"-"` CustomCheckConfiguration []*CustomCheck `json:"customchecks_configuration" mapstructure:"-"` // contains filtered or unexported fields }
Configuration with all sub configuration structs
func Load ¶
func Load(ctx context.Context, configPath string) (*Configuration, error)
Load configuration from default paths or configPath. The reload func must be short lived or start a go routine.
func (*Configuration) ReadConfigurationFile ¶
func (c *Configuration) ReadConfigurationFile() ([]byte, error)
func (*Configuration) ReadCustomCheckConfiguration ¶
func (c *Configuration) ReadCustomCheckConfiguration() []byte
func (*Configuration) SaveConfiguration ¶
func (c *Configuration) SaveConfiguration(config []byte) error
func (*Configuration) SaveCustomCheckConfiguration ¶
func (c *Configuration) SaveCustomCheckConfiguration(config []byte) error
type CustomCheck ¶
type CustomCheck struct { Name string `mapstructure:"-"` Interval int64 `mapstructure:"interval"` Enabled bool `mapstructure:"enabled"` Command string `mapstructure:"command"` Timeout int64 `mapstructure:"timeout"` // Linux/Darwin = if set run shell and pipe command into it // Windows => powershell -> start powershell, command must be path to powershell file // Windows => powershell_command -> start powershell, run command directly // Windows => bat -> start cmd call, command must be path to bat file // Windows => vbs -> wscript, command must be path to vbs file // if not set the command will be just executed as it is Shell string `mapstructure:"shell"` PowershellExe string `mapstructure:"powershell_exe"` }
CustomCheck are external plugins and scripts which should be executed by the Agent
type PushConfiguration ¶
type PushConfiguration struct { Push bool `mapstructure:"enabled"` HostUUID string `mapstructure:"hostuuid"` URL string `mapstructure:"url"` Apikey string `mapstructure:"apikey"` Proxy string `mapstructure:"proxy"` Timeout int64 `mapstructure:"timeout"` VerifyServerCertificate bool `mapstructure:"verify-server-certificate"` EnableWebserver bool `mapstructure:"enable-webserver"` // Stores authentication information generated by push client AuthFile string `mapstructure:"authfile"` }
Click to show internal directories.
Click to hide internal directories.