Exporters Installation

Step 1: Install Exporters

General Steps

1. Clone the Repository

Clone the repository containing automation scripts:

git clone https://github.com/DevOps-Model/DevOps-Automation-Scripts.git

2. Navigate to the Directory

cd DevOps-Automation-Scripts

3. Run the Automation Script

python3 MonitoringSetup.py monitoring.conf node_exporter mysql

Exporter-Specific Installation

ScyllaDB Exporter

The ScyllaDB exporter is included as part of the ScyllaDB stack installation script.

Redpanda Exporter

The Redpanda exporter is set up during the Redpanda stack installation.

Tomcat Exporter

  1. Create the following directory:

    mkdir -p /opt/tomcat_exporter
    
  2. Download the JMX Prometheus Java Agent

    wget https://repo.maven.apache.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/1.0.1/jmx_prometheus_javaagent-1.0.1.jar -O /opt/tomcat_exporter/jmx_prometheus_javaagent-1.0.1.jar
    
  3. Create the Configuration File

    1. Open a new configuration file:
      vi /opt/tomcat_exporter/config.yaml
      
    2. Add the following content:
      rules:
      - pattern: ".*"
      
    3. Change permissions and assign ownership to the Tomcat user:
      chmod 755 /opt/tomcat_exporter
      chown -R tomcat:tomcat /opt/tomcat_exporter
      
  4. Configure the Tomcat Service

    Integrate the exporter with the Tomcat service:

    1. Open the Tomcat service file:
      vi /etc/systemd/system/tomcat-pssb.service
      
    2. Update the CATALINA_OPTS with the following line:
      Environment="CATALINA_OPTS=-javaagent:/opt/tomcat_exporter/jmx_prometheus_javaagent-1.0.1.jar=9115:/opt/tomcat_exporter/config.yaml"
      
  5. Reload and Restart the Service

    Apply the changes to the Tomcat service:

    1. Reload the systemd daemon:
      systemctl daemon-reload
      
    2. Restart the Tomcat service:
      systemctl restart tomcat-pssb
      
  6. Verify the Tomcat Exporter

    Access the metrics endpoint to ensure the Tomcat Exporter is running correctly:

    http://<server_ip>:9115/metrics
    

    Replace <server_ip> with the server’s IP address.

GlusterFS Exporter

Use the following script to install and configure the GlusterFS exporter:

#!/bin/bash
GEXPORTER="/usr/sbin/gluster-exporter"
ufw allow 9106/tcp
ufw reload

wget https://github.com/nilpntr/gluster-exporter/releases/download/1.0.1/gluster_exporter-1.0.1.linux-amd64
mv gluster_exporter-1.0.1.linux-amd64 /usr/sbin/gluster-exporter
chmod u+x /usr/sbin/gluster-exporter

# Create a systemd service file

touch /etc/systemd/system/gluster-exporter.service
cat << 'EOF' > /etc/systemd/system/gluster-exporter.service
[Unit]
Description=Gluster Exporter on :9106
After=network.target

[Service]
Restart=on-failure
ExecStart=/usr/sbin/gluster-exporter --profile --quota

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable gluster-exporter
systemctl start gluster-exporter

Step 2: Open Required Ports

Ensure the necessary ports are accessible on each node for the respective exporters:

Exporter Port
MySQL Exporter 9104
ScyllaDB Exporter 9180
Node Exporter 9200
Redpanda Exporter 9644
Tomcat Exporter 9115
GlusterFS Exporter 9106

Run the following commands to allow the ports:

sudo ufw allow 9104
sudo ufw allow 9180
sudo ufw allow 9200
sudo ufw allow 9644
sudo ufw allow 9115
sudo ufw allow 9106