[Pacemaker] emulate crm_mon output by xsltproc'essing cibadmin -Ql

Andrew Beekhof andrew at beekhof.net
Wed Mar 9 03:42:49 EST 2011


I had http://hg.clusterlabs.org/pacemaker/1.1/raw-file/tip/xml/crm.xsl
doing something similar.
Agree its an interesting capability, haven't found much practical use
for it yet though.

Happy to put it in the extras directory though :-)

On Tue, Mar 1, 2011 at 4:36 PM, Lars Ellenberg
<lars.ellenberg at linbit.com> wrote:
> On Tue, Mar 01, 2011 at 04:12:31PM +0100, Lars Ellenberg wrote:
>> On Tue, Mar 01, 2011 at 04:01:27PM +0100, Dejan Muhamedagic wrote:
>> > Hi Lars,
>> >
>> > On Tue, Mar 01, 2011 at 12:31:24PM +0100, Lars Ellenberg wrote:
>> > > I just found something I apparently tried to code up for fun
>> > > during xmas holidays.
>> > >
>> > > Any cib guru around to point out
>> > > what information in the cib should be shown?
>> >
>> > The stuff which is not interesting for users:
>> >
>> > transition-key
>> > transition-magic
>> > crm-debug-origin
>> > op-digest
>> >
>> > > Can the information that crm_mon provides
>> > > be produced by xslt alone, or does it actually _need_
>> > > to do all those things it does, internally?
>> > >
>> > > If this can be done,
>> > > I think it would be quite useful to have various (customizable?)
>> > > transformation style sheets to generate various details.
>> >
>> > It could probably be useful. For instance, what was your motivation?
>>
>> I don't remember. Probably I just wanted to "learn" xslt,
>> and xpath queries, and have been somewhat bored at that time.
>>
>> > > use the proof of concept:
>> > > cibadmin -Ql | xsltproc mycrm_mon.xsl - | less
>> > >
>> > > Any xslt guru around to actually make this useful?
>> >
>> > Looks useful enough to me. Though crm_mon can show operations
>> > details (crm status ops and crm status timing).
>>
>> As long as that is in the cib, it can be added to the output.
>> Is it?
>
> Ah, facepalm.  You point out that if my intention was to get at the
> operation detail, crm_mon can already do that.  Of course it can.
>
> Well, no, that was not my intention.
> But to just dump that information seemd to be the easiest thing to do
> from the xslt, so I chose to do that as a proof of concept ;-)
>
> Easier at least than to figure out how to figure out the current status
> of a resource in xslt (being an xslt rookie).
>
> --
> : Lars Ellenberg
> : LINBIT | Your Way to High Availability
> : DRBD/HA support and consulting http://www.linbit.com
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>




More information about the Pacemaker mailing list