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

Status is wrong when Slave_IO_Running is connecting #22

Open
lamhaison opened this issue Jul 18, 2017 · 0 comments
Open

Status is wrong when Slave_IO_Running is connecting #22

lamhaison opened this issue Jul 18, 2017 · 0 comments

Comments

@lamhaison
Copy link

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
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