Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadS3Config ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct { *state.HostState Env CheckRules map[string]CheckRule *state.Manager APIKey string // contains filtered or unexported fields }
AgentConfig is agent config struct.
func NewAgentConfig ¶
func NewAgentConfig(s store.Store, p client.ConfigProvider) (*AgentConfig, error)
NewAgentConfig load config from env.
func (*AgentConfig) GetHost ¶
func (a *AgentConfig) GetHost() error
func (*AgentConfig) LoadAgentConfig ¶
func (a *AgentConfig) LoadAgentConfig(p client.ConfigProvider, s3Bucket, s3Key string) error
type CheckPluginParams ¶
type CheckRule ¶
type CheckRule struct { Name string `json:"name"` // Primary key PluginType string `json:"pluginType"` Command string `json:"command"` Env []string `json:"env"` Timeout time.Duration `json:"timeout"` PreventAlertAutoClose bool `json:"preventAlertAutoClose"` CheckInterval int `json:"checkInterval"` Memo string `json:"memo"` CustomIdentifier string `json:"customIdentifier"` NotificationInterval uint `json:"notificationInterval"` // <- Post report MaxCheckAttempts uint `json:"maxCheckAttempts"` // <- Post report }
CheckRule rule of check Plugin.
type Env ¶
type Env struct { StateTable string `default:"mackerel-awslambda-state"` StateTTLDays int `default:"90"` S3Key string `default:"mackerel.toml"` S3Bucket string Hostname string `default:"hostname"` Organization string `default:"organization"` TempDir string `default:""` CheckerFunc string }
Env config of mackerel-awslambda-agent.
type Host ¶
type Host struct { ID string `json:"id" default:"hostname"` // Primary key Hostname string `json:"hostname"` SourceType string `json:"sourceType" default:"host"` TargetRegion string `json:"targetRegion"` AssumeRoleARN string `json:"assumeRoleArn"` Checks []Check `json:"checks" dynamodbav:"checks"` // '[{"name":"checkName","memo":""},...]' }
Host mackerel check host info.
Click to show internal directories.
Click to hide internal directories.