[Pacemaker] Using Pacemaker/Corosync to do status based upon a web page output

Dejan Muhamedagic dejanmm at fastmail.fm
Tue May 24 15:57:51 UTC 2011


Hi,

On Fri, May 20, 2011 at 02:39:20AM +1200, Phil Hunt wrote:
> Hi
> 
>  
> 
> Our application suite generates a full suite webpage for status.  If it
> comes up cleanly, it means things are running and the pieces each report
> on the page.
> 
>  
> 
> Is there anyway to scrape a webpage and get a status that can trigger
> failovers, etc?
> 
>  
> 
> Something like:
> 
>  
> 
> primitive webCheck ocf:Webscrape \ 
>         params checkString = "page status string"
> URL="http://w.ab.com/statuspage" \
> 
>                name="scrape_v"
> 
>  
> 
> Check the page listed for string listed.  Return value, like ping does, in
> the variable named there

ocf:heartbeat:apache has a quite elaborate monitoring. Take a
look at README.webapps:

/usr/share/doc/packages/resource-agents/README.webapps

One could take out the monitoring code and create a new stateless
RA (such as ocf:heartbeat:MailTo or ocf:pacemaker:ping) which
would just do monitoring and either simply fail on monitor
failure or set an attribute in CIB.

Thanks,

Dejan

> Phil Hunt 
> Orion Health
> Senior AMS Consultant 
> 
> DID: +1 857 488 4749
> Cell:  +1 508 654 7371
> Skype: philhu0724 
> 
>  
> 
>  
> 

> _______________________________________________
> 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