[ClusterLabs] Pacemaker API (REST, SOAP, Java library)?

Ken Gaillot kgaillot at redhat.com
Tue Mar 8 10:43:59 EST 2022


On Tue, 2022-03-08 at 10:24 +0200, Viet Nguyen wrote:
> Hi,
> 
> May I know is there any API like REST or SOAP or some kind of Java
> libraries to interact with Pacemaker?
> 
> I have a Java application and I would like to use that to monitor
> Pacemaker. Like viewing the resource statuses; and managing resources
> and nodes like move resources or stop a node from that Java app, if
> possible.
> 
> Thank you so much for your help?
> Regards,
> Viet

Hi,

There is no REST/SOAP API, but there is a high-level C API being
developed that will make it much easier to create such things. The C
API will eventually have C function equivalents of all command-line
tool options, producing XML output that is the same as if the command
were run with --output-as=xml.

The equivalents of a few commands are already available, including
crm_simulate and crmadmin, and crm_mon will be added with the next
release.

In the meantime, most people just execute the command-line tools
directly from their code.
-- 
Ken Gaillot <kgaillot at redhat.com>



More information about the Users mailing list