Skip to content

Status is wrong when Slave_IO_Running is connecting #22

Open
@lamhaison

Description

@lamhaison

I have a situation like When Slave_IO_Running is connecting (fail because don't have permission to get binlog from mysql master server). I think it is a critical replication case. But when collectd agent still send every things ok. Because in your code You only consider condition Slave_SQL_Running is yes in order that you can send slave_running equal 1. I think we need consider both of condition are Slave_IO_Running and Slave_SQL_Running to set value of slave_running metric.
Thanks, hope you to see your reply soon.

I think the below code is more the exactly

    status['slave_running'] = 1 if slave_row['Slave_SQL_Running'] == 'Yes' \
                                                  and slave_row['Slave_IO_Running'] == 'Yes' else 0
    status['slave_stopped'] = 1 if slave_row['Slave_SQL_Running'] != 'Yes' \
                                                  or slave_row['Slave_IO_Running'] != 'Yes' else 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions