What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

MySql Slave status

Votes:

0

I have been trying out PRTG for a little bit now, and I think this product will be good for us, but we need to get MySQL sensors working to decide on if we purchase.

I need to monitor MySql slave status on a few different servers running ubuntu with ZFS. Keep in mind i am not the Linux admin here, but do have an account to run queries on the DB.

I have found an older post with a script doing many things, but couldn't get it working. All i need to know how many seconds behind the slave is, whether it's zero seconds behind or any other value.

We currently run a batch file from a windows box with the following C:\mysql\bin\mysqlsh -h server01 --sql -uxxxxxxx -pzzzzzzz -e "show slave status\G".

Could this be run from the MySql v2 sensor? What other options would i need when setting up sensor.

Thanks for the help!

-Evan

linux-os mysql mysql-v2-sensor

Created on Jun 18, 2019 3:14:13 PM



1 Reply

Votes:

0

Hi EA,

The shell just connects to your MySQL database and executes the command show slave status. The SQLv2 Sensors send SQL queries to the target database, only numerical values are accepted by the sensor. So if you write your own SQL script file with SQl query, this could be integrated via this sensor. Here is a link to the Configuration Guide for SQLv2 sensors

Here is a link to a page with a lot of SQL examples.

If a string is returned by the query, you need to translate it into an integer, as described in this article with CASE conditions.


Kind regards,
Felix Saure, Tech Support Team

Created on Jun 19, 2019 9:26:31 AM by  Felix Saure [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.