Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slave monitoring for alerting purpose #818

Open
Shubham1406220 opened this issue Feb 16, 2024 · 0 comments
Open

Slave monitoring for alerting purpose #818

Shubham1406220 opened this issue Feb 16, 2024 · 0 comments

Comments

@Shubham1406220
Copy link

Shubham1406220 commented Feb 16, 2024

we have setup the exporter for monitoring master and slave. We are scraping only master nodes of mysql. What query to set foe getting the slave status and whether replication is working fine or not.

systemd file:

[Unit]
Description=Mysqld Exporter
After=network.target

[Service]
Type=simple
User=mysqld_exporter
Group=mysqld_exporter
Restart=on-failure
ExecStart=/usr/local/bin/mysqld_exporter --config.my-cnf="/etc/mysqld_exporter/mysql.cnf" --collect.slave_hosts --collect.info_schema.processlist --collect.info_schema.replica_host --collect.info_schema.tables.databases="*"  --collect.perf_schema.memory_events --collect.perf_schema.tableiowaits --collect.slave_status

[Install]

  - job_name: mysql 
    static_configs:
      - targets:
        - x.x.x.x3306
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: localhost:9104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant