Server monitoring

Getting started with the Amon agent

The Amon Agent is a small piece of software that runs on your hosts. Its job is to collect metrics and bring them to Amon so that you can do something useful with your monitoring and performance data.

Installing the agent

Amon has a single binary collector agent, written in Go.

By default you can install it an all your servers with one line, displayed on your Servers page

API_KEY=unique_api_key bash -c "$(curl -L http://youramoninstance/install/)"

This will install the APT/Yum packages for the Amon Agent and will prompt you for your password.

By default the script installs:

  1. The Amon agent to /opt/amonagent/amonagent and /usr/bin/amonagent (You can call amonagent from anywhere)

Agent configuration

The Amon agent has a single configuration file , which you can find at /etc/opt/amonagent/amonagent.conf. The configuration file is in JSON, so after editing it, please check if the syntax is valid at:

The configuration file has the following parameters:

  • api_key - valid API key.
  • amon_instance - The IP Address where your Amon instance is running. This is where the agent will send data.
  • interval - (Optional) How often to gather metrics. In seconds, defaults to 60 seconds.

Below you can see a complete configuration file with all the options:

"api_key": "your-api-key",
"amon_instance": "https://youramoninstance",
"interval": 60

Running the agent

  • On sysv systems, the amonagent daemon can be controlled via service amonagent [action]
  • On systemd systems (such as Ubuntu 15+), the amonagent daemon can be controlled via systemctl [action] amonagent

Testing the agent

The agent executable is located in /opt/amonagent/amonagent(/usr/bin/amonagent) and accepts the following commands:

  • $ amonagent -test - Collects all system metrics and displays the results in the terminal.

Manually installing the agent

If the automatic installer fails, you can easily install the agent manually by pasting the following commands in the terminal:

# On Debian/Ubuntu
sudo apt-key adv --keyserver --recv AD53961F
echo "deb amon contrib" | sudo tee /etc/apt/sources.list.d/amon.list
sudo apt-get update
sudo apt-get install amonagent
echo '{
	"api_key":"your api-key",
	"amon_instance": "http://your amon instance IP"
}' > /etc/opt/amonagent/amonagent.conf

sudo service amonagent restart (or) sudo systemctl restart amonagent

# On Red Hat/Fedora/CentOS
echo -e '[amon]\nname = Amon.\nbaseurl =\nenabled=1\ngpgcheck=0\npriority=1' > /etc/yum.repos.d/amon.repo
sudo yum -y install amonagent

echo '{
	"api_key":"your api-key",
	"amon_instance": "http://your amon instance IP"
}' > /etc/opt/amonagent/amonagent.conf

sudo service amonagent restart (or) sudo systemctl restart amonagent

Issues getting the Agent installed

If you encountered an issue during the Agent installation please reach out to with the contents of amonagent-install.log

Issues getting the Agent reporting

If you get the Agent installed but you are not seeing any data in Amon, you can troubleshoot in the following manner.
First, run the status command - sudo service amonagent status (or) sudo systemctl status amonagent.

If the agent is running, check if the Amon API is accessible from your server:

$ amonagent -test

You should also check the logs: /var/log/amonagent.log. Errors in the logs may also reveal the cause of any issues.

If non of these steps solve the problem, please send the logs as attachment to support[at]

Installing on Windows

New in Amon 3.6.8

The Amon agent for Windows supports Windows Server 2008R2+, Windows Server 2012 and in general - anything newer than Windows 7.

To install, download the latest release from Github, run the installer and paste the server key and the URL pointing to your Amon instance

The Amon agent for Windows has a single config file in C:\Program Files(x86)\AmonAgent -> amon-agent.ini with 2 values:

  • amon_url - The URL pointing to your Amon instance
  • server_key - the secret key generated by Amon for your server.

After changing the config values, restart the amon-agent process from services