Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.


Build Status Coverage Status GoDoc

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


import ""
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{
              Name:  "proxy.access_log.latency",
              Time:  123456789,
              Value: 500,


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


  1. 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


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

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.

You can’t perform that action at this time.