Mackerel API Client in Go (under development version)
Go Makefile
Latest commit b0cd137 Dec 2, 2016 @itchyny itchyny committed on GitHub Merge pull request #38 from yoheimuta/accept-monitor-threshold-value-0
[mackerelio/mkr] Accept a value of 0 for warning and critical
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml upgrade Go version to 1.6 Mar 28, 2016
LICENSE Add Apache v2 license Dec 7, 2014
Makefile
README.md
alerts.go
alerts_test.go
dashboards.go typo May 23, 2016
dashboards_test.go
graph_defs.go
graph_defs_test.go
hosts.go we can retrieve the hosts list from /api/v0/hosts Jul 8, 2016
hosts_test.go
mackerel.go
mackerel_test.go Prefer example.com Oct 18, 2016
metrics.go
metrics_test.go gofmt -s -w *.go Jun 26, 2016
monitors.go
monitors_test.go Accept a value of 0 as warning and critical. Dec 2, 2016
org.go
org_test.go add Org Apr 9, 2016

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.