Installing mackerel-agent in binary

KCPS edition Mackerel users, click here.

Download the archive

Download mackerel-agent-latest.tar.gz.

curl -LO https://mackerel.io/file/agent/tgz/mackerel-agent-latest.tar.gz
tar xvzf mackerel-agent-latest.tar.gz
cd mackerel-agent

In the archive, mackerel-agent is the binary that will execute in Linux.

Describe the settings file

Edit mackerel-agent.conf to configure the API key.

apikey = "<YOUR_API_KEY>"

You can see your API key in your organization’s page. This API key is how your organization is identified, so please be careful not to share this information with anyone outside of your organization.

For more information please refer to mackerel-agent specifications.

Using the settings file the following things can be done:

Launching the agent

Designate the settings file you have edited and launch the mackerel-agent:

./mackerel-agent --conf=./mackerel-agent.conf

The agent runs in the foreground so please adjust services to conform with the environment you are using.

Uninstall the agent

To uninstall mackerel-agent, delete the binary file that you downloaded.

Afterwards, the file which recorded the host ID will remain in /var/lib/mackerel-agent/id by default, so please delete this file as well.

Installing the KCPS edition of mackerel-agent in binary

Deb packages are not supported in KCPS editions of Mackerel.