README

mackerel-client-go

Build Status Coverage Status GoDoc

mackerel-client-go is a Go client library for mackerel.io API.

Usage

import "github.com/mackerelio/mackerel-client-go"
client := mackerel.NewClient("<Put your API key>")

hosts, err := client.FindHosts(&mackerel.FindHostsParam{
        Service: "My-Service",
        Roles: []string{"proxy"},
        Statuses: []string{mackerel.HostStatusWorking},
})

err := client.PostServiceMetricValues("My-Service", []*mackerel.MetricValue{
        &mackerel.MetricValue{
              Name:  "proxy.access_log.latency",
              Time:  123456789,
              Value: 500,
        },
})

CAUTION

Now, mackerel-client-go is an ALPHA version. In the future release, it may change it's interface.

CONTRIBUTION

  1. Fork (https://github.com/mackerelio/mackerel-client-go/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the go test ./... command and confirm that it passes
  6. Run gofmt -s
  7. Create new Pull Request

License

Copyright 2014 Hatena Co., Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Expand ▾ Collapse ▴

Documentation

Index

Constants

View Source
const (
	// HostStatusWorking represents "working" status
	HostStatusWorking = "working"
	// HostStatusStandby represents "standby" status
	HostStatusStandby = "standby"
	// HostStatusMaintenance represents "maintenance" status
	HostStatusMaintenance = "maintenance"
	// HostStatusPoweroff represents "poeroff" status
	HostStatusPoweroff = "poweroff"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Message    string
}

    APIError represents the error type from Mackerel API.

    func (*APIError) Error

    func (err *APIError) Error() string

    type Alert

    type Alert struct {
    	ID        string  `json:"id,omitempty"`
    	Status    string  `json:"status,omitempty"`
    	MonitorID string  `json:"monitorId,omitempty"`
    	Type      string  `json:"type,omitempty"`
    	HostID    string  `json:"hostId,omitempty"`
    	Value     float64 `json:"value,omitempty"`
    	Message   string  `json:"message,omitempty"`
    	Reason    string  `json:"reason,omitempty"`
    	OpenedAt  int64   `json:"openedAt,omitempty"`
    	ClosedAt  int64   `json:"closedAt,omitempty"`
    }

      Alert information

      type AlertGroupSetting

      type AlertGroupSetting struct {
      	ID                   string   `json:"id,omitempty"`
      	Name                 string   `json:"name"`
      	Memo                 string   `json:"memo,omitempty"`
      	ServiceScopes        []string `json:"serviceScopes,omitempty"`
      	RoleScopes           []string `json:"roleScopes,omitempty"`
      	MonitorScopes        []string `json:"monitorScopes,omitempty"`
      	NotificationInterval uint64   `json:"notificationInterval,omitempty"`
      }

        AlertGroupSetting represents a Mackerel alert group setting. ref. https://mackerel.io/api-docs/entry/alert-group-settings

        type AlertsResp

        type AlertsResp struct {
        	Alerts []*Alert `json:"alerts"`
        	NextID string   `json:"nextId,omitempty"`
        }

          AlertsResp includes alert and next id

          type BlockDevice

          type BlockDevice map[string]map[string]interface{}

            BlockDevice blockdevice

            type CPU

            type CPU []map[string]interface{}

              CPU cpu

              type Channel

              type Channel struct {
              	// ID is excluded when used to call CreateChannel
              	ID string `json:"id,omitempty"`
              
              	Name string `json:"name"`
              	Type string `json:"type"`
              
              	// Exists when the type is "email"
              	Emails  *[]string `json:"emails,omitempty"`
              	UserIDs *[]string `json:"userIds,omitempty"`
              
              	// Exists when the type is "slack"
              	Mentions Mentions `json:"mentions,omitempty"`
              	// In order to support both 'not setting this field' and 'setting the field as false',
              	// this field needed to be *bool not bool.
              	EnabledGraphImage *bool `json:"enabledGraphImage,omitempty"`
              
              	// Exists when the type is "slack" or "webhook"
              	URL string `json:"url,omitempty"`
              
              	// Exists when the type is "email", "slack", or "webhook"
              	Events *[]string `json:"events,omitempty"`
              }

                Channel represents a Mackerel notification channel. ref. https://mackerel.io/api-docs/entry/channels

                type CheckConfig

                type CheckConfig struct {
                	Name string `json:"name,omitempty"`
                	Memo string `json:"memo,omitempty"`
                }

                  CheckConfig is check plugin name and memo

                  type CheckReport

                  type CheckReport struct {
                  	Source               CheckSource `json:"source"`
                  	Name                 string      `json:"name"`
                  	Status               CheckStatus `json:"status"`
                  	Message              string      `json:"message"`
                  	OccurredAt           int64       `json:"occurredAt"`
                  	NotificationInterval uint        `json:"notificationInterval,omitempty"`
                  	MaxCheckAttempts     uint        `json:"maxCheckAttempts,omitempty"`
                  }

                    CheckReport represents a report of check monitoring

                    type CheckReports

                    type CheckReports struct {
                    	Reports []*CheckReport `json:"reports"`
                    }

                      CheckReports represents check reports for API

                      type CheckSource

                      type CheckSource interface {
                      	CheckType() string
                      	// contains filtered or unexported methods
                      }

                        CheckSource represents interface to which each check source type must confirm to

                        func NewCheckSourceHost

                        func NewCheckSourceHost(hostID string) CheckSource

                          NewCheckSourceHost returns new CheckSource which check type is "host"

                          type CheckStatus

                          type CheckStatus string

                            CheckStatus represents check monitoring status

                            const (
                            	CheckStatusOK       CheckStatus = "OK"
                            	CheckStatusWarning  CheckStatus = "WARNING"
                            	CheckStatusCritical CheckStatus = "CRITICAL"
                            	CheckStatusUnknown  CheckStatus = "UNKNOWN"
                            )

                              CheckStatuses

                              type Client

                              type Client struct {
                              	BaseURL           *url.URL
                              	APIKey            string
                              	Verbose           bool
                              	UserAgent         string
                              	AdditionalHeaders http.Header
                              	HTTPClient        *http.Client
                              
                              	// Client will send logging events to both Logger and PrioritizedLogger.
                              	// When neither Logger or PrioritizedLogger is set, the log package's standard logger will be used.
                              	Logger            *log.Logger
                              	PrioritizedLogger PrioritizedLogger
                              }

                                Client api client for mackerel

                                func NewClient

                                func NewClient(apikey string) *Client

                                  NewClient returns new mackerel.Client

                                  func NewClientWithOptions

                                  func NewClientWithOptions(apikey string, rawurl string, verbose bool) (*Client, error)

                                    NewClientWithOptions returns new mackerel.Client

                                    func (*Client) CloseAlert

                                    func (c *Client) CloseAlert(alertID string, reason string) (*Alert, error)

                                      CloseAlert close alert

                                      func (*Client) CreateAlertGroupSetting

                                      func (c *Client) CreateAlertGroupSetting(param *AlertGroupSetting) (*AlertGroupSetting, error)

                                        CreateAlertGroupSetting creates a alert group setting

                                        func (*Client) CreateChannel

                                        func (c *Client) CreateChannel(param *Channel) (*Channel, error)

                                          CreateChannel requests the channels API with the given params to create a channel and returns the created channel.

                                          func (*Client) CreateDashboard

                                          func (c *Client) CreateDashboard(param *Dashboard) (*Dashboard, error)

                                            CreateDashboard creating dashboard

                                            func (*Client) CreateDowntime

                                            func (c *Client) CreateDowntime(param *Downtime) (*Downtime, error)

                                              CreateDowntime creates a downtime

                                              func (*Client) CreateGraphAnnotation

                                              func (c *Client) CreateGraphAnnotation(annotation *GraphAnnotation) (*GraphAnnotation, error)

                                                CreateGraphAnnotation creates graph annotation.

                                                func (*Client) CreateGraphDefs

                                                func (c *Client) CreateGraphDefs(payloads []*GraphDefsParam) error

                                                  CreateGraphDefs create graph defs

                                                  func (*Client) CreateHost

                                                  func (c *Client) CreateHost(param *CreateHostParam) (string, error)

                                                    CreateHost creates host

                                                    func (*Client) CreateMonitor

                                                    func (c *Client) CreateMonitor(param Monitor) (Monitor, error)

                                                      CreateMonitor creating monitor

                                                      func (*Client) CreateNotificationGroup

                                                      func (c *Client) CreateNotificationGroup(param *NotificationGroup) (*NotificationGroup, error)

                                                        CreateNotificationGroup creates a notification group.

                                                        func (*Client) CreateRole

                                                        func (c *Client) CreateRole(serviceName string, param *CreateRoleParam) (*Role, error)

                                                          CreateRole creates role.

                                                          func (*Client) CreateService

                                                          func (c *Client) CreateService(param *CreateServiceParam) (*Service, error)

                                                            CreateService creates service

                                                            func (*Client) DeleteAlertGroupSetting

                                                            func (c *Client) DeleteAlertGroupSetting(id string) (*AlertGroupSetting, error)

                                                              DeleteAlertGroupSetting deletes a alert group setting specified by ID.

                                                              func (*Client) DeleteChannel

                                                              func (c *Client) DeleteChannel(id string) (*Channel, error)

                                                                DeleteChannel requests the channels API with the given id to delete the specified channel, and returns the deleted channel.

                                                                func (*Client) DeleteDashboard

                                                                func (c *Client) DeleteDashboard(dashboardID string) (*Dashboard, error)

                                                                  DeleteDashboard delete dashboard

                                                                  func (*Client) DeleteDowntime

                                                                  func (c *Client) DeleteDowntime(downtimeID string) (*Downtime, error)

                                                                    DeleteDowntime deletes downtime

                                                                    func (*Client) DeleteGraphAnnotation

                                                                    func (c *Client) DeleteGraphAnnotation(annotationID string) (*GraphAnnotation, error)

                                                                      DeleteGraphAnnotation deletes graph annotation.

                                                                      func (*Client) DeleteHostMetaData

                                                                      func (c *Client) DeleteHostMetaData(hostID, namespace string) error

                                                                        DeleteHostMetaData delete host metadata.

                                                                        func (*Client) DeleteMonitor

                                                                        func (c *Client) DeleteMonitor(monitorID string) (Monitor, error)

                                                                          DeleteMonitor update monitor

                                                                          func (*Client) DeleteNotificationGroup

                                                                          func (c *Client) DeleteNotificationGroup(id string) (*NotificationGroup, error)

                                                                            DeleteNotificationGroup deletes a notification group

                                                                            func (*Client) DeleteRole

                                                                            func (c *Client) DeleteRole(serviceName, roleName string) (*Role, error)

                                                                              DeleteRole deletes role.

                                                                              func (*Client) DeleteRoleMetaData

                                                                              func (c *Client) DeleteRoleMetaData(serviceName, roleName, namespace string) error

                                                                                DeleteRoleMetaData delete role metadata.

                                                                                func (*Client) DeleteService

                                                                                func (c *Client) DeleteService(serviceName string) (*Service, error)

                                                                                  DeleteService deletes service

                                                                                  func (*Client) DeleteServiceMetaData

                                                                                  func (c *Client) DeleteServiceMetaData(serviceName, namespace string) error

                                                                                    DeleteServiceMetaData delete service metadata.

                                                                                    func (*Client) DeleteUser

                                                                                    func (c *Client) DeleteUser(userID string) (*User, error)

                                                                                      DeleteUser delete users.

                                                                                      func (*Client) FetchHostMetricValues

                                                                                      func (c *Client) FetchHostMetricValues(hostID string, metricName string, from int64, to int64) ([]MetricValue, error)

                                                                                        FetchHostMetricValues retrieves the metric values for a Host

                                                                                        func (*Client) FetchLatestMetricValues

                                                                                        func (c *Client) FetchLatestMetricValues(hostIDs []string, metricNames []string) (LatestMetricValues, error)

                                                                                          FetchLatestMetricValues fetch latest metrics

                                                                                          func (*Client) FetchServiceMetricValues

                                                                                          func (c *Client) FetchServiceMetricValues(serviceName string, metricName string, from int64, to int64) ([]MetricValue, error)

                                                                                            FetchServiceMetricValues retrieves the metric values for a Service

                                                                                            func (*Client) FindAlertGroupSettings

                                                                                            func (c *Client) FindAlertGroupSettings() ([]*AlertGroupSetting, error)

                                                                                              FindAlertGroupSettings finds alert group settings

                                                                                              func (*Client) FindAlerts

                                                                                              func (c *Client) FindAlerts() (*AlertsResp, error)

                                                                                                FindAlerts find open alerts

                                                                                                func (*Client) FindAlertsByNextID

                                                                                                func (c *Client) FindAlertsByNextID(nextID string) (*AlertsResp, error)

                                                                                                  FindAlertsByNextID find next open alerts by next id

                                                                                                  func (*Client) FindChannels

                                                                                                  func (c *Client) FindChannels() ([]*Channel, error)

                                                                                                    FindChannels requests the channels API and returns a list of Channel

                                                                                                    func (*Client) FindDashboard

                                                                                                    func (c *Client) FindDashboard(dashboardID string) (*Dashboard, error)

                                                                                                      FindDashboard find dashboard

                                                                                                      func (*Client) FindDashboards

                                                                                                      func (c *Client) FindDashboards() ([]*Dashboard, error)

                                                                                                        FindDashboards find dashboards

                                                                                                        func (*Client) FindDowntimes

                                                                                                        func (c *Client) FindDowntimes() ([]*Downtime, error)

                                                                                                          FindDowntimes finds downtimes

                                                                                                          func (*Client) FindGraphAnnotations

                                                                                                          func (c *Client) FindGraphAnnotations(service string, from int64, to int64) ([]GraphAnnotation, error)

                                                                                                            FindGraphAnnotations fetches graph annotation.

                                                                                                            func (*Client) FindHost

                                                                                                            func (c *Client) FindHost(id string) (*Host, error)

                                                                                                              FindHost finds the host

                                                                                                              func (*Client) FindHosts

                                                                                                              func (c *Client) FindHosts(param *FindHostsParam) ([]*Host, error)

                                                                                                                FindHosts finds hosts

                                                                                                                func (*Client) FindInvitations

                                                                                                                func (c *Client) FindInvitations() ([]*Invitation, error)

                                                                                                                  FindInvitations find invitations.

                                                                                                                  func (*Client) FindMonitors

                                                                                                                  func (c *Client) FindMonitors() ([]Monitor, error)

                                                                                                                    FindMonitors find monitors

                                                                                                                    func (*Client) FindNotificationGroups

                                                                                                                    func (c *Client) FindNotificationGroups() ([]*NotificationGroup, error)

                                                                                                                      FindNotificationGroups finds notification groups

                                                                                                                      func (*Client) FindRoles

                                                                                                                      func (c *Client) FindRoles(serviceName string) ([]*Role, error)

                                                                                                                        FindRoles finds roles.

                                                                                                                        func (*Client) FindServices

                                                                                                                        func (c *Client) FindServices() ([]*Service, error)

                                                                                                                          FindServices finds services.

                                                                                                                          func (*Client) FindUsers

                                                                                                                          func (c *Client) FindUsers() ([]*User, error)

                                                                                                                            FindUsers find users.

                                                                                                                            func (*Client) FindWithClosedAlerts

                                                                                                                            func (c *Client) FindWithClosedAlerts() (*AlertsResp, error)

                                                                                                                              FindWithClosedAlerts find open and close alerts

                                                                                                                              func (*Client) FindWithClosedAlertsByNextID

                                                                                                                              func (c *Client) FindWithClosedAlertsByNextID(nextID string) (*AlertsResp, error)

                                                                                                                                FindWithClosedAlertsByNextID find open and close alerts by next id

                                                                                                                                func (*Client) GetAlertGroupSetting

                                                                                                                                func (c *Client) GetAlertGroupSetting(id string) (*AlertGroupSetting, error)

                                                                                                                                  GetAlertGroupSetting gets alert group setting specified by ID

                                                                                                                                  func (*Client) GetHostMetaData

                                                                                                                                  func (c *Client) GetHostMetaData(hostID, namespace string) (*HostMetaDataResp, error)

                                                                                                                                    GetHostMetaData find host metadata.

                                                                                                                                    func (*Client) GetHostMetaDataNameSpaces

                                                                                                                                    func (c *Client) GetHostMetaDataNameSpaces(hostID string) ([]string, error)

                                                                                                                                      GetHostMetaDataNameSpaces fetches namespaces of host metadata.

                                                                                                                                      func (*Client) GetMonitor

                                                                                                                                      func (c *Client) GetMonitor(monitorID string) (Monitor, error)

                                                                                                                                        GetMonitor get monitor.

                                                                                                                                        func (*Client) GetOrg

                                                                                                                                        func (c *Client) GetOrg() (*Org, error)

                                                                                                                                          GetOrg get the org

                                                                                                                                          func (*Client) GetRoleMetaData

                                                                                                                                          func (c *Client) GetRoleMetaData(serviceName, roleName, namespace string) (*RoleMetaDataResp, error)

                                                                                                                                            GetRoleMetaData find role metadata.

                                                                                                                                            func (*Client) GetRoleMetaDataNameSpaces

                                                                                                                                            func (c *Client) GetRoleMetaDataNameSpaces(serviceName, roleName string) ([]string, error)

                                                                                                                                              GetRoleMetaDataNameSpaces fetches namespaces of role metadata.

                                                                                                                                              func (*Client) GetServiceMetaData

                                                                                                                                              func (c *Client) GetServiceMetaData(serviceName, namespace string) (*ServiceMetaDataResp, error)

                                                                                                                                                GetServiceMetaData find service metadata.

                                                                                                                                                func (*Client) GetServiceMetaDataNameSpaces

                                                                                                                                                func (c *Client) GetServiceMetaDataNameSpaces(serviceName string) ([]string, error)

                                                                                                                                                  GetServiceMetaDataNameSpaces fetches namespaces of service metadata.

                                                                                                                                                  func (*Client) ListHostMetricNames

                                                                                                                                                  func (c *Client) ListHostMetricNames(id string) ([]string, error)

                                                                                                                                                    ListHostMetricNames lists metric names of a host

                                                                                                                                                    func (*Client) ListMonitoredStatues

                                                                                                                                                    func (c *Client) ListMonitoredStatues(id string) ([]MonitoredStatus, error)

                                                                                                                                                      ListMonitoredStatues lists monitored statues of a host

                                                                                                                                                      func (*Client) ListServiceMetricNames

                                                                                                                                                      func (c *Client) ListServiceMetricNames(serviceName string) ([]string, error)

                                                                                                                                                        ListServiceMetricNames lists metric names of a service

                                                                                                                                                        func (*Client) PostCheckReports

                                                                                                                                                        func (c *Client) PostCheckReports(crs *CheckReports) error

                                                                                                                                                          PostCheckReports reports check monitoring results

                                                                                                                                                          func (*Client) PostHostMetricValues

                                                                                                                                                          func (c *Client) PostHostMetricValues(metricValues [](*HostMetricValue)) error

                                                                                                                                                            PostHostMetricValues post host metrics

                                                                                                                                                            func (*Client) PostHostMetricValuesByHostID

                                                                                                                                                            func (c *Client) PostHostMetricValuesByHostID(hostID string, metricValues [](*MetricValue)) error

                                                                                                                                                              PostHostMetricValuesByHostID post host metrics

                                                                                                                                                              func (*Client) PostJSON

                                                                                                                                                              func (c *Client) PostJSON(path string, payload interface{}) (*http.Response, error)

                                                                                                                                                                PostJSON shortcut method for posting json

                                                                                                                                                                func (*Client) PostServiceMetricValues

                                                                                                                                                                func (c *Client) PostServiceMetricValues(serviceName string, metricValues [](*MetricValue)) error

                                                                                                                                                                  PostServiceMetricValues post service metrics

                                                                                                                                                                  func (*Client) PutHostMetaData

                                                                                                                                                                  func (c *Client) PutHostMetaData(hostID, namespace string, metadata HostMetaData) error

                                                                                                                                                                    PutHostMetaData put host metadata.

                                                                                                                                                                    func (*Client) PutJSON

                                                                                                                                                                    func (c *Client) PutJSON(path string, payload interface{}) (*http.Response, error)

                                                                                                                                                                      PutJSON shortcut method for putting json

                                                                                                                                                                      func (*Client) PutRoleMetaData

                                                                                                                                                                      func (c *Client) PutRoleMetaData(serviceName, roleName, namespace string, metadata RoleMetaData) error

                                                                                                                                                                        PutRoleMetaData put role metadata.

                                                                                                                                                                        func (*Client) PutServiceMetaData

                                                                                                                                                                        func (c *Client) PutServiceMetaData(serviceName, namespace string, metadata ServiceMetaData) error

                                                                                                                                                                          PutServiceMetaData put service metadata.

                                                                                                                                                                          func (*Client) Request

                                                                                                                                                                          func (c *Client) Request(req *http.Request) (resp *http.Response, err error)

                                                                                                                                                                            Request request to mackerel and receive response

                                                                                                                                                                            func (*Client) RetireHost

                                                                                                                                                                            func (c *Client) RetireHost(id string) error

                                                                                                                                                                              RetireHost retires the host

                                                                                                                                                                              func (*Client) UpdateAlertGroupSetting

                                                                                                                                                                              func (c *Client) UpdateAlertGroupSetting(id string, param *AlertGroupSetting) (*AlertGroupSetting, error)

                                                                                                                                                                                UpdateAlertGroupSetting updates a alert group setting

                                                                                                                                                                                func (*Client) UpdateDashboard

                                                                                                                                                                                func (c *Client) UpdateDashboard(dashboardID string, param *Dashboard) (*Dashboard, error)

                                                                                                                                                                                  UpdateDashboard update dashboard

                                                                                                                                                                                  func (*Client) UpdateDowntime

                                                                                                                                                                                  func (c *Client) UpdateDowntime(downtimeID string, param *Downtime) (*Downtime, error)

                                                                                                                                                                                    UpdateDowntime updates a downtime

                                                                                                                                                                                    func (*Client) UpdateGraphAnnotation

                                                                                                                                                                                    func (c *Client) UpdateGraphAnnotation(annotationID string, annotation *GraphAnnotation) (*GraphAnnotation, error)

                                                                                                                                                                                      UpdateGraphAnnotation updates graph annotation.

                                                                                                                                                                                      func (*Client) UpdateHost

                                                                                                                                                                                      func (c *Client) UpdateHost(hostID string, param *UpdateHostParam) (string, error)

                                                                                                                                                                                        UpdateHost updates host

                                                                                                                                                                                        func (*Client) UpdateHostRoleFullnames

                                                                                                                                                                                        func (c *Client) UpdateHostRoleFullnames(hostID string, roleFullnames []string) error

                                                                                                                                                                                          UpdateHostRoleFullnames updates host roles

                                                                                                                                                                                          func (*Client) UpdateHostStatus

                                                                                                                                                                                          func (c *Client) UpdateHostStatus(hostID string, status string) error

                                                                                                                                                                                            UpdateHostStatus updates host status

                                                                                                                                                                                            func (*Client) UpdateMonitor

                                                                                                                                                                                            func (c *Client) UpdateMonitor(monitorID string, param Monitor) (Monitor, error)

                                                                                                                                                                                              UpdateMonitor update monitor

                                                                                                                                                                                              func (*Client) UpdateNotificationGroup

                                                                                                                                                                                              func (c *Client) UpdateNotificationGroup(id string, param *NotificationGroup) (*NotificationGroup, error)

                                                                                                                                                                                                UpdateNotificationGroup updates a notification group

                                                                                                                                                                                                type Cloud

                                                                                                                                                                                                type Cloud struct {
                                                                                                                                                                                                	Provider string      `json:"provider,omitempty"`
                                                                                                                                                                                                	MetaData interface{} `json:"metadata,omitempty"`
                                                                                                                                                                                                }

                                                                                                                                                                                                  Cloud cloud

                                                                                                                                                                                                  type CreateHostParam

                                                                                                                                                                                                  type CreateHostParam struct {
                                                                                                                                                                                                  	Name             string        `json:"name"`
                                                                                                                                                                                                  	DisplayName      string        `json:"displayName,omitempty"`
                                                                                                                                                                                                  	Meta             HostMeta      `json:"meta"`
                                                                                                                                                                                                  	Interfaces       []Interface   `json:"interfaces"`
                                                                                                                                                                                                  	RoleFullnames    []string      `json:"roleFullnames"`
                                                                                                                                                                                                  	Checks           []CheckConfig `json:"checks"`
                                                                                                                                                                                                  	CustomIdentifier string        `json:"customIdentifier,omitempty"`
                                                                                                                                                                                                  }

                                                                                                                                                                                                    CreateHostParam parameters for CreateHost

                                                                                                                                                                                                    type CreateRoleParam

                                                                                                                                                                                                    type CreateRoleParam Role

                                                                                                                                                                                                      CreateRoleParam parameters for CreateRole

                                                                                                                                                                                                      type CreateServiceParam

                                                                                                                                                                                                      type CreateServiceParam struct {
                                                                                                                                                                                                      	Name string `json:"name"`
                                                                                                                                                                                                      	Memo string `json:"memo"`
                                                                                                                                                                                                      }

                                                                                                                                                                                                        CreateServiceParam parameters for CreateService

                                                                                                                                                                                                        type Dashboard

                                                                                                                                                                                                        type Dashboard struct {
                                                                                                                                                                                                        	// Common to legacy dashboard and current dashboard
                                                                                                                                                                                                        	ID        string `json:"id,omitempty"`
                                                                                                                                                                                                        	Title     string `json:"title"`
                                                                                                                                                                                                        	URLPath   string `json:"urlPath"`
                                                                                                                                                                                                        	CreatedAt int64  `json:"createdAt,omitempty"`
                                                                                                                                                                                                        	UpdatedAt int64  `json:"updatedAt,omitempty"`
                                                                                                                                                                                                        
                                                                                                                                                                                                        	// current dashboard
                                                                                                                                                                                                        	Memo    string   `json:"memo"`
                                                                                                                                                                                                        	Widgets []Widget `json:"widgets"`
                                                                                                                                                                                                        
                                                                                                                                                                                                        	// legacy dashboard
                                                                                                                                                                                                        	IsLegacy     bool   `json:"isLegacy,omitempty"`
                                                                                                                                                                                                        	BodyMarkDown string `json:"bodyMarkdown,omitempty"`
                                                                                                                                                                                                        }

                                                                                                                                                                                                          Dashboard information

                                                                                                                                                                                                          type Downtime

                                                                                                                                                                                                          type Downtime struct {
                                                                                                                                                                                                          	ID                   string              `json:"id,omitempty"`
                                                                                                                                                                                                          	Name                 string              `json:"name"`
                                                                                                                                                                                                          	Memo                 string              `json:"memo,omitempty"`
                                                                                                                                                                                                          	Start                int64               `json:"start"`
                                                                                                                                                                                                          	Duration             int64               `json:"duration"`
                                                                                                                                                                                                          	Recurrence           *DowntimeRecurrence `json:"recurrence,omitempty"`
                                                                                                                                                                                                          	ServiceScopes        []string            `json:"serviceScopes,omitempty"`
                                                                                                                                                                                                          	ServiceExcludeScopes []string            `json:"serviceExcludeScopes,omitempty"`
                                                                                                                                                                                                          	RoleScopes           []string            `json:"roleScopes,omitempty"`
                                                                                                                                                                                                          	RoleExcludeScopes    []string            `json:"roleExcludeScopes,omitempty"`
                                                                                                                                                                                                          	MonitorScopes        []string            `json:"monitorScopes,omitempty"`
                                                                                                                                                                                                          	MonitorExcludeScopes []string            `json:"monitorExcludeScopes,omitempty"`
                                                                                                                                                                                                          }

                                                                                                                                                                                                            Downtime information

                                                                                                                                                                                                            type DowntimeRecurrence

                                                                                                                                                                                                            type DowntimeRecurrence struct {
                                                                                                                                                                                                            	Type     DowntimeRecurrenceType `json:"type"`
                                                                                                                                                                                                            	Interval int64                  `json:"interval"`
                                                                                                                                                                                                            	Weekdays []DowntimeWeekday      `json:"weekdays,omitempty"`
                                                                                                                                                                                                            	Until    int64                  `json:"until,omitempty"`
                                                                                                                                                                                                            }

                                                                                                                                                                                                              DowntimeRecurrence ...

                                                                                                                                                                                                              type DowntimeRecurrenceType

                                                                                                                                                                                                              type DowntimeRecurrenceType int

                                                                                                                                                                                                                DowntimeRecurrenceType ...

                                                                                                                                                                                                                const (
                                                                                                                                                                                                                	DowntimeRecurrenceTypeHourly DowntimeRecurrenceType = iota + 1
                                                                                                                                                                                                                	DowntimeRecurrenceTypeDaily
                                                                                                                                                                                                                	DowntimeRecurrenceTypeWeekly
                                                                                                                                                                                                                	DowntimeRecurrenceTypeMonthly
                                                                                                                                                                                                                	DowntimeRecurrenceTypeYearly
                                                                                                                                                                                                                )

                                                                                                                                                                                                                  DowntimeRecurrenceType ...

                                                                                                                                                                                                                  func (DowntimeRecurrenceType) MarshalJSON

                                                                                                                                                                                                                  func (t DowntimeRecurrenceType) MarshalJSON() ([]byte, error)

                                                                                                                                                                                                                    MarshalJSON implements json.Marshaler

                                                                                                                                                                                                                    func (DowntimeRecurrenceType) String

                                                                                                                                                                                                                    func (t DowntimeRecurrenceType) String() string

                                                                                                                                                                                                                      String implements Stringer

                                                                                                                                                                                                                      func (*DowntimeRecurrenceType) UnmarshalJSON

                                                                                                                                                                                                                      func (t *DowntimeRecurrenceType) UnmarshalJSON(b []byte) error

                                                                                                                                                                                                                        UnmarshalJSON implements json.Unmarshaler

                                                                                                                                                                                                                        type DowntimeWeekday

                                                                                                                                                                                                                        type DowntimeWeekday time.Weekday

                                                                                                                                                                                                                          DowntimeWeekday ...

                                                                                                                                                                                                                          func (DowntimeWeekday) MarshalJSON

                                                                                                                                                                                                                          func (w DowntimeWeekday) MarshalJSON() ([]byte, error)

                                                                                                                                                                                                                            MarshalJSON implements json.Marshaler

                                                                                                                                                                                                                            func (DowntimeWeekday) String

                                                                                                                                                                                                                            func (w DowntimeWeekday) String() string

                                                                                                                                                                                                                              String implements Stringer

                                                                                                                                                                                                                              func (*DowntimeWeekday) UnmarshalJSON

                                                                                                                                                                                                                              func (w *DowntimeWeekday) UnmarshalJSON(b []byte) error

                                                                                                                                                                                                                                UnmarshalJSON implements json.Unmarshaler

                                                                                                                                                                                                                                type FileSystem

                                                                                                                                                                                                                                type FileSystem map[string]interface{}

                                                                                                                                                                                                                                  FileSystem filesystem

                                                                                                                                                                                                                                  type FindHostsParam

                                                                                                                                                                                                                                  type FindHostsParam struct {
                                                                                                                                                                                                                                  	Service          string
                                                                                                                                                                                                                                  	Roles            []string
                                                                                                                                                                                                                                  	Name             string
                                                                                                                                                                                                                                  	Statuses         []string
                                                                                                                                                                                                                                  	CustomIdentifier string
                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                    FindHostsParam parameters for FindHosts

                                                                                                                                                                                                                                    type Graph

                                                                                                                                                                                                                                    type Graph struct {
                                                                                                                                                                                                                                    	Type         string `json:"type"`
                                                                                                                                                                                                                                    	Name         string `json:"name,omitempty"`
                                                                                                                                                                                                                                    	HostID       string `json:"hostId,omitempty"`
                                                                                                                                                                                                                                    	RoleFullName string `json:"roleFullname,omitempty"`
                                                                                                                                                                                                                                    	IsStacked    bool   `json:"isStacked,omitempty"`
                                                                                                                                                                                                                                    	ServiceName  string `json:"serviceName,omitempty"`
                                                                                                                                                                                                                                    	Expression   string `json:"expression,omitempty"`
                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                      Graph information

                                                                                                                                                                                                                                      func (Graph) MarshalJSON

                                                                                                                                                                                                                                      func (g Graph) MarshalJSON() ([]byte, error)

                                                                                                                                                                                                                                        MarshalJSON marshals as JSON

                                                                                                                                                                                                                                        type GraphAnnotation

                                                                                                                                                                                                                                        type GraphAnnotation struct {
                                                                                                                                                                                                                                        	ID          string   `json:"id,omitempty"`
                                                                                                                                                                                                                                        	Title       string   `json:"title,omitempty"`
                                                                                                                                                                                                                                        	Description string   `json:"description,omitempty"`
                                                                                                                                                                                                                                        	From        int64    `json:"from,omitempty"`
                                                                                                                                                                                                                                        	To          int64    `json:"to,omitempty"`
                                                                                                                                                                                                                                        	Service     string   `json:"service,omitempty"`
                                                                                                                                                                                                                                        	Roles       []string `json:"roles,omitempty"`
                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                          GraphAnnotation represents parameters to post graph annotation.

                                                                                                                                                                                                                                          type GraphDefsMetric

                                                                                                                                                                                                                                          type GraphDefsMetric struct {
                                                                                                                                                                                                                                          	Name        string `json:"name"`
                                                                                                                                                                                                                                          	DisplayName string `json:"displayName,omitempty"`
                                                                                                                                                                                                                                          	IsStacked   bool   `json:"isStacked"`
                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                            GraphDefsMetric graph metric

                                                                                                                                                                                                                                            type GraphDefsParam

                                                                                                                                                                                                                                            type GraphDefsParam struct {
                                                                                                                                                                                                                                            	Name        string             `json:"name"`
                                                                                                                                                                                                                                            	DisplayName string             `json:"displayName,omitempty"`
                                                                                                                                                                                                                                            	Unit        string             `json:"unit,omitempty"`
                                                                                                                                                                                                                                            	Metrics     []*GraphDefsMetric `json:"metrics"`
                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                              GraphDefsParam parameters for posting graph definitions

                                                                                                                                                                                                                                              type HeaderField

                                                                                                                                                                                                                                              type HeaderField struct {
                                                                                                                                                                                                                                              	Name  string `json:"name"`
                                                                                                                                                                                                                                              	Value string `json:"value"`
                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                HeaderField represents key-value pairs in an HTTP header for external http monitoring.

                                                                                                                                                                                                                                                type Host

                                                                                                                                                                                                                                                type Host struct {
                                                                                                                                                                                                                                                	ID               string      `json:"id"`
                                                                                                                                                                                                                                                	Name             string      `json:"name"`
                                                                                                                                                                                                                                                	DisplayName      string      `json:"displayName,omitempty"`
                                                                                                                                                                                                                                                	CustomIdentifier string      `json:"customIdentifier,omitempty"`
                                                                                                                                                                                                                                                	Type             string      `json:"type"`
                                                                                                                                                                                                                                                	Status           string      `json:"status"`
                                                                                                                                                                                                                                                	Memo             string      `json:"memo"`
                                                                                                                                                                                                                                                	Roles            Roles       `json:"roles"`
                                                                                                                                                                                                                                                	IsRetired        bool        `json:"isRetired"`
                                                                                                                                                                                                                                                	CreatedAt        int32       `json:"createdAt"`
                                                                                                                                                                                                                                                	Meta             HostMeta    `json:"meta"`
                                                                                                                                                                                                                                                	Interfaces       []Interface `json:"interfaces"`
                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                  Host host information

                                                                                                                                                                                                                                                  func (*Host) DateFromCreatedAt

                                                                                                                                                                                                                                                  func (h *Host) DateFromCreatedAt() time.Time

                                                                                                                                                                                                                                                    DateFromCreatedAt returns time.Time

                                                                                                                                                                                                                                                    func (*Host) GetRoleFullnames

                                                                                                                                                                                                                                                    func (h *Host) GetRoleFullnames() []string

                                                                                                                                                                                                                                                      GetRoleFullnames gets role-full-names

                                                                                                                                                                                                                                                      func (*Host) IPAddresses

                                                                                                                                                                                                                                                      func (h *Host) IPAddresses() map[string]string

                                                                                                                                                                                                                                                        IPAddresses returns ipaddresses

                                                                                                                                                                                                                                                        type HostMeta

                                                                                                                                                                                                                                                        type HostMeta struct {
                                                                                                                                                                                                                                                        	AgentRevision string      `json:"agent-revision,omitempty"`
                                                                                                                                                                                                                                                        	AgentVersion  string      `json:"agent-version,omitempty"`
                                                                                                                                                                                                                                                        	AgentName     string      `json:"agent-name,omitempty"`
                                                                                                                                                                                                                                                        	BlockDevice   BlockDevice `json:"block_device,omitempty"`
                                                                                                                                                                                                                                                        	CPU           CPU         `json:"cpu,omitempty"`
                                                                                                                                                                                                                                                        	Filesystem    FileSystem  `json:"filesystem,omitempty"`
                                                                                                                                                                                                                                                        	Kernel        Kernel      `json:"kernel,omitempty"`
                                                                                                                                                                                                                                                        	Memory        Memory      `json:"memory,omitempty"`
                                                                                                                                                                                                                                                        	Cloud         *Cloud      `json:"cloud,omitempty"`
                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                          HostMeta host meta informations

                                                                                                                                                                                                                                                          type HostMetaData

                                                                                                                                                                                                                                                          type HostMetaData interface{}

                                                                                                                                                                                                                                                            HostMetaData represents host metadata body.

                                                                                                                                                                                                                                                            type HostMetaDataResp

                                                                                                                                                                                                                                                            type HostMetaDataResp struct {
                                                                                                                                                                                                                                                            	HostMetaData HostMetaData
                                                                                                                                                                                                                                                            	LastModified time.Time
                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                              HostMetaDataResp represents response for host metadata.

                                                                                                                                                                                                                                                              type HostMetricValue

                                                                                                                                                                                                                                                              type HostMetricValue struct {
                                                                                                                                                                                                                                                              	HostID string `json:"hostId,omitempty"`
                                                                                                                                                                                                                                                              	*MetricValue
                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                HostMetricValue host metric value

                                                                                                                                                                                                                                                                type Interface

                                                                                                                                                                                                                                                                type Interface struct {
                                                                                                                                                                                                                                                                	Name          string   `json:"name,omitempty"`
                                                                                                                                                                                                                                                                	IPAddress     string   `json:"ipAddress,omitempty"`
                                                                                                                                                                                                                                                                	IPv4Addresses []string `json:"ipv4Addresses,omitempty"`
                                                                                                                                                                                                                                                                	IPv6Addresses []string `json:"ipv6Addresses,omitempty"`
                                                                                                                                                                                                                                                                	MacAddress    string   `json:"macAddress,omitempty"`
                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                  Interface network interface

                                                                                                                                                                                                                                                                  type Invitation

                                                                                                                                                                                                                                                                  type Invitation struct {
                                                                                                                                                                                                                                                                  	Email     string `json:"email,omitempty"`
                                                                                                                                                                                                                                                                  	Authority string `json:"authority,omitempty"`
                                                                                                                                                                                                                                                                  	ExpiresAt int64  `json:"expiresAt,omitempty"`
                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                    Invitation information

                                                                                                                                                                                                                                                                    type Kernel

                                                                                                                                                                                                                                                                    type Kernel map[string]string

                                                                                                                                                                                                                                                                      Kernel kernel

                                                                                                                                                                                                                                                                      type LatestMetricValues

                                                                                                                                                                                                                                                                      type LatestMetricValues map[string]map[string]*MetricValue

                                                                                                                                                                                                                                                                        LatestMetricValues latest metric value

                                                                                                                                                                                                                                                                        type Layout

                                                                                                                                                                                                                                                                        type Layout struct {
                                                                                                                                                                                                                                                                        	X      int64 `json:"x"`
                                                                                                                                                                                                                                                                        	Y      int64 `json:"y"`
                                                                                                                                                                                                                                                                        	Width  int64 `json:"width"`
                                                                                                                                                                                                                                                                        	Height int64 `json:"height"`
                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                          Layout information

                                                                                                                                                                                                                                                                          type Memory

                                                                                                                                                                                                                                                                          type Memory map[string]string

                                                                                                                                                                                                                                                                            Memory memory

                                                                                                                                                                                                                                                                            type Mentions

                                                                                                                                                                                                                                                                            type Mentions struct {
                                                                                                                                                                                                                                                                            	OK       string `json:"ok,omitempty"`
                                                                                                                                                                                                                                                                            	Warning  string `json:"warning,omitempty"`
                                                                                                                                                                                                                                                                            	Critical string `json:"critical,omitempty"`
                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                              Mentions represents the structure used for slack channel mentions

                                                                                                                                                                                                                                                                              type Metric

                                                                                                                                                                                                                                                                              type Metric struct {
                                                                                                                                                                                                                                                                              	Type        string `json:"type"`
                                                                                                                                                                                                                                                                              	Name        string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                              	HostID      string `json:"hostId,omitempty"`
                                                                                                                                                                                                                                                                              	ServiceName string `json:"serviceName,omitempty"`
                                                                                                                                                                                                                                                                              	Expression  string `json:"expression,omitempty"`
                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                Metric information

                                                                                                                                                                                                                                                                                func (Metric) MarshalJSON

                                                                                                                                                                                                                                                                                func (m Metric) MarshalJSON() ([]byte, error)

                                                                                                                                                                                                                                                                                  MarshalJSON marshals as JSON

                                                                                                                                                                                                                                                                                  type MetricValue

                                                                                                                                                                                                                                                                                  type MetricValue struct {
                                                                                                                                                                                                                                                                                  	Name  string      `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                  	Time  int64       `json:"time,omitempty"`
                                                                                                                                                                                                                                                                                  	Value interface{} `json:"value,omitempty"`
                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                    MetricValue metric value

                                                                                                                                                                                                                                                                                    type Monitor

                                                                                                                                                                                                                                                                                    type Monitor interface {
                                                                                                                                                                                                                                                                                    	MonitorType() string
                                                                                                                                                                                                                                                                                    	MonitorID() string
                                                                                                                                                                                                                                                                                    	MonitorName() string
                                                                                                                                                                                                                                                                                    	// contains filtered or unexported methods
                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                      Monitor represents interface to which each monitor type must confirm to.

                                                                                                                                                                                                                                                                                      type MonitorAnomalyDetection

                                                                                                                                                                                                                                                                                      type MonitorAnomalyDetection struct {
                                                                                                                                                                                                                                                                                      	ID                   string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                      	Name                 string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                      	Memo                 string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                      	Type                 string `json:"type,omitempty"`
                                                                                                                                                                                                                                                                                      	IsMute               bool   `json:"isMute,omitempty"`
                                                                                                                                                                                                                                                                                      	NotificationInterval uint64 `json:"notificationInterval,omitempty"`
                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                      	WarningSensitivity  string `json:"warningSensitivity,omitempty"`
                                                                                                                                                                                                                                                                                      	CriticalSensitivity string `json:"criticalSensitivity,omitempty"`
                                                                                                                                                                                                                                                                                      	TrainingPeriodFrom  uint64 `json:"trainingPeriodFrom,omitempty"`
                                                                                                                                                                                                                                                                                      	MaxCheckAttempts    uint64 `json:"maxCheckAttempts,omitempty"`
                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                      	Scopes []string `json:"scopes"`
                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                        MonitorAnomalyDetection represents anomaly detection monitor.

                                                                                                                                                                                                                                                                                        func (*MonitorAnomalyDetection) MonitorID

                                                                                                                                                                                                                                                                                        func (m *MonitorAnomalyDetection) MonitorID() string

                                                                                                                                                                                                                                                                                          MonitorID returns monitor id.

                                                                                                                                                                                                                                                                                          func (*MonitorAnomalyDetection) MonitorName

                                                                                                                                                                                                                                                                                          func (m *MonitorAnomalyDetection) MonitorName() string

                                                                                                                                                                                                                                                                                            MonitorName returns monitor name.

                                                                                                                                                                                                                                                                                            func (*MonitorAnomalyDetection) MonitorType

                                                                                                                                                                                                                                                                                            func (m *MonitorAnomalyDetection) MonitorType() string

                                                                                                                                                                                                                                                                                              MonitorType returns monitor type.

                                                                                                                                                                                                                                                                                              type MonitorConnectivity

                                                                                                                                                                                                                                                                                              type MonitorConnectivity struct {
                                                                                                                                                                                                                                                                                              	ID                   string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                              	Name                 string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                              	Memo                 string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                              	AlertStatusOnGone    string `json:"alertStatusOnGone,omitempty"`
                                                                                                                                                                                                                                                                                              	Type                 string `json:"type,omitempty"`
                                                                                                                                                                                                                                                                                              	IsMute               bool   `json:"isMute,omitempty"`
                                                                                                                                                                                                                                                                                              	NotificationInterval uint64 `json:"notificationInterval,omitempty"`
                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                              	Scopes        []string `json:"scopes,omitempty"`
                                                                                                                                                                                                                                                                                              	ExcludeScopes []string `json:"excludeScopes,omitempty"`
                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                MonitorConnectivity represents connectivity monitor.

                                                                                                                                                                                                                                                                                                func (*MonitorConnectivity) MonitorID

                                                                                                                                                                                                                                                                                                func (m *MonitorConnectivity) MonitorID() string

                                                                                                                                                                                                                                                                                                  MonitorID returns monitor id.

                                                                                                                                                                                                                                                                                                  func (*MonitorConnectivity) MonitorName

                                                                                                                                                                                                                                                                                                  func (m *MonitorConnectivity) MonitorName() string

                                                                                                                                                                                                                                                                                                    MonitorName returns monitor name.

                                                                                                                                                                                                                                                                                                    func (*MonitorConnectivity) MonitorType

                                                                                                                                                                                                                                                                                                    func (m *MonitorConnectivity) MonitorType() string

                                                                                                                                                                                                                                                                                                      MonitorType returns monitor type.

                                                                                                                                                                                                                                                                                                      type MonitorExpression

                                                                                                                                                                                                                                                                                                      type MonitorExpression struct {
                                                                                                                                                                                                                                                                                                      	ID                   string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                                      	Name                 string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                                      	Memo                 string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                                      	Type                 string `json:"type,omitempty"`
                                                                                                                                                                                                                                                                                                      	IsMute               bool   `json:"isMute,omitempty"`
                                                                                                                                                                                                                                                                                                      	NotificationInterval uint64 `json:"notificationInterval,omitempty"`
                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                      	Expression string   `json:"expression,omitempty"`
                                                                                                                                                                                                                                                                                                      	Operator   string   `json:"operator,omitempty"`
                                                                                                                                                                                                                                                                                                      	Warning    *float64 `json:"warning"`
                                                                                                                                                                                                                                                                                                      	Critical   *float64 `json:"critical"`
                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                        MonitorExpression represents expression monitor.

                                                                                                                                                                                                                                                                                                        func (*MonitorExpression) MonitorID

                                                                                                                                                                                                                                                                                                        func (m *MonitorExpression) MonitorID() string

                                                                                                                                                                                                                                                                                                          MonitorID returns monitor id.

                                                                                                                                                                                                                                                                                                          func (*MonitorExpression) MonitorName

                                                                                                                                                                                                                                                                                                          func (m *MonitorExpression) MonitorName() string

                                                                                                                                                                                                                                                                                                            MonitorName returns monitor name.

                                                                                                                                                                                                                                                                                                            func (*MonitorExpression) MonitorType

                                                                                                                                                                                                                                                                                                            func (m *MonitorExpression) MonitorType() string

                                                                                                                                                                                                                                                                                                              MonitorType returns monitor type.

                                                                                                                                                                                                                                                                                                              type MonitorExternalHTTP

                                                                                                                                                                                                                                                                                                              type MonitorExternalHTTP struct {
                                                                                                                                                                                                                                                                                                              	ID                   string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                                              	Name                 string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                                              	Memo                 string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                                              	Type                 string `json:"type,omitempty"`
                                                                                                                                                                                                                                                                                                              	IsMute               bool   `json:"isMute,omitempty"`
                                                                                                                                                                                                                                                                                                              	NotificationInterval uint64 `json:"notificationInterval,omitempty"`
                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                              	Method                          string   `json:"method,omitempty"`
                                                                                                                                                                                                                                                                                                              	URL                             string   `json:"url,omitempty"`
                                                                                                                                                                                                                                                                                                              	MaxCheckAttempts                uint64   `json:"maxCheckAttempts,omitempty"`
                                                                                                                                                                                                                                                                                                              	Service                         string   `json:"service,omitempty"`
                                                                                                                                                                                                                                                                                                              	ResponseTimeCritical            *float64 `json:"responseTimeCritical,omitempty"`
                                                                                                                                                                                                                                                                                                              	ResponseTimeWarning             *float64 `json:"responseTimeWarning,omitempty"`
                                                                                                                                                                                                                                                                                                              	ResponseTimeDuration            *uint64  `json:"responseTimeDuration,omitempty"`
                                                                                                                                                                                                                                                                                                              	RequestBody                     string   `json:"requestBody,omitempty"`
                                                                                                                                                                                                                                                                                                              	ContainsString                  string   `json:"containsString,omitempty"`
                                                                                                                                                                                                                                                                                                              	CertificationExpirationCritical *uint64  `json:"certificationExpirationCritical,omitempty"`
                                                                                                                                                                                                                                                                                                              	CertificationExpirationWarning  *uint64  `json:"certificationExpirationWarning,omitempty"`
                                                                                                                                                                                                                                                                                                              	SkipCertificateVerification     bool     `json:"skipCertificateVerification,omitempty"`
                                                                                                                                                                                                                                                                                                              	// Empty list of headers and nil are different. You have to specify empty
                                                                                                                                                                                                                                                                                                              	// list as headers explicitly if you want to remove all headers instead of
                                                                                                                                                                                                                                                                                                              	// using nil.
                                                                                                                                                                                                                                                                                                              	Headers []HeaderField `json:"headers"`
                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                MonitorExternalHTTP represents external HTTP monitor.

                                                                                                                                                                                                                                                                                                                func (*MonitorExternalHTTP) MonitorID

                                                                                                                                                                                                                                                                                                                func (m *MonitorExternalHTTP) MonitorID() string

                                                                                                                                                                                                                                                                                                                  MonitorID returns monitor id.

                                                                                                                                                                                                                                                                                                                  func (*MonitorExternalHTTP) MonitorName

                                                                                                                                                                                                                                                                                                                  func (m *MonitorExternalHTTP) MonitorName() string

                                                                                                                                                                                                                                                                                                                    MonitorName returns monitor name.

                                                                                                                                                                                                                                                                                                                    func (*MonitorExternalHTTP) MonitorType

                                                                                                                                                                                                                                                                                                                    func (m *MonitorExternalHTTP) MonitorType() string

                                                                                                                                                                                                                                                                                                                      MonitorType returns monitor type.

                                                                                                                                                                                                                                                                                                                      type MonitorHostMetric

                                                                                                                                                                                                                                                                                                                      type MonitorHostMetric struct {
                                                                                                                                                                                                                                                                                                                      	ID                   string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                                                      	Name                 string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                                                      	Memo                 string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                                                      	Type                 string `json:"type,omitempty"`
                                                                                                                                                                                                                                                                                                                      	IsMute               bool   `json:"isMute,omitempty"`
                                                                                                                                                                                                                                                                                                                      	NotificationInterval uint64 `json:"notificationInterval,omitempty"`
                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                      	Metric           string   `json:"metric,omitempty"`
                                                                                                                                                                                                                                                                                                                      	Operator         string   `json:"operator,omitempty"`
                                                                                                                                                                                                                                                                                                                      	Warning          *float64 `json:"warning"`
                                                                                                                                                                                                                                                                                                                      	Critical         *float64 `json:"critical"`
                                                                                                                                                                                                                                                                                                                      	Duration         uint64   `json:"duration,omitempty"`
                                                                                                                                                                                                                                                                                                                      	MaxCheckAttempts uint64   `json:"maxCheckAttempts,omitempty"`
                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                      	Scopes        []string `json:"scopes,omitempty"`
                                                                                                                                                                                                                                                                                                                      	ExcludeScopes []string `json:"excludeScopes,omitempty"`
                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                        MonitorHostMetric represents host metric monitor.

                                                                                                                                                                                                                                                                                                                        func (*MonitorHostMetric) MonitorID

                                                                                                                                                                                                                                                                                                                        func (m *MonitorHostMetric) MonitorID() string

                                                                                                                                                                                                                                                                                                                          MonitorID returns monitor id.

                                                                                                                                                                                                                                                                                                                          func (*MonitorHostMetric) MonitorName

                                                                                                                                                                                                                                                                                                                          func (m *MonitorHostMetric) MonitorName() string

                                                                                                                                                                                                                                                                                                                            MonitorName returns monitor name.

                                                                                                                                                                                                                                                                                                                            func (*MonitorHostMetric) MonitorType

                                                                                                                                                                                                                                                                                                                            func (m *MonitorHostMetric) MonitorType() string

                                                                                                                                                                                                                                                                                                                              MonitorType returns monitor type.

                                                                                                                                                                                                                                                                                                                              type MonitorServiceMetric

                                                                                                                                                                                                                                                                                                                              type MonitorServiceMetric struct {
                                                                                                                                                                                                                                                                                                                              	ID                   string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                                                              	Name                 string `json:"name,omitempty"`
                                                                                                                                                                                                                                                                                                                              	Memo                 string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                                                              	Type                 string `json:"type,omitempty"`
                                                                                                                                                                                                                                                                                                                              	IsMute               bool   `json:"isMute,omitempty"`
                                                                                                                                                                                                                                                                                                                              	NotificationInterval uint64 `json:"notificationInterval,omitempty"`
                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                              	Service                 string   `json:"service,omitempty"`
                                                                                                                                                                                                                                                                                                                              	Metric                  string   `json:"metric,omitempty"`
                                                                                                                                                                                                                                                                                                                              	Operator                string   `json:"operator,omitempty"`
                                                                                                                                                                                                                                                                                                                              	Warning                 *float64 `json:"warning"`
                                                                                                                                                                                                                                                                                                                              	Critical                *float64 `json:"critical"`
                                                                                                                                                                                                                                                                                                                              	Duration                uint64   `json:"duration,omitempty"`
                                                                                                                                                                                                                                                                                                                              	MaxCheckAttempts        uint64   `json:"maxCheckAttempts,omitempty"`
                                                                                                                                                                                                                                                                                                                              	MissingDurationWarning  uint64   `json:"missingDurationWarning,omitempty"`
                                                                                                                                                                                                                                                                                                                              	MissingDurationCritical uint64   `json:"missingDurationCritical,omitempty"`
                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                MonitorServiceMetric represents service metric monitor.

                                                                                                                                                                                                                                                                                                                                func (*MonitorServiceMetric) MonitorID

                                                                                                                                                                                                                                                                                                                                func (m *MonitorServiceMetric) MonitorID() string

                                                                                                                                                                                                                                                                                                                                  MonitorID returns monitor id.

                                                                                                                                                                                                                                                                                                                                  func (*MonitorServiceMetric) MonitorName

                                                                                                                                                                                                                                                                                                                                  func (m *MonitorServiceMetric) MonitorName() string

                                                                                                                                                                                                                                                                                                                                    MonitorName returns monitor name.

                                                                                                                                                                                                                                                                                                                                    func (*MonitorServiceMetric) MonitorType

                                                                                                                                                                                                                                                                                                                                    func (m *MonitorServiceMetric) MonitorType() string

                                                                                                                                                                                                                                                                                                                                      MonitorType returns monitor type.

                                                                                                                                                                                                                                                                                                                                      type MonitoredStatus

                                                                                                                                                                                                                                                                                                                                      type MonitoredStatus struct {
                                                                                                                                                                                                                                                                                                                                      	MonitorID string                `json:"monitorId"`
                                                                                                                                                                                                                                                                                                                                      	Status    string                `json:"status"`
                                                                                                                                                                                                                                                                                                                                      	Detail    MonitoredStatusDetail `json:"detail,omitempty"`
                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                        MonitoredStatus monitored status

                                                                                                                                                                                                                                                                                                                                        type MonitoredStatusDetail

                                                                                                                                                                                                                                                                                                                                        type MonitoredStatusDetail struct {
                                                                                                                                                                                                                                                                                                                                        	Type    string `json:"type"`
                                                                                                                                                                                                                                                                                                                                        	Message string `json:"message,omitempty"`
                                                                                                                                                                                                                                                                                                                                        	Memo    string `json:"memo,omitempty"`
                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                          MonitoredStatusDetail monitored status detail

                                                                                                                                                                                                                                                                                                                                          type NotificationGroup

                                                                                                                                                                                                                                                                                                                                          type NotificationGroup struct {
                                                                                                                                                                                                                                                                                                                                          	ID                        string                      `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                                                                          	Name                      string                      `json:"name"`
                                                                                                                                                                                                                                                                                                                                          	NotificationLevel         NotificationLevel           `json:"notificationLevel"`
                                                                                                                                                                                                                                                                                                                                          	ChildNotificationGroupIDs []string                    `json:"childNotificationGroupIds"`
                                                                                                                                                                                                                                                                                                                                          	ChildChannelIDs           []string                    `json:"childChannelIds"`
                                                                                                                                                                                                                                                                                                                                          	Monitors                  []*NotificationGroupMonitor `json:"monitors,omitempty"`
                                                                                                                                                                                                                                                                                                                                          	Services                  []*NotificationGroupService `json:"services,omitempty"`
                                                                                                                                                                                                                                                                                                                                          }

                                                                                                                                                                                                                                                                                                                                            NotificationGroup represents a Mackerel notification group. ref. https://mackerel.io/api-docs/entry/notification-groups

                                                                                                                                                                                                                                                                                                                                            type NotificationGroupMonitor

                                                                                                                                                                                                                                                                                                                                            type NotificationGroupMonitor struct {
                                                                                                                                                                                                                                                                                                                                            	ID          string `json:"id"`
                                                                                                                                                                                                                                                                                                                                            	SkipDefault bool   `json:"skipDefault"`
                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                              NotificationGroupMonitor represents a notification target monitor rule.

                                                                                                                                                                                                                                                                                                                                              type NotificationGroupService

                                                                                                                                                                                                                                                                                                                                              type NotificationGroupService struct {
                                                                                                                                                                                                                                                                                                                                              	Name string `json:"name"`
                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                NotificationGroupService represents a notification target service.

                                                                                                                                                                                                                                                                                                                                                type NotificationLevel

                                                                                                                                                                                                                                                                                                                                                type NotificationLevel string

                                                                                                                                                                                                                                                                                                                                                  NotificationLevel represents a level of notification.

                                                                                                                                                                                                                                                                                                                                                  const (
                                                                                                                                                                                                                                                                                                                                                  	NotificationLevelAll      NotificationLevel = "all"
                                                                                                                                                                                                                                                                                                                                                  	NotificationLevelCritical NotificationLevel = "critical"
                                                                                                                                                                                                                                                                                                                                                  )

                                                                                                                                                                                                                                                                                                                                                    NotificationLevels

                                                                                                                                                                                                                                                                                                                                                    type Org

                                                                                                                                                                                                                                                                                                                                                    type Org struct {
                                                                                                                                                                                                                                                                                                                                                    	Name string `json:"name"`
                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                      Org information

                                                                                                                                                                                                                                                                                                                                                      type PrioritizedLogger

                                                                                                                                                                                                                                                                                                                                                      type PrioritizedLogger interface {
                                                                                                                                                                                                                                                                                                                                                      	Tracef(format string, v ...interface{})
                                                                                                                                                                                                                                                                                                                                                      	Debugf(format string, v ...interface{})
                                                                                                                                                                                                                                                                                                                                                      	Infof(format string, v ...interface{})
                                                                                                                                                                                                                                                                                                                                                      	Warningf(format string, v ...interface{})
                                                                                                                                                                                                                                                                                                                                                      	Errorf(format string, v ...interface{})
                                                                                                                                                                                                                                                                                                                                                      }

                                                                                                                                                                                                                                                                                                                                                        PrioritizedLogger is the interface that groups prioritized logging methods.

                                                                                                                                                                                                                                                                                                                                                        type Range

                                                                                                                                                                                                                                                                                                                                                        type Range struct {
                                                                                                                                                                                                                                                                                                                                                        	Type   string `json:"type"`
                                                                                                                                                                                                                                                                                                                                                        	Period int64  `json:"period,omitempty"`
                                                                                                                                                                                                                                                                                                                                                        	Offset int64  `json:"offset,omitempty"`
                                                                                                                                                                                                                                                                                                                                                        	Start  int64  `json:"start,omitempty"`
                                                                                                                                                                                                                                                                                                                                                        	End    int64  `json:"end,omitempty"`
                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                          Range information

                                                                                                                                                                                                                                                                                                                                                          func (Range) MarshalJSON

                                                                                                                                                                                                                                                                                                                                                          func (r Range) MarshalJSON() ([]byte, error)

                                                                                                                                                                                                                                                                                                                                                            MarshalJSON marshals as JSON

                                                                                                                                                                                                                                                                                                                                                            type Role

                                                                                                                                                                                                                                                                                                                                                            type Role struct {
                                                                                                                                                                                                                                                                                                                                                            	Name string `json:"name"`
                                                                                                                                                                                                                                                                                                                                                            	Memo string `json:"memo"`
                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                              Role represents Mackerel "role".

                                                                                                                                                                                                                                                                                                                                                              type RoleMetaData

                                                                                                                                                                                                                                                                                                                                                              type RoleMetaData interface{}

                                                                                                                                                                                                                                                                                                                                                                RoleMetaData represents role metadata body.

                                                                                                                                                                                                                                                                                                                                                                type RoleMetaDataResp

                                                                                                                                                                                                                                                                                                                                                                type RoleMetaDataResp struct {
                                                                                                                                                                                                                                                                                                                                                                	RoleMetaData RoleMetaData
                                                                                                                                                                                                                                                                                                                                                                	LastModified time.Time
                                                                                                                                                                                                                                                                                                                                                                }

                                                                                                                                                                                                                                                                                                                                                                  RoleMetaDataResp represents response for role metadata.

                                                                                                                                                                                                                                                                                                                                                                  type Roles

                                                                                                                                                                                                                                                                                                                                                                  type Roles map[string][]string

                                                                                                                                                                                                                                                                                                                                                                    Roles host role maps

                                                                                                                                                                                                                                                                                                                                                                    type Service

                                                                                                                                                                                                                                                                                                                                                                    type Service struct {
                                                                                                                                                                                                                                                                                                                                                                    	Name  string   `json:"name"`
                                                                                                                                                                                                                                                                                                                                                                    	Memo  string   `json:"memo"`
                                                                                                                                                                                                                                                                                                                                                                    	Roles []string `json:"roles"`
                                                                                                                                                                                                                                                                                                                                                                    }

                                                                                                                                                                                                                                                                                                                                                                      Service represents Mackerel "service".

                                                                                                                                                                                                                                                                                                                                                                      type ServiceMetaData

                                                                                                                                                                                                                                                                                                                                                                      type ServiceMetaData interface{}

                                                                                                                                                                                                                                                                                                                                                                        ServiceMetaData represents service metadata body.

                                                                                                                                                                                                                                                                                                                                                                        type ServiceMetaDataResp

                                                                                                                                                                                                                                                                                                                                                                        type ServiceMetaDataResp struct {
                                                                                                                                                                                                                                                                                                                                                                        	ServiceMetaData ServiceMetaData
                                                                                                                                                                                                                                                                                                                                                                        	LastModified    time.Time
                                                                                                                                                                                                                                                                                                                                                                        }

                                                                                                                                                                                                                                                                                                                                                                          ServiceMetaDataResp represents response for service metadata.

                                                                                                                                                                                                                                                                                                                                                                          type UpdateHostParam

                                                                                                                                                                                                                                                                                                                                                                          type UpdateHostParam CreateHostParam

                                                                                                                                                                                                                                                                                                                                                                            UpdateHostParam parameters for UpdateHost

                                                                                                                                                                                                                                                                                                                                                                            type User

                                                                                                                                                                                                                                                                                                                                                                            type User struct {
                                                                                                                                                                                                                                                                                                                                                                            	ID         string `json:"id,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            	ScreenName string `json:"screenName,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            	Email      string `json:"email,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            	Authority  string `json:"authority,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                            	IsInRegistrationProcess bool     `json:"isInRegistrationProcess,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            	IsMFAEnabled            bool     `json:"isMFAEnabled,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            	AuthenticationMethods   []string `json:"authenticationMethods,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            	JoinedAt                int64    `json:"joinedAt,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                            }

                                                                                                                                                                                                                                                                                                                                                                              User information

                                                                                                                                                                                                                                                                                                                                                                              type Widget

                                                                                                                                                                                                                                                                                                                                                                              type Widget struct {
                                                                                                                                                                                                                                                                                                                                                                              	Type     string `json:"type"`
                                                                                                                                                                                                                                                                                                                                                                              	Title    string `json:"title"`
                                                                                                                                                                                                                                                                                                                                                                              	Layout   Layout `json:"layout"`
                                                                                                                                                                                                                                                                                                                                                                              	Metric   Metric `json:"metric,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                              	Graph    Graph  `json:"graph,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                              	Range    Range  `json:"range,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                              	Markdown string `json:"markdown,omitempty"`
                                                                                                                                                                                                                                                                                                                                                                              }

                                                                                                                                                                                                                                                                                                                                                                                Widget information