© Aleksey Mnogosmyslov, 123RF.com

© Aleksey Mnogosmyslov, 123RF.com

Monitoring your cluster with a home-grown OCF agent

Personal Agent

Article from ADMIN 07/2012
By
Admins who want to leverage the powers of Pacemaker rely on OCF resource agents to monitor the cluster. If you don't have an agent for a specific application, try writing your own.

The Linux cluster stack includes multiple components – Corosync or Heartbeat handles cluster communication, Pacemaker takes care of the cluster services (known as "resources"), and the storage component is most often DRBD. The resource layer, that is, Pacemaker, contains multiple components that mesh to control the cluster in the best possible way. The unspectacular agent layer in the cluster stack is in fact extremely important for the functionality of the entire cluster.

The cluster can't perform its task perfectly if the resource agents are not working well, and this means that high-quality resource agents are very important. If you don't have a good agent for a specific program you are running on the cluster, it could be worth your while to program your own resource agent.

This article describes how to create a resource agent that is compatible with the Open Cluster Framework (OCF) standards. The stated goal of OCF is to "define standards for clustering APIs." Creating an agent that complies with the OCF standards will maximize the portability of your agent and minimize the late-night troubleshooting for problems on your cluster (see the box titled "More on Agents").

OCF Benefits

What benefits does the OCF standard offer? One important benefit is that administrators have the ability to define the configuration parameters for a resource directly in the Pacemaker CRM configuration. Pacemaker passes the parameters through to the resource agents, which then convert the information into commands. A classic example of this is the resource agent that handles the cluster IP addresses, that is ocf:heartbeat:IPaddr2. This agent is always assigned the ip parameter via the CRM configuration and thus knows which IP is the cluster IP. The filesystem agent works in a similar way; it takes all of the information

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs



Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>
	</a>

<hr>		    
			</div>
		    		</div>

		<div class=