Mackerel API Client in Go
Go Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
Makefile
README.md
alerts.go
alerts_test.go
checks.go
checks_test.go
dashboards.go
dashboards_test.go
error.go
graph_annotation.go
graph_annotation_test.go
graph_defs.go
graph_defs_test.go
host_metadata.go
host_metadata_test.go
hosts.go
hosts_test.go
mackerel.go
mackerel_test.go
metrics.go
metrics_test.go
monitors.go
monitors_test.go
org.go
org_test.go
services.go
services_test.go

README.md

mackerel-client-go

Build Status Coverage Status GoDoc

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

Usage

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

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

err := client.PostServiceMetricValues("My-Service", []*mkr.MetricValue{
        &mkr.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.