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

Error connecting when use socket #14

Closed
HectorValencia opened this issue Jan 2, 2023 · 3 comments · Fixed by #15
Closed

Error connecting when use socket #14

HectorValencia opened this issue Jan 2, 2023 · 3 comments · Fixed by #15
Assignees
Labels

Comments

@HectorValencia
Copy link

To success conection i had to add "passoword" variable in "ConnectionResult"; in the socket section. Like this:

ConnectionResult=$(mysql ${optfile} ${socket} ${user} -p"${password}" -e "SHOW SLAVE ${connection} STATUS ${channel}\G" 2>&1)

@Napsty
Copy link
Owner

Napsty commented Jan 3, 2023

Can you show how you used the plugin on the cmd line please?

@HectorValencia
Copy link
Author

/usr/local/nagios/libexec/check_mysql_slavestatus.sh -Hlocalhost -unagios -p"password" -S"/database/mysql/mysql.sock" -C channel-db -w 900 -c 1800

@Napsty
Copy link
Owner

Napsty commented Jan 3, 2023

Thanks for showing the full command. You must either use -H or -S to connect to the MySQL server.
See documentation (https://www.claudiokuenzler.com/monitoring-plugins/check_mysql_slavestatus.php):

2: Unless defined in the options file, a host/ip address to connect to (-H) or a local socket (-S) is required.
3: When using -H or -S to connect to MySQL, credentials are required.

But the plugin should inform about this. Will do a code change for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants