Linux Agent Install
Thomas Steele avatar
Written by Thomas Steele
Updated over a week ago

Installing the Linux agent enables Blue Matador to collect and analyze server metrics on any 64-bit Linux-based operating system. After installation, the following events will be detected on your servers without configuring any thresholds:

  • CPU Usage (load, iowait, steal, system)

  • Bytes Sent & Received

  • Dropped Packets

  • Network Errors

  • Disk Latency, Reads, and Writes

  • Disk Inodes & Space

  • Open Files & Threads Ulimit

  • Swapping

  • Server Time Drift

  • Agent Disconnects

Requirements

Installing the Blue Matador Linux Agent requires either an active trial or paid account. Contact sales to get started.  You will also need to meet the following requirements:

  • 64-bit Linux installed on the server

  • Root (sudo) access to run commands on the server

  • The server must have egress (outbound) internet access to download and install packages

Installation Process

 1. Log in to the app and navigate to the Integrations page via Setup > Integrations

2. Expand the Linux installation dialog by clicking on the Install button on the Linux tile 

3.  Specify the environment your agent will run in. This will help you identify servers in our system. 

4. Connect to your server via SSH, then copy and paste the one-line install command into the terminal.  The command will have your Account ID as well as your default Blue Matador API key for authenticating your server, as well as some additional info to help our agent run.

5. Check the output of the command to make sure the installation completed successfully. You should see something like this:

6. Repeat steps 3-5 on as many servers as needed. Afterwards, verify your installation by checking the number of agents connected against the number of servers you ran the command on.

Troubleshooting

 If you are unable to verify that the agent is connected, first check out the agent log on the server. The default logging level only shows FATAL and ERROR level log messages, so it is normal for there to be no log messages if the agent is running properly.

tail -n 100 -f /var/log/bluematador-agent.log

If there are messages in the log that indicate an issue on Blue Matador’s side, try restarting the agent, then checking the Atlas page to see if that server appears. 

sudo service bluematador-agent restart 

Or

sudo systemctl restart bluematador-agent 

Or

sudo /etc/init.d/bluematador-agent restart 

Verbose Logging

If you are still having issues getting the agent to connect, you can increase the log level to prepare logs to submit to your account manager for support.

On systems using systemd, edit the /etc/systemd/system/bluematador-agent.service file and replace the following line

ExecStart=/usr/sbin/bluematador-agent -log /var/log/bluematador-agent.log -verbose 2 -config /etc/bluematador-agent/config.ini -datadir /var/lib/bluematador-agent 

With

ExecStart=/usr/sbin/bluematador-agent -log /var/log/bluematador-agent.log -verbose 5 -config /etc/bluematador-agent/config.ini -datadir /var/lib/bluematador-agent

Then restart the agent

sudo systemctl daemon-reload && sudo systemctl restart bluematador-agent 

 On upstart-based systems, edit the /etc/init.d/bluematador-agent file and replace all instances of -verbose "${VERBOSITY}" with -verbose  5 then restart the agent.

sudo /etc/init.d/bluematador-agent restart 

Config File

If you see a log message about the config file format, it is possible that the config file located at /etc/bluematador-agent/config.ini has been improperly edited. The agent may continue working using a previous valid configuration if it had one, otherwise the agent will fail to connect to the Blue Matador servers. This issue is most easily solved by re-running the one-line install script which will overwrite the config file.

Network Issues

In order for the agent to connect to Blue Matador’s servers, ensure it has outgoing network connectivity to app.bluematador.com:443 and bluematador-flint-modules.s3.amazonaws.com:443.

If you are running the agent behind a proxy, follow this guide to set the HTTP_PROXY and HTTPS_PROXY environment variables in the systemd config located at /etc/systemd/system/bluematdor-agent.service, then restart the agent

sudo systemctl daemon-reload && sudo systemctl restart bluematador-agent 

Proxy Setup

You may configure the Linux agent to connect to Blue Matador's servers via an HTTP proxy. To do this, add the following lines to your config file located at /etc/bluematador-agent/config.ini, replacing the example http proxy endpoint with your proxy's endpoint.

http_proxy = http://myproxy.example.co:3128
https_proxy = http://myproxy.example.co:3128

 After updating the config file, make sure your proxy has whitelisted traffic to app.bluematador.com:443andbluematador-flint-modules.s3.amazonaws.com:443, then restart the agent.

sudo systemctl daemon-reload && sudo systemctl restart bluematador-agent 

Uninstalling the Agent

If you no longer wish for the agent to automatically monitor your Linux server, it can be uninstalled completely with the following steps:

1. Stop the agent daemon using one of the following commands:

sudo service bluematador-agent stop 
sudo systemctl 
stop bluematador-agent sudo /etc/init.d/bluematador-agent stop 

2. Remove the agent config:

sudo rm -rf /etc/bluematador-agent 

3. Remove the local agent data:

sudo rm -rf /var/lib/bluematador-agent 

4. Uninstall the bluematador-agent package using your package manager

sudo apt-get remove bluematador-agent 
sudo yum remove bluematador-agent 
sudo zypper rm bluematador-agent

Frequently Asked Questions

Does the Linux agent run on 32-bit Linux? The Blue Matador Linux agent does not currently support 32-bit architectures.

Do I need to install the Linux agent on every server? The linux agent can and should be installed on any servers that you need automatic server monitoring on. This includes production servers, utility servers, databases, and dev servers. The agent only collects metrics from the servers it is running on.

Should I install the Linux agent if I am using the AWS integration with EC2 Instances? While the AWS integration collects many EC2 metrics, the Linux agent still provides additional value . Some server metrics such as disk usage, process ulimits, and server time drift cannot be collected from AWS.

Should I install the Linux agent on a Kubernetes node? The preferred method of monitoring Kubernetes is to install the Blue Matador agent as a DaemonSet in your Kubernetes cluster. Installing the Linux agent directly on a node will not provide any Kubernetes events, but will still provide the Linux server events. Using both installations simultaneously can result in duplicate events.

Did this answer your question?