Documentation ¶
Index ¶
- Constants
- type AlertInfo
- type CheckTargets
- type CheckerOpt
- type Client
- func (c *Client) ListAllMonitor(search string) (resp []MonitorContent, err error)
- func (c *Client) ListMonitor(search string, pageSize, pageIndex int) ([]MonitorContent, int, error)
- func (c *Client) SearchEventByChecker(args []*SearchEventByMonitorArg, startTime, endTime int64) ([]*EventResp, error)
- type Conditions
- type CrontabInfo
- type Data
- type DimensionTags
- type EventContent
- type EventFilters
- type EventResp
- type EventResponse
- type Extend
- type ExtraData
- type Filters
- type JSONScript
- type Level
- type MonitorContent
- type MonitorMeta
- type MonitorOpt
- type MonitorResponse
- type PageInfo
- type Query
- type Querylist
- type Rules
- type SearchEventBody
- type SearchEventByMonitorArg
- type Targets
- type UpdatorInfo
Constants ¶
View Source
const MonitorPageSize = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertInfo ¶
type AlertInfo struct { MatchedSilentRule interface{} `json:"matchedSilentRule"` Targets []Targets `json:"targets"` }
type CheckTargets ¶
type CheckerOpt ¶
type CheckerOpt struct { ID string `json:"id"` InfoEvent bool `json:"infoEvent"` Interval int `json:"interval"` Message interface{} `json:"message"` Name string `json:"name"` NoDataAction string `json:"noDataAction"` NoDataInterval int `json:"noDataInterval"` NoDataMessage interface{} `json:"noDataMessage"` NoDataRecoverMessage interface{} `json:"noDataRecoverMessage"` NoDataRecoverTitle interface{} `json:"noDataRecoverTitle"` NoDataScale int `json:"noDataScale"` NoDataTitle interface{} `json:"noDataTitle"` RecoverInterval int `json:"recoverInterval"` RecoverMessage interface{} `json:"recoverMessage"` RecoverScale int `json:"recoverScale"` RecoverTitle string `json:"recoverTitle"` Rules []Rules `json:"rules"` Title string `json:"title"` }
type Client ¶
type Client struct { *req.Client BaseURL string }
func (*Client) ListAllMonitor ¶
func (c *Client) ListAllMonitor(search string) (resp []MonitorContent, err error)
func (*Client) ListMonitor ¶
func (*Client) SearchEventByChecker ¶
func (c *Client) SearchEventByChecker(args []*SearchEventByMonitorArg, startTime, endTime int64) ([]*EventResp, error)
SearchEventByChecker startTime and endTime are Millisecond timestamps
type Conditions ¶
type CrontabInfo ¶
type Data ¶
type Data struct { Docid string `json:"__docid"` AlertTimeRanges []interface{} `json:"alert_time_ranges"` Date int64 `json:"date"` DfBotObsDetail interface{} `json:"df_bot_obs_detail"` DfDimensionTags string `json:"df_dimension_tags"` DfEventID string `json:"df_event_id"` DfMessage string `json:"df_message"` DfMeta string `json:"df_meta"` DfMonitorChecker string `json:"df_monitor_checker"` DfMonitorCheckerEventRef string `json:"df_monitor_checker_event_ref"` DfMonitorCheckerName string `json:"df_monitor_checker_name"` DfMonitorType string `json:"df_monitor_type"` DfSource string `json:"df_source"` DfStatus string `json:"df_status"` DfTitle string `json:"df_title"` }
type DimensionTags ¶
type DimensionTags struct { }
type EventContent ¶
type EventFilters ¶
type EventResponse ¶
type JSONScript ¶
type JSONScript struct { AtAccounts []string `json:"atAccounts"` AtNoDataAccounts []interface{} `json:"atNoDataAccounts"` Channels []interface{} `json:"channels"` CheckerOpt CheckerOpt `json:"checkerOpt"` Every string `json:"every"` GroupBy []interface{} `json:"groupBy"` Interval int `json:"interval"` Message string `json:"message"` Name string `json:"name"` NoDataMessage string `json:"noDataMessage"` NoDataTitle string `json:"noDataTitle"` RecoverNeedPeriodCount int `json:"recoverNeedPeriodCount"` Title string `json:"title"` Type string `json:"type"` }
type MonitorContent ¶
type MonitorContent struct { CreateAt int `json:"createAt"` CreatedWay string `json:"createdWay"` Creator string `json:"creator"` CrontabInfo CrontabInfo `json:"crontabInfo"` DeleteAt int `json:"deleteAt"` Extend Extend `json:"extend"` ID int `json:"id"` IsSLI bool `json:"isSLI"` JSONScript JSONScript `json:"jsonScript"` MonitorName string `json:"monitorName"` MonitorUUID string `json:"monitorUUID"` RefKey string `json:"refKey"` Status int `json:"status"` Type string `json:"type"` UpdateAt int `json:"updateAt"` Updator string `json:"updator"` UpdatorInfo UpdatorInfo `json:"updatorInfo"` UUID string `json:"uuid"` WorkspaceUUID string `json:"workspaceUUID"` }
type MonitorMeta ¶
type MonitorMeta struct { AlertInfo AlertInfo `json:"alert_info"` CheckTargets []CheckTargets `json:"check_targets"` CheckerOpt CheckerOpt `json:"checker_opt"` DimensionTags DimensionTags `json:"dimension_tags"` ExtraData ExtraData `json:"extra_data"` MonitorOpt MonitorOpt `json:"monitor_opt"` }
type MonitorOpt ¶
type MonitorResponse ¶
type Query ¶
type Query struct { Alias string `json:"alias"` Code string `json:"code"` DataSource string `json:"dataSource"` Field string `json:"field"` FieldFunc string `json:"fieldFunc"` FieldType string `json:"fieldType"` Filters []Filters `json:"filters"` FuncList []interface{} `json:"funcList"` GroupBy []interface{} `json:"groupBy"` GroupByTime string `json:"groupByTime"` Namespace string `json:"namespace"` Q string `json:"q"` Type string `json:"type"` }
type Rules ¶
type Rules struct { ConditionLogic string `json:"conditionLogic"` Conditions []Conditions `json:"conditions"` Status string `json:"status"` }
type SearchEventBody ¶
type SearchEventBody struct { TimeRange []int64 `json:"timeRange"` Filters []EventFilters `json:"filters"` Limit int `json:"limit"` }
type SearchEventByMonitorArg ¶
type Targets ¶
type Targets struct { HasSecret bool `json:"hasSecret"` IgnoreReason string `json:"ignoreReason"` IsIgnored bool `json:"isIgnored"` MinInterval int `json:"minInterval"` Status []interface{} `json:"status"` SubStatus []string `json:"subStatus"` To []string `json:"to,omitempty"` Type string `json:"type"` BodyType string `json:"bodyType,omitempty"` Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` }
Click to show internal directories.
Click to hide internal directories.