Documentation ¶
Index ¶
- Variables
- func IdFilePath(root string) string
- func LoadHostId(root string) (string, error)
- func SaveHostId(root string, id string) error
- type API
- func (api *API) CreateHost(name string, meta map[string]interface{}, interfaces []map[string]interface{}, ...) (string, error)
- func (api *API) Do(req *http.Request) (resp *http.Response, err error)
- func (api *API) FindHost(id string) (*Host, error)
- func (api *API) PostMetricsValues(metricsValues [](*CreatingMetricsValue)) error
- func (api *API) UpdateHost(hostId string, name string, meta map[string]interface{}, ...) error
- type Config
- type CreatingMetricsValue
- type Host
- type Metrics
- type PluginConfig
- type PluginConfigs
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ Apibase: "https://mackerel.io", Root: "/var/lib/mackerel-agent", Pidfile: "/var/run/mackerel-agent.pid", Roles: []string{}, Verbose: false, }
Functions ¶
func IdFilePath ¶
func LoadHostId ¶
func SaveHostId ¶
Types ¶
type API ¶
func (*API) CreateHost ¶
func (*API) PostMetricsValues ¶
func (api *API) PostMetricsValues(metricsValues [](*CreatingMetricsValue)) error
type Config ¶
type Config struct { Apibase string Apikey string Root string Pidfile string Roles []string Verbose bool Plugin map[string]PluginConfigs DeprecatedSensu map[string]PluginConfigs `toml:"sensu"` // DEPRECATED this is for backward compatibility }
func LoadConfig ¶
func LoadConfigFile ¶
type CreatingMetricsValue ¶
type PluginConfig ¶
type PluginConfig struct {
Command string
}
type PluginConfigs ¶
type PluginConfigs map[string]PluginConfig
Click to show internal directories.
Click to hide internal directories.