Skip to main content

Agent Installation

Now let's setup our monitoring agent.

Glouton is a monitoring agent that makes observing your infrastructure easy. It provides a lot of features:

  • gathers system metrics from Prometheus node_exporter
  • automatically discovers your services to retrieve relevant metrics.
  • Kubernetes native: create metrics and checks for pods

Deploy Glouton with the install script​

To install the agent on your system using the install script please follow these instructions.

tip

You can ignore the mentions of account id or registration key and instead use this command:

wget -qO- "https://get.bleemeo.com?community=1&mqttHost=<YOUR_MQTT_HOST>&mqttPort=<YOUR_MQTT_PORT>" | sh

parameters:

  • community: set to 1 to disable the Bleemeo cloud part
  • mqttHost: the address of your MQTT server
  • mqttPort: the port of your MQTT server

Deploy Glouton with Docker​

There is a docker compose available to quickly deploy the agent. Simply download the content of the folder and run:

docker compose up -d
info

The docker installation is the easiest way to install the agent. For testing and most use cases it will perfectly fit your needs. However, if you need to run some specific checks that need to be run on the host we recommend you to use the other installation methods.

We need to configure the agent to send its metrics to NATS. We assume here that NATS is running on our monitoring server which has the IP 192.168.1.101, as in the diagram below.

Network Network

The following command will create the configuration file glouton.conf to tell the agent the address of our MQTT server and the metrics it should send.

# This should be the address where the NATS MQTT server is running
MONITORING_SERVER_ADDRESS="192.168.1.101"

cat > glouton.conf << EOF
bleemeo:
enable: false

mqtt:
enable: true
hosts:
- $MONITORING_SERVER_ADDRESS
port: 1883

# Allow node exporter metrics.
metric:
allow_metrics:
- node_*
EOF

Now we can run Glouton:

docker run -d --name="glouton" --restart unless-stopped \
-v $(pwd)/glouton.conf:/etc/glouton/conf.d/90-local.conf:ro \
-v /var/lib/glouton:/var/lib/glouton -v /var/run/docker.sock:/var/run/docker.sock \
-v /:/hostroot:ro --pid=host --net=host \
--cap-add SYS_PTRACE --cap-add SYS_ADMIN bleemeo/bleemeo-agent

We can check the logs to make sure everything is working:

docker logs -f glouton

You should see the message Open Source MQTT connection established.

To sum up what we did, we set up a working Time Series Database to store our metrics, we started a MQTT server, SquirrelDB Ingestor and a monitoring agent. The agent sends its metrics to MQTT, SquirrelDB Ingestor reads them and write them in SquirrelDB.

Other Glouton deployment methods​

Firstly, we should create a config file /etc/glouton/conf.d/80-community-edition.conf used to tell the agent the address of our MQTT server and the metrics it should send. You can do this with the following commands:

info

Replace the MQTT host address (192.168.1.101) with the one that fit your environment.

sudo mkdir -p /etc/glouton/conf.d
sudo tee /etc/glouton/conf.d/80-community-edition.conf << EOF
# We disable the Bleemeo part
bleemeo:
enable: false

# We tell to glouton to connect to our mqtt instance(s)
mqtt:
enable: true
hosts:
- 192.168.1.101
port: 1883

# Allow node exporter metrics.
metric:
allow_metrics:
- node_*
EOF
sudo chmod 640 /etc/glouton/conf.d/80-community-edition.conf

And follow the Bleemeo installation guide to install the agent on your system. Remember to ignore the mentions of account id or registration key.

Glouton configuration​

For further configuration, please follow the Bleemeo one and ignore all the mentions of account id or registration key.