Have you tried `crm_mon -s`?

# crm_mon --help-all | grep ' \-s'
  -s, --simple-status               Display the cluster status once as
a simple one line output (suitable for nagios)

Caveat: This isn't without flaws.
  - Bug 1576103 - `crm_mon -s` prints "CLUSTER OK" when there are
unclean (online) nodes
(https://bugzilla.redhat.com/show_bug.cgi?id=1576103)
  - `crm_mon -s` prints `"CLUSTER OK"` when there are nodes in
`UNCLEAN (online)` status
(https://access.redhat.com/solutions/3441221)

I dunno if Check CRM still works, given that it was last updated 7 years ago:
  - 
https://exchange.nagios.org/directory/Plugins/Clustering-and-High-2DAvailability/Check-CRM/details

On Wed, Dec 2, 2020 at 11:21 PM Ulrich Windl
<ulrich.wi...@rz.uni-regensburg.de> wrote:
>
> >>> Christopher Lumens <clum...@redhat.com> schrieb am 02.12.2020 um 19:14 in
> Nachricht <851583983.28225008.1606932881629.javamail.zim...@redhat.com>:
> > Hi all,
> >
> > The final release of Pacemaker version 2.0.5 is now available at:
> [...]
> >
> > * crm_mon additionally supports a --resource= option for resource-based
> >   filtering, similar to the --node= option introduced in a previous release.
>
> Another nice extension based on this would be a nagios-compatible output and 
> exit code. I imagine:
> OK if the resource is running (or is in its desired state)
> WARNING if the resource is starting or stopping
> CRITICAL if the resource is stopped (or not in ist desired state)
> UNKNOWN if the status cannot be queried or the resource is not known.
>
> Of cource: Likewise for the nodes
>
> clones and master/slave probably would need some special care.
>
> Opinions on that?
>
> Regards,
> Ulrich
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>


-- 
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA

_______________________________________________
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/

Reply via email to