[Pacemaker] emulate crm_mon output by xsltproc'essing cibadmin -Ql
Lars Ellenberg
lars.ellenberg at linbit.com
Tue Mar 1 15:36:22 UTC 2011
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
More information about the Pacemaker
mailing list