Subscribed unsubscribe Subscribe Subscribe

Installing mackerel-agent as an RPM package

Using yum

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

curl -fsSL https://mackerel.io/assets/files/scripts/setup-yum.sh | sh

Once that's done, we can use yum to install:

sudo yum install -y mackerel-agent

You can also use yum to update Mackerel-agent:

sudo yum update -y mackerel-agent

Using rpm

To install mackerel-agent with rpm run the following command:

sudo rpm -ivh https://mackerel.io/file/agent/rpm/mackerel-agent-latest.noarch.rpm

To update Mackerel-agent with rpm run the following command:

sudo rpm -Uvh https://mackerel.io/file/agent/rpm/mackerel-agent-latest.noarch.rpm

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 refer to mackerel-agent specifications.

Using configuration files the following can be done:

Launching mackerel-agent

To launch Mackerel-agent run the following command:

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 run one of the following commands:

If the agent was installed with yum:

sudo yum erase mackerel-agent

If the agent was installed with rpm:

sudo rpm -e mackerel-agent

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

Installing the KCPS edition of mackerel-agent as an RPM package

Using yum

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

curl -fsSL http://198.18.0.16/file/setup-yum-kcps.sh | sh

Once that’s done, we can use yum to install:

sudo yum install -y mackerel-agent-kcps

You can also use yum to update Mackerel-agent:

sudo yum update -y mackerel-agent-kcps

Using rpm

To install mackerel-agent with rpm run the following command:

sudo rpm -ivh http://198.18.0.16/file/rpm/mackerel-agent-kcps-latest.noarch.rpm

To update Mackerel-agent with rpm run the following command:

sudo rpm -Uvh http://198.18.0.16/file/rpm/mackerel-agent-kcps-latest.noarch.rpm

Editing configuration files

Edit the file /etc/mackerel-agent-kcps/mackerel-agent-kcps.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 refer to mackerel-agent specifications.

Using configuration files the following can be done:

Launching mackerel-agent

To launch Mackerel-agent run the following command:

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

You can find the log file here: /var/log/mackerel-agent-kcps.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 run one of the following commands:

If the agent was installed with yum:

sudo yum erase mackerel-agent-kcps

If the agent was installed with rpm:

sudo rpm -e mackerel-agent-kcps

Lastly, please do not forget to delete the file /var/lib/mackerel-agent-kcps/id which by default contains the host ID.

-

If you have any questions please contact our support team at support@mackerel.io