Subscribed unsubscribe Subscribe Subscribe

Installing mackerel-agent as a deb package

KCPS edition Mackerel users, click here.

Using apt-get

First things first, we need to register the Mackerel apt repository:

curl -fsSL | sh

Once that's done, we can use apt-get to install:

sudo apt-get install mackerel-agent

You can also use apt-get to update mackerel-agent:

sudo apt-get upgrade mackerel-agent

Using dpkg

Download the deb file:

curl -LO

Use dpkg to install:

sudo dpkg -i mackerel-agent_latest.all.deb

Editing configuration files

Edit the file /etc/mackerel-agent/mackerel-agent.conf and set the API key.

apikey = "<YOUR_API_KEY>"

You can obtain the API key from your organization's page. Keep in mind this key is used to identify your organization, so we strongly advise not sharing it with others.

For more information, please visit mackerel-agent specifications.

Using configuration files the following can be realized:

Launching mackerel-agent

To start mackerel-agent:

sudo /etc/init.d/mackerel-agent start

You can find the log file here: /var/log/mackerel-agent.log.

Once the agent starts functioning properly, the host will be registered with Mackerel, which you can confirm by checking the Dashboard.

Uninstalling mackerel-agent

To uninstall Mackerel-agent implement one of the following commands:

If the agent was installed with apt-get:

sudo apt-get remove mackerel-agent

If the agent was installed with dpkg:

sudo dpkg -r mackerel-agent

Then, do not forget to delete the file /var/lib/mackerel-agent/id (by default) which contains the host ID.

Installing the KCPS edition of mackerel-agent as a deb package

Deb packages are not supported in KCPS editions of Mackerel.