[ClusterLabs] Coming in Pacemaker 2.0.4: crm_mon --include/--exclude

Ken Gaillot kgaillot at redhat.com
Tue Mar 17 15:19:09 EDT 2020

Hi everybody,

I hope this message finds you well.

A feature discussed at the ClusterLabs Summit (mere weeks and a
lifetime ago in Brno ...) is in the master branch and will be part of
the Pacemaker 2.0.4 release. The first release candidate is expected in
about a month.

The crm_mon tool for showing cluster status will have --include and --
exclude options to pick and choose which types of information you want
it to display.


    -I, --include=SECTION(s)
        A list of sections to include in the output.  See `Output
Control` help for more information.

    -U, --exclude=SECTION(s)
        A list of sections to exclude from the output.  See `Output
Control` help for more information.



By default, a certain list of sections are written to the output
destination. The default varies based on the output format - XML
includes everything, while other output formats will display less. This
list can be modified with the --include and --exclude command line
options.  Each option may be given multiple times on the command line, 
and each can give  a  comma-separated  list  of  sections. The options 
are applied to the default set, from left to right as seen on the
command line. For a list of valid sections, pass --include=list or --

% crm_mon --include=list
crm_mon: --include options: all, attributes, bans[:PREFIX], counts, dc,
default, failcounts, failures, fencing, fencing-failed, fencing-
pending, fencing-succeeded, nodes, none, operations, options,
resources, stack, summary, tickets, times


For example if you say

   crm_mon --include=tickets

you will get all the usual information shown, plus booth ticket
constraints. If you say

   crm_mon --include=none,tickets

then only tickets will be shown. If you say

   crm_mon --exclude=resources

then the top summary, nodes, failures, etc. will still be shown but
active resources will not.

This is expected to be especially helpful for clusters with a lot of
nodes or resources, and for scripts and tools parsing the output (the
options apply to XML output as well as human-friendly).
Ken Gaillot <kgaillot at redhat.com>

More information about the Users mailing list