Versions in this module Expand all Collapse all v0 v0.2.0 Dec 26, 2018 Changes in this version type Client + func (c *Client) FindRoles(serviceName string) ([]*Role, error) v0.1.0 Nov 19, 2018 Changes in this version + type AlertsResp struct + Alerts []*Alert + NextID string type Client + func (c *Client) FindAlertsByNextID(nextID string) (*AlertsResp, error) + func (c *Client) FindWithClosedAlerts() (*AlertsResp, error) + func (c *Client) FindWithClosedAlertsByNextID(nextID string) (*AlertsResp, error) v0.0.2 Oct 16, 2018 v0.0.1 Sep 19, 2018 Changes in this version + const HostStatusMaintenance + const HostStatusPoweroff + const HostStatusStandby + const HostStatusWorking + type APIError struct + Message string + StatusCode int + func (err *APIError) Error() string + type Alert struct + ClosedAt int64 + HostID string + ID string + Message string + MonitorID string + OpenedAt int64 + Reason string + Status string + Type string + Value float64 + type BlockDevice map[string]map[string]interface + type CPU []map[string]interface + type CheckConfig struct + Memo string + Name string + type CheckReport struct + MaxCheckAttempts uint + Message string + Name string + NotificationInterval uint + OccurredAt int64 + Source CheckSource + Status CheckStatus + type CheckReports struct + Reports []*CheckReport + type CheckSource interface + CheckType func() string + func NewCheckSourceHost(hostID string) CheckSource + type CheckStatus string + const CheckStatusCritical + const CheckStatusOK + const CheckStatusUnknown + const CheckStatusWarning + type Client struct + APIKey string + AdditionalHeaders http.Header + BaseURL *url.URL + HTTPClient *http.Client + UserAgent string + Verbose bool + func NewClient(apikey string) *Client + func NewClientWithOptions(apikey string, rawurl string, verbose bool) (*Client, error) + func (c *Client) CloseAlert(alertID string, reason string) (*Alert, error) + func (c *Client) CreateDashboard(param *Dashboard) (*Dashboard, error) + func (c *Client) CreateGraphAnnotation(annotation *GraphAnnotation) (*GraphAnnotation, error) + func (c *Client) CreateGraphDefs(payloads []*GraphDefsParam) error + func (c *Client) CreateHost(param *CreateHostParam) (string, error) + func (c *Client) CreateMonitor(param Monitor) (Monitor, error) + func (c *Client) CreateRole(serviceName string, param *CreateRoleParam) (*Role, error) + func (c *Client) CreateService(param *CreateServiceParam) (*Service, error) + func (c *Client) DeleteDashboard(dashboardID string) (*Dashboard, error) + func (c *Client) DeleteGraphAnnotation(annotationID string) (*GraphAnnotation, error) + func (c *Client) DeleteHostMetaData(hostID, namespace string) error + func (c *Client) DeleteMonitor(monitorID string) (Monitor, error) + func (c *Client) DeleteRole(serviceName, roleName string) (*Role, error) + func (c *Client) DeleteRoleMetaData(serviceName, roleName, namespace string) error + func (c *Client) DeleteService(serviceName string) (*Service, error) + func (c *Client) DeleteServiceMetaData(serviceName, namespace string) error + func (c *Client) FetchHostMetricValues(hostID string, metricName string, from int64, to int64) ([]MetricValue, error) + func (c *Client) FetchLatestMetricValues(hostIDs []string, metricNames []string) (LatestMetricValues, error) + func (c *Client) FetchServiceMetricValues(serviceName string, metricName string, from int64, to int64) ([]MetricValue, error) + func (c *Client) FindAlerts() ([]*Alert, error) + func (c *Client) FindDashboard(dashboardID string) (*Dashboard, error) + func (c *Client) FindDashboards() ([]*Dashboard, error) + func (c *Client) FindGraphAnnotations(service string, from int64, to int64) ([]GraphAnnotation, error) + func (c *Client) FindHost(id string) (*Host, error) + func (c *Client) FindHosts(param *FindHostsParam) ([]*Host, error) + func (c *Client) FindMonitors() ([]Monitor, error) + func (c *Client) FindServices() ([]*Service, error) + func (c *Client) GetHostMetaData(hostID, namespace string) (*HostMetaDataResp, error) + func (c *Client) GetHostMetaDataNameSpaces(hostID string) ([]string, error) + func (c *Client) GetMonitor(monitorID string) (Monitor, error) + func (c *Client) GetOrg() (*Org, error) + func (c *Client) GetRoleMetaData(serviceName, roleName, namespace string) (*RoleMetaDataResp, error) + func (c *Client) GetRoleMetaDataNameSpaces(serviceName, roleName string) ([]string, error) + func (c *Client) GetServiceMetaData(serviceName, namespace string) (*ServiceMetaDataResp, error) + func (c *Client) GetServiceMetaDataNameSpaces(serviceName string) ([]string, error) + func (c *Client) ListHostMetricNames(id string) ([]string, error) + func (c *Client) ListServiceMetricNames(serviceName string) ([]string, error) + func (c *Client) PostCheckReports(crs *CheckReports) error + func (c *Client) PostHostMetricValues(metricValues [](*HostMetricValue)) error + func (c *Client) PostHostMetricValuesByHostID(hostID string, metricValues [](*MetricValue)) error + func (c *Client) PostJSON(path string, payload interface{}) (*http.Response, error) + func (c *Client) PostServiceMetricValues(serviceName string, metricValues [](*MetricValue)) error + func (c *Client) PutHostMetaData(hostID, namespace string, metadata HostMetaData) error + func (c *Client) PutJSON(path string, payload interface{}) (*http.Response, error) + func (c *Client) PutRoleMetaData(serviceName, roleName, namespace string, metadata RoleMetaData) error + func (c *Client) PutServiceMetaData(serviceName, namespace string, metadata ServiceMetaData) error + func (c *Client) Request(req *http.Request) (resp *http.Response, err error) + func (c *Client) RetireHost(id string) error + func (c *Client) UpdateDashboard(dashboardID string, param *Dashboard) (*Dashboard, error) + func (c *Client) UpdateGraphAnnotation(annotationID string, annotation *GraphAnnotation) (*GraphAnnotation, error) + func (c *Client) UpdateHost(hostID string, param *UpdateHostParam) (string, error) + func (c *Client) UpdateHostRoleFullnames(hostID string, roleFullnames []string) error + func (c *Client) UpdateHostStatus(hostID string, status string) error + func (c *Client) UpdateMonitor(monitorID string, param Monitor) (Monitor, error) + type Cloud struct + MetaData interface{} + Provider string + type CreateHostParam struct + Checks []CheckConfig + CustomIdentifier string + DisplayName string + Interfaces []Interface + Meta HostMeta + Name string + RoleFullnames []string + type CreateRoleParam Role + type CreateServiceParam struct + Memo string + Name string + type Dashboard struct + BodyMarkDown string + CreatedAt int64 + ID string + Title string + URLPath string + UpdatedAt int64 + type FileSystem map[string]interface + type FindHostsParam struct + CustomIdentifier string + Name string + Roles []string + Service string + Statuses []string + type GraphAnnotation struct + Description string + From int64 + ID string + Roles []string + Service string + Title string + To int64 + type GraphDefsMetric struct + DisplayName string + IsStacked bool + Name string + type GraphDefsParam struct + DisplayName string + Metrics []*GraphDefsMetric + Name string + Unit string + type HeaderField struct + Name string + Value string + type Host struct + CreatedAt int32 + CustomIdentifier string + DisplayName string + ID string + Interfaces []Interface + IsRetired bool + Memo string + Meta HostMeta + Name string + RoleFullnames []string + Roles Roles + Status string + Type string + func (h *Host) DateFromCreatedAt() time.Time + func (h *Host) GetRoleFullnames() []string + func (h *Host) IPAddresses() map[string]string + type HostMeta struct + AgentName string + AgentRevision string + AgentVersion string + BlockDevice BlockDevice + CPU CPU + Cloud *Cloud + Filesystem FileSystem + Kernel Kernel + Memory Memory + type HostMetaData interface + type HostMetaDataResp struct + HostMetaData HostMetaData + LastModified time.Time + type HostMetricValue struct + HostID string + type Interface struct + IPAddress string + IPv4Addresses []string + IPv6Addresses []string + MacAddress string + Name string + type Kernel map[string]string + type LatestMetricValues map[string]map[string]*MetricValue + type Memory map[string]string + type MetricValue struct + Name string + Time int64 + Value interface{} + type Monitor interface + MonitorID func() string + MonitorName func() string + MonitorType func() string + type MonitorConnectivity struct + ExcludeScopes []string + ID string + IsMute bool + Memo string + Name string + NotificationInterval uint64 + Scopes []string + Type string + func (m *MonitorConnectivity) MonitorID() string + func (m *MonitorConnectivity) MonitorName() string + func (m *MonitorConnectivity) MonitorType() string + type MonitorExpression struct + Critical *float64 + Expression string + ID string + IsMute bool + Memo string + Name string + NotificationInterval uint64 + Operator string + Type string + Warning *float64 + func (m *MonitorExpression) MonitorID() string + func (m *MonitorExpression) MonitorName() string + func (m *MonitorExpression) MonitorType() string + type MonitorExternalHTTP struct + CertificationExpirationCritical *uint64 + CertificationExpirationWarning *uint64 + ContainsString string + Headers []HeaderField + ID string + IsMute bool + MaxCheckAttempts uint64 + Memo string + Method string + Name string + NotificationInterval uint64 + RequestBody string + ResponseTimeCritical *float64 + ResponseTimeDuration *uint64 + ResponseTimeWarning *float64 + Service string + SkipCertificateVerification bool + Type string + URL string + func (m *MonitorExternalHTTP) MonitorID() string + func (m *MonitorExternalHTTP) MonitorName() string + func (m *MonitorExternalHTTP) MonitorType() string + type MonitorHostMetric struct + Critical *float64 + Duration uint64 + ExcludeScopes []string + ID string + IsMute bool + MaxCheckAttempts uint64 + Memo string + Metric string + Name string + NotificationInterval uint64 + Operator string + Scopes []string + Type string + Warning *float64 + func (m *MonitorHostMetric) MonitorID() string + func (m *MonitorHostMetric) MonitorName() string + func (m *MonitorHostMetric) MonitorType() string + type MonitorServiceMetric struct + Critical *float64 + Duration uint64 + ID string + IsMute bool + MaxCheckAttempts uint64 + Memo string + Metric string + Name string + NotificationInterval uint64 + Operator string + Service string + Type string + Warning *float64 + func (m *MonitorServiceMetric) MonitorID() string + func (m *MonitorServiceMetric) MonitorName() string + func (m *MonitorServiceMetric) MonitorType() string + type Org struct + Name string + type Role struct + Memo string + Name string + type RoleMetaData interface + type RoleMetaDataResp struct + LastModified time.Time + RoleMetaData RoleMetaData + type Roles map[string][]string + type Service struct + Memo string + Name string + Roles []string + type ServiceMetaData interface + type ServiceMetaDataResp struct + LastModified time.Time + ServiceMetaData ServiceMetaData + type UpdateHostParam CreateHostParam