Step-by-Step Guide to Installing Prometheus, Configuring MySQL Exporter, and Setting Up Grafana with Zabbix Plugin
This tutorial walks through downloading and extracting Prometheus, configuring a MySQL exporter, launching Prometheus, installing Grafana, adding a Prometheus data source, installing the Zabbix plugin, and restarting services to build a complete monitoring stack on Linux.
This guide starts by listing the Prometheus and Alertmanager tarballs present in the /soft directory and shows how to extract the Prometheus package:
tar -zxvf prometheus-2.27.1.linux-amd64.tar.gz
The extracted directory is moved to /usr/local/prometheus and the service is started in the background:
mv prometheus-2.27.1.linux-amd64 /usr/local/prometheus
nohup ./prometheus --config.file=prometheus.yml &
Next, the mysqld_exporter job is added to prometheus.yml with the following configuration:
- job_name: 'mysql' static_configs: - targets: ['localhost:9104'] labels: instance: mysql
After Prometheus is running, Grafana is installed and a Prometheus data source is created through the Grafana UI: navigate to Configuration → Data Sources → Add data source**, select **Prometheus**, set the URL (e.g., http://localhost:9090 ), and save.
To extend Grafana with Zabbix monitoring, the Zabbix plugin is installed via the Grafana CLI:
grafana-cli plugins install alexanderzobnin-zabbix-app
The plugin is placed in the appropriate plugins directory (e.g., /var/lib/grafana/plugins ) and Grafana is restarted:
service grafana-server restart
Finally, the tutorial shows how to adjust Grafana’s defaults.ini (e.g., setting http_port = 80 ) and provides screenshots of adding CPU load graphs and other dashboards, completing a functional monitoring stack that combines Prometheus, Grafana, and Zabbix.
Practical DevOps Architecture
Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.