[ClusterLabs] get status of each RG

Florin Portase portase.florin at medianetork.ro
Tue Jan 17 11:03:59 EST 2017


Hi Ken, 

Somehow I've manged to make it working. 

I had to use "(crm_resource -L  |grep "Resource Group:" |awk '{print
$NF}')" and after to loop through resources... 

But in the case of a stopped RG:  something like this is not so clear :
"resource rgcl0111 is NOT running" 

On 2017-01-16 16:10, Ken Gaillot wrote:

> On 01/15/2017 10:02 AM, Florin Portase wrote: 
> 
>> Hello,
>> 
>> We're about to create some HPOM  (HP Operations Manager ) monitoring
>> policies for RHEL7 cluster environment.
>> 
>> However, it looks like getting status of running defined RG seems way to
>> challenging comparing to rgmanager/cman
>> 
>> SO, if under RHEL6:
>> 
>> running clustat
>> 
>> Service Name                                                     Owner
>> (Last)                                                     State
>> ------- ----                                                     -----
>> ------                                                     -----
>> service:rg_apache                                              
>> rgcs02_ha                                                       started
>> service:rgcl0111                                                 
>> rgcs01_ha                                                       stopped
>> 
>> Where rgcs02_01/02 are cluster nodes and  rgcl0102 rg_apache are
>> resource groups.
>> 
>> However , under RHEL7 ( pcs ) couldn't fine anything similar.
>> 
>> I'm not interested in status of EACH refined resources, but only
>> resource groups
>> 
>> something like:
>> RG1 running on node2 status: running
>> RG2 running on node1 status:stopped
> 
> You're right, at the moment there is no easy way to do this with
> pacemaker. There is an outstanding feature request to add this ability
> to crm_mon.
> 
> The closest thing now would be to write a script that checks the
> individual resources' statuses with crm_mon (= pcs status) to come up
> with a group status.
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20170117/1786bafe/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20170117/1786bafe/attachment-0003.sig>


More information about the Users mailing list