mackerel-agent is an agent program to post your hosts' metrics to mackerel.io.
Go Shell Makefile Other
Clone or download
itchyny Merge pull request #515 from mackerelio/refactor-host-meta
[nit] Refactoring: spec generator returns structs of HostMeta of mackerel-client-go
Latest commit a9edcf6 Aug 9, 2018
Permalink
Failed to load latest commit information.
.circleci stop installing ruby on CircleCI Aug 1, 2018
_example/metrics-plugins change implementation of sample plugin from Ruby to Go Aug 1, 2018
_tools Update Mackerel::ReleaseUtils to check git workspace is clean Sep 5, 2017
agent nit: use variable Feb 1, 2018
checks introduce cmdutil and remove util.RunCommand Jan 7, 2018
cmdutil Merge remote-tracking branch 'origin/master' into cmd-context Feb 14, 2018
command fix commands tests Aug 9, 2018
config remove ConnectionConfig Aug 7, 2018
docs/images Update image May 21, 2014
mackerel fix api tests Aug 9, 2018
metadata Fix tests Oct 16, 2017
metrics change implementation of sample plugin from Ruby to Go Aug 1, 2018
packaging ready for next release and update changelogs. version: 0.56.0 Jul 25, 2018
pidfile use golib/logging Jun 23, 2017
spec fix spec tests Aug 9, 2018
supervisor use golib/logging Jun 23, 2017
util skip /Volumes/ directory while collecting df values on darwin Mar 4, 2018
wix Merge pull request #506 from mattn/fix-start-order Jul 25, 2018
.gitignore add config.yml Jul 11, 2018
.travis.yml build with Go 1.10 Jun 11, 2018
CHANGELOG.md ready for next release and update changelogs. version: 0.56.0 Jul 25, 2018
CONTRIBUTING.md initial commit May 16, 2014
LICENSE remove license appendix Nov 22, 2017
LICENSE.rtf Added GUI installer for windows Feb 12, 2015
Makefile ready for next release and update changelogs. version: 0.56.0 Jul 25, 2018
README.md fix typo Apr 6, 2018
appveyor.yml build with Go 1.10 Jun 11, 2018
build-k.bat update build*.bat Jun 9, 2017
build.bat update build*.bat Jun 9, 2017
circle.yml restore circle.yml Jan 5, 2018
commands.go pass returned value from command.RunOnce so that `mackerel-agent once… Jan 10, 2018
commands_gen.go make convention Dec 31, 2017
commands_test.go add commands_test.go Feb 26, 2016
do_init.go Uncapitalize error messages Nov 16, 2016
do_init_test.go fix tests Nov 16, 2016
init_unix.go make PATH not to end with `:`. May 21, 2018
init_windows.go prefer ContainsRune Jun 12, 2018
mackerel-agent.sample.conf remove /usr/local/bin from conf Jun 21, 2016
main.go use golib/logging Jun 23, 2017
main_test.go Use new API BaseURL Oct 2, 2017
start_test.go fix error check in TestStart of start_test.go Jan 8, 2018
version.go ready for next release and update changelogs. version: 0.56.0 Jul 25, 2018

README.md

mackerel-agent

agent-si

mackerel-agent is a client software for Mackerel. Mackerel is an online visualization and monitoring service for servers.

Once mackerel-agent is installed, it runs the following tasks on the installed host in foreground:

  • register your hosts to Mackerel
  • collect specs and metrics of those hosts and post them to Mackerel

Collected information will be visualized on Mackerel.

PREREQUISITES

You have to create an organization on Mackerel at first. After that, specify apikey value in mackerel-agent.conf with the following command.

% mackerel-agent init -apikey {{YOUR_APIKEY}}

SYNOPSIS

Build and Run the mackerel-agent.

% make build
% make run

You can run the following commands instead of using make.

% go get -d github.com/mackerelio/mackerel-agent
% go build -o build/mackerel-agent \
  -ldflags="\
    -X github.com/mackerelio/mackerel-agent/version.GITCOMMIT `git rev-parse --short HEAD` \
    -X github.com/mackerelio/mackerel-agent/version.VERSION   `git describe --tags --abbrev=0 | sed 's/^v//' | sed 's/\+.*$$//'` " \
  github.com/mackerelio/mackerel-agent
./build/mackerel-agent -conf=mackerel-agent.conf

On Windows

Use .bat files instead of make commands.

% build.bat

Test

Test mackerel-agent to confirm it's working properly.

The agent will collect information about the host on which it has been installed.

% make test

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.