Agent attributes

Table: Required attributes

Required attribute

Description

StartProgram

The executable which starts the application. The attribute specifies the complete path of the executable. Applicable command line arguments follow the name of the executable. The executable path and argument have spaces separating them.

For example, if the attribute for StartProgram is

/usr/sbin/vxnotify -g dg00 -m >> /var/log/vxnotify.log

(and vxnotify is blocking command) set it like:

/usr/sbin/vxnotify -g dg00 -m >> /var/log/vxnotify.log &

Note:

The agent logs the return value of the StartProgram executable. The agent does not treat a non-zero return value as failure of execution and brings the resource online.

Note:

Do not use the opening and closing ({ }) brace symbols in this string.

Note:

In the script, specify a return value that is between 0 and 255.

Type and dimension: string-scalar

Example: "/usr/sbin/sample_app start"

StopProgram

The executable which stops the application. The Attribute specifies the complete path of the executable. Applicable command line arguments follow the name of the executable.

Note:

The agent logs the return value of the StopProgram executable. The agent does not treat a non-zero return value as failure of execution and takes the resource offline.

Note:

Do not use the opening and closing ({ }) brace symbols in this string.

Note:

In the script, specify a return value that is between 0 and 255.

Type and dimension: string-scalar

Example: "/usr/sbin/sample_app stop"

At least one of the following attributes:

  • MonitorProcesses

  • MonitorProgram

  • PidFiles

See Table: Optional attributes.

Table: Optional attributes

Optional attribute

Description

CleanProgram

The executable which forcibly stops the application. The Attribute specifies the complete path of the executable. Applicable command line arguments follow the name of the executable. The executable path and argument have spaces separating them.

Note:

Symantec recommends to have the CleanProgram on the local storage so that in case of loss of storage connectivity ApplicationHA can take appropriate action to stop the application.

Note:

If the CleanProgram executable returns a non-zero value, the agent treats it as a clean failure and the resource will not fault.

Type and dimension: string-scalar

Example: "/usr/sbin/sample_app stop"

MonitorProcesses

A list of processes that you want monitored and cleaned. Each process name is the name of an executable. Qualify the executable name with its complete path if the path starts the executable..

The process name must be the name that the ps -ef command displays for the process.

Type and dimension: string-vector

Example: "nmbd"

MonitorProgram

The executable which monitors the application. The Attribute specifies the complete path of the executable. Applicable command line arguments follow the name of the executable. The executable path and argument have spaces separating them.

MonitorProgram can return the following values: OFFLINE value is 100 or 1; ONLINE values range from 101 to 110 or 0 (depending on the confidence level); 110 equals confidence level of 100%. Any other value = UNKNOWN.

Note:

Do not use the opening and closing ({ }) brace symbols in this string.

If MonitorProgram is configured and not available, then resource state will be:

  • OFFLINE if the resource was in OFFLINE state and not waiting for any action.

  • UNKNOWN if the resource was in any other state or waiting for some action.

Type and dimension: string-scalar

Example: "/usr/sbin/sample_app_monitor all"

PidFiles

A list of PID (process ID) files that contain the PID of the processes that you want monitored and cleaned. These are application generated files. Each PID file contains one monitored PID. Specify the complete path of each PID file in the list.

The process ID can change when the process restarts. If the application takes time to update the PID file, the agent's Monitor function may return an incorrect result. If incorrect results occur, increase the ToleranceLimit in the resource definition.

Type and dimension: string-vector

User

The user ID for running StartProgram, StopProgram, MonitorProgram, and CleanProgram. The processes that are specified in the MonitorProcesses list must run in the context of the specified user. Monitor checks the processes to make sure they run in this context.

Type and dimension: string-scalar

Note:

If the configured user does not exist or if the home directory is not set for a configured user, the resource state will be UNKNOWN.

Default: root

Example: user1

EnvFile

The environment file that should get sourced before running any of the StartProgram, StopProgram, MonitorProgram or CleanProgram.

Type and dimension: string-scalar

Default: ""

Note:

Please make sure that the EnvFile adheres the default shell syntax of the configured user.

Example: /home/username/envfile

UseSUDash

When the value of this attribute is 0, the agent performs an su user command before it executes the StartProgram, the StopProgram, the MonitorProgram, or the CleanProgram agent functions.

When the value of this attribute is 1, the agent performs an su - user command before it executes the StartProgram, the StopProgram, the MonitorProgram or the CleanProgram agent functions.

Type and dimension: boolean-scalar

Default: 0

Example: 1

Table: Internal attribute for the agent for generic applications shows the internal attributes for the generic Application agent.

Table: Internal attribute for the agent for generic applications

Internal attributes

Description

IMF

This resource-type level attribute determines whether the generic Application agent must perform intelligent resource monitoring.

This attribute includes the following keys:

  • Mode: Define this attribute to enable or disable intelligent resource monitoring.

    Valid values are as follows:

    • 0 - Does not perform intelligent resource monitoring

    • 1 - Performs intelligent resource monitoring for offline resources and performs poll-based monitoring for online resources

    • 2 - Performs intelligent resource monitoring for online resources and performs poll-based monitoring for offline resources

    • 3 - Performs intelligent resource monitoring for both online and for offline resources

    Default: 3

  • MonitorFreq: This key value specifies the frequency at which the agent invokes the monitor agent function. The value of this key is an integer.

    Default: 1

    You can set this key to a non-zero value for cases where the agent requires to perform both poll-based and intelligent resource monitoring.

    If the value is 0, the agent does not perform poll-based process check monitoring. After the resource registers with the AMF kernel driver, the agent calls the monitor agent function as follows:

    • After every (MonitorFreq x MonitorInterval) number of seconds for online resources

    • After every (MonitorFreq x OfflineMonitorInterval) number of seconds for offline resources

  • RegisterRetryLimit: If you enable intelligent resource monitoring, the agent invokes the imf_register agent function to register the resource with theAMF kernel driver. The value of the RegisterRetryLimit key determines the number of times the agent must retry registration for a resource. If the agent cannot register the resource within the limit that is specified, then intelligent monitoring is disabled until the resource state changes or the value of the Mode key changes.

    Default: 3