Heartbeat (through the LRM), supports four different types of resource agents. These are:
The first two of these are based on externally defined standards, and the latter two are unique to this project.
When writing new resource agents, we typically recommend that they be written as OCF resource agents, as they are the most powerful and general of all of these types, unless one needs to operate a STONITH device, in which case we recommend that you write a STONITH device handler.
Content moved to media wiki http://www.linux-ha.org/wiki/OCF_Resource_Agents
content moved to mediawiki http://www.linux-ha.org/wiki/Heartbeat_Resource_Agents
Are not yet documented
However, the following short description might be helpful.
STONITH resource agents are mapped from STONITH devices, so to write a STONITH Resource Agent, one has to write a STONITH device driver, and the corresponding resource agent will magically appear in the system.
Because these resource agents are mapped from STONITH devices, the APIs don't look very much like other resource agents.
If you have a host-reset device you wish to use, and we don't already support it, there are two basic approaches to writing a STONITH Resource Agent:
If you write a 'C' plugin, they are locked into memory and are suitable for use with cluster filesystems without danger. They are slightly harder to write than script plugins, but there are numerous worked examples in the source code.
If you write a script plugin, it is fully as functional and easy to configure as 'C' plugins, with the slight disadvantage of being risky to use with a cluster filesystem in a low-memory situation on Linux.
For now, all I can say about these is Use The Source Luke --