[Linux-HA] How Heartbeat2 monitor MySQL Server?

Kenji HIROHAMA kenji.hirohama at gmail.com
Thu Sep 6 01:53:22 MDT 2007


mysqld seems to be monitored, according to my cib file;
---
[root at h1 ~]# cibadmin -Q|grep mysql
         <primitive class="lsb" id="mysql_4" provider="heartbeat" type="mysql">
             <op id="mysql_4_mon" interval="120s" name="monitor" timeout="60s"/>
           <lrm_resource id="mysql_4" type="mysql" class="lsb"
provider="heartbeat">
             <lrm_rsc_op id="mysql_4_monitor_0" operation="monitor"
crm-debug-origin="do_update_resource"
transition_key="6:0:21c8a1f5-272e-400f-ac14-a568eb123980"
transition_magic="0:7;6:0:21c8a1f5-272e-400f-ac14-a568eb123980"
call_id="5" crm_feature_set="1.0.7" rc_code="7" op_status="0"
interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
           <lrm_resource id="mysql_4" type="mysql" class="lsb"
provider="heartbeat">
             <lrm_rsc_op id="mysql_4_monitor_0" operation="monitor"
crm-debug-origin="do_update_resource"
transition_key="11:0:21c8a1f5-272e-400f-ac14-a568eb123980"
transition_magic="0:7;11:0:21c8a1f5-272e-400f-ac14-a568eb123980"
call_id="5" crm_feature_set="1.0.7" rc_code="7" op_status="0"
interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
             <lrm_rsc_op id="mysql_4_start_0" operation="start"
crm-debug-origin="do_update_resource"
transition_key="11:2:21c8a1f5-272e-400f-ac14-a568eb123980"
transition_magic="0:0;11:2:21c8a1f5-272e-400f-ac14-a568eb123980"
call_id="12" crm_feature_set="1.0.7" rc_code="0" op_status="0"
interval="0" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
             <lrm_rsc_op id="mysql_4_monitor_120000"
operation="monitor" crm-debug-origin="do_update_resource"
transition_key="12:2:21c8a1f5-272e-400f-ac14-a568eb123980"
transition_magic="0:0;12:2:21c8a1f5-272e-400f-ac14-a568eb123980"
call_id="13" crm_feature_set="1.0.7" rc_code="0" op_status="0"
interval="120000" op_digest="f2317cad3d54cec5d7d7aa7d0bf35cf8"/>
-----

Thanks,
Kenji

On 8/16/07, Christian Rishøj <christian at rishoj.net> wrote:
> On 8/15/07, Kenji HIROHAMA <kenji.hirohama at gmail.com> wrote:
>
> > /etc/ha.d/resource.d/mysql is start-up script which comes with MySQL
> > Server binary, and I copied it from the original path...
>
> In this case, you must make sure the script behaves as expected with
> respect to return codes. Please consult
> http://www.linux-ha.org/HeartbeatResourceAgent and test the script (by
> running the actions and echoing $?).
>
> You might also consider using the script as a
> http://www.linux-ha.org/LSBResourceAgent instead.
>
> > First I thohght it is used only to start/stop MySQL Server resource,
> > but perhaps, also used to monitor MySQL Server.
>
> In any case, monitoring only takes place if you define a monitoring
> action for the resource in the CIB.
>
> Please execute "cibadmin -Q" and see if your mysql resource has a
> monitor action.
>
> Christian
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>


-- 
kenji.hirohama at nospam.gmail.com
Kenji Hirohama



More information about the Linux-HA mailing list