# Pt-heartbeat monitor

**URL:** <https://forums.percona.com/t/pt-heartbeat-monitor/3526>\
**Category:** Percona Toolkit\
**Created:** [June 3, 2014, 11:48am UTC](https://forums.percona.com/t/pt-heartbeat-monitor/3526 "2014-06-03T11:48:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![offline](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/offline/32/1013_2.png) [@offline](https://forums.percona.com/u/offline)\
**Post date:** [June 3, 2014, 11:48am UTC](https://forums.percona.com/t/pt-heartbeat-monitor/3526/1 "2014-06-03T11:48:38Z")

</div>

If I am wanting to see if the pt-heartbeat monitor is running what is the best way to find out? Should i do a mysql query or just look at the process list?

I need to setup nagios to make sure it is activated on boot.

Thanks,

Chris Edwards

---

<div class="post-metadata">

**Author:** ![johnsmith34](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@johnsmith34](https://forums.percona.com/u/johnsmith34)\
**Post date:** [November 21, 2023, 10:31am UTC](https://forums.percona.com/t/pt-heartbeat-monitor/3526/2 "2023-11-21T10:31:42Z")

</div>

To determine whether the pt-heartbeat monitor is running, you can either check the process list or execute a MySQL query. Both methods are effective, but the choice between them depends on your specific needs and preferences.

**Checking the Process List**

Checking the process list is a quick and convenient way to verify if pt-heartbeat is running. Simply execute the `ps` command to list all running processes. Look for any processes with the name “pt-heartbeat” or “percona-toolkit”. If you find such a process, it indicates that pt-heartbeat is running.

**Executing a MySQL Query**

If you want to obtain more detailed information about the pt-heartbeat monitor, you can execute a MySQL query. The following query checks for the existence of the `pt-heartbeat` table in the `heartbeat` database:

`SQLSHOW TABLES FROM heartbeat;`

If the `pt-heartbeat` table exists, it indicates that pt-heartbeat is running and has successfully created the necessary database structure.

**Setting Up Nagios to Monitor pt-heartbeat**

To ensure that pt-heartbeat is activated on boot, you can configure Nagios to monitor its status. Nagios can check for the presence of the `pt-heartbeat` process or the existence of the `pt-heartbeat` table. If either check fails, Nagios will alert you to the potential issue.

Here’s a general outline of the steps involved in setting up Nagios to monitor pt-heartbeat:

1. Define a Nagios host object for the server where pt-heartbeat runs.
2. Create a Nagios service object for monitoring pt-heartbeat.
3. Configure the service object to check for the presence of the `pt-heartbeat` process or the existence of the `pt-heartbeat` table.
4. Set up notifications for the service object to alert you when pt-heartbeat fails to start or run properly.

By following these steps, you can effectively monitor pt-heartbeat and ensure that it remains active, maintaining the replication health of your MySQL or MariaDB environment.

If you want, you can download MD170B for your Android phone to monitor your heartbeat.  
Here is the link -

> **[MD170B MOD APK v5.0.4 \[Premium Unlocked\] Download](https://blackapks.com/en/md170b)**
>
> Download MD170B APK which is a health and fitness monitoring hybrid watch designed for Android smartphone or tablet.
