cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding VCS custom agents

Rashmi_Chavan
Level 2
Employee

Veritas Cluster Server (VCS) agents are programs that manage resources, such as disk groups and mount points, within cluster environments. Each type of resource requires an agent. Agents act as intermediaries between VCS and the resources they manage. Typically, agents bring the resources online, monitor their state, and take them offline.

VCS provides prebuilt agents for many enterprise applications. Additionally, VCS lets you create an agent for applications, in the form of a script or a C++ program. To monitor an application using the VCS agent, you must know how to start, stop, and monitor the application component. To build an agent, you must also know about the different application agent components and how they function.

The VCS installation program provides the agent framework library, which is a set of predefined functions. These functions include the ability to connect to the VCS engine and to understand the common configuration attributes, such as RestartLimit and MonitorInterval. To build a custom agent, you must create the following components:

  • Resource type definitions
  • Agent binaries
  • Agent entry points

Resource type definitions

The agent that you create requires a resource type definition. The VCS bundled agents, such as mount point, IP, and NIC have corresponding type definitions. Similarly, the agents such as Oracle and other applications have their own resource type definitions. The type definition file, types.cf, provides VCS with the information that an agent needs to control the resources of that type. Such information may include a general type definition of the resource and its unique attributes.

Agent binaries

Agent binaries are ready-to-use components, which have the in-built VCSAgStartup function implemented. These binaries are located in the /opt/VRTSvcs/bin directory.

When you create your custom agent, you can create an agent directory under the /opt/VRTSagents/ha/bin directory and place a symbolic link pointing to the script agent. This symbolic link works as your agent binary.

The VCS installation program also provides sample C++ files to aid agent development.

Agent entry points

Agents call the entry points in VCS to perform operations on a resource, such as bringing a resource online, monitoring it, or taking it offline.

For your custom agent, you must create entry point scripts for the following functions, and place them in the agent directory:

  • Online: Brings a resource online or starts the application component

  • Offline: Takes a resource offline or stops the application component

  • Monitor: Determines the resource state

  • Clean: Terminates ongoing tasks associated with an online resource or a partially-online resource and then forcefully takes the resource offline

For more information on how to build the custom agents, refer to the Symantec Cluster Server Agent Developer's Guide.

0 REPLIES 0