Documentation ¶
Index ¶
- Constants
- func EnumerateCrontabFiles(dirToEnumerate string) []string
- func SendLogData(apiKey string, monitorKey string, seriesID string, outputLogs string) ([]byte, error)
- type CronitorApi
- type Crontab
- func (c Crontab) CanonicalName() string
- func (c Crontab) DisplayName() string
- func (c Crontab) Exists() bool
- func (c Crontab) IsRoot() bool
- func (c Crontab) IsWritable() bool
- func (c *Crontab) Parse(noAutoDiscover bool) (error, int)
- func (c Crontab) Save(crontabLines string) error
- func (c Crontab) Write() string
- type Line
- type Monitor
- type MonitorSummary
- type Rule
- type RuleValue
- type TimezoneLocationName
Constants ¶
View Source
const DROP_IN_DIRECTORY = "/etc/cron.d"
View Source
const SYSTEM_CRONTAB = "/etc/crontab"
Variables ¶
This section is empty.
Functions ¶
func EnumerateCrontabFiles ¶
Types ¶
type CronitorApi ¶
type CronitorApi struct { IsDev bool IsAutoDiscover bool ApiKey string UserAgent string Logger func(string) }
func (CronitorApi) GetMonitors ¶
func (api CronitorApi) GetMonitors() ([]MonitorSummary, error)
func (CronitorApi) GetRawResponse ¶
func (api CronitorApi) GetRawResponse(url string) ([]byte, error)
func (CronitorApi) PutMonitors ¶
func (CronitorApi) Url ¶
func (api CronitorApi) Url() string
type Crontab ¶
type Crontab struct { User string IsUserCrontab bool IsSaved bool Filename string Lines []*Line TimezoneLocationName *TimezoneLocationName UsesSixFieldExpressions bool }
func CrontabFactory ¶
func ReadCrontabFromFile ¶
func ReadCrontabsInDirectory ¶
func (Crontab) CanonicalName ¶
func (Crontab) DisplayName ¶
func (Crontab) IsWritable ¶
type Line ¶
type Line struct { Name string FullLine string LineNumber int CronExpression string CommandToRun string Code string RunAs string Mon Monitor }
func (Line) CommandIsComplex ¶
func (Line) HasLegacyIntegration ¶
func (Line) IsAutoDiscoverCommand ¶
func (Line) IsMetaCronJob ¶
func (Line) IsMonitorable ¶
type Monitor ¶
type Monitor struct { Name string `json:"name,omitempty"` DefaultName string `json:"defaultName"` Key string `json:"key"` Rules []Rule `json:"rules"` Tags []string `json:"tags"` Type string `json:"type"` Code string `json:"code,omitempty"` Timezone string `json:"timezone,omitempty"` Note string `json:"defaultNote,omitempty"` Notifications map[string][]string `json:"notifications,omitempty"` NoStdoutPassthru bool `json:"-"` }
type MonitorSummary ¶
type TimezoneLocationName ¶
type TimezoneLocationName struct {
Name string
}
Click to show internal directories.
Click to hide internal directories.