On Fri, Aug 10, 2007 at 01:59:03PM +0200, matilda matilda wrote:
> Hi Andrew, hi all,
> 
> I'm interested in getting the informations I can get by invoking
> 'crm_mon -1 -r' in a different format or in a different way.
> Background is, that I want to script some little helpers to
> make life easier with HAv2.

Output of crm_mon is an end product, so to speak. It's nice to
get a quick overview of the cluster status, but otherwise it was
not meant to be parsed.

> I started to parse the output of the command above, which is
> not the most "professional" solution in my opinion.
> I looked at the source code and soon stopped it because I
> didn't want to go too deep.
> 
> 1) Is there official, stable API (e.g. for python) to get all informations
> provided by crm_mon?
> 
> 2) If not, would it be possible to add an option where you
> can get this one-shot picture (crm_mon -1 -r) as a well structured
> xml-file. (You MUST be happy to hear that, because it seems you
> all love fiddling with xml files). This would give the chance
> to parse the output in a well defined way and present it in 
> different views.

You can get most of everything by using cibadmin, crm_resource,
crm_attribute, and crmadmin.

> 3) Would it be possible to add the value of the attribute
> 'target_role' to the output of the ressources? (Bye the way:
> failcount would be also very very interesting.)

Again, with above mentioned programs you can check any attribute
in the cluster. In particular, crm_resource can give you most
info.

> If you see, that a resource is stopped, you're also interested
> in why it is stopped. And the first question which always arise
> is: Has someone changed the target_role to stopped,, or is it
> another annoying misconfiguration, error, bug, whatever.

In case it was not coming from target_role, you may want to look
at the status section of the CIB. The whole story, however, you
can only get by looking at the logs.

> I do know that someone can achieve that by several command line
> tools, but if you like a fast overview over your cluster it starts
> to be very annoying to use this bash-for-loops over your resource
> ids.
> 
> What do you think besides having no time, Andrew?
> 
> Best regards
> Andreas Mock
> 
> 
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to