Adding IMF and IMFRegList attributes in configuration

You need to add IMF and IMFRegList attribute in configuration files. Adding IMFRegList is optional.

See IMF.

See IMFRegList.

To add these attributes, you can either modify the configuration file if VCS is not running or modify the running configuration by ha - command if VCS is running. Refer to the following examples for this purpose.

Example of type definition for a custom agent to supports IMF when VCS is not running:

type MyCustomIMFApp (
    static int IMF{} = { Mode=3, MonitorFreq=1, RegisterRetryLimit=3 }
    static str IMFRegList[] = { PathName, Arguments }
    static str ArgList[] = { PathName, Arguments, HomeDir }
    str PathName
    str Arguments
    str HomeDir
)

Example of modify configuration for a custom agent to supports IMF when VCS is running:

Command to add IMF attribute:

haattr -add -static IMF MyCustomIMFApp -integer -assoc Mode 3 MonitorFreq 1 RegisterRetryLimit 3

Command to add IMFRegList attribute:

haattr -add -static Zone IMFRegList -string -vector PathName, Arguments

See IMFRegList.

You can modify these IMF attribute values at the Agent Type or Resource level to suite your requirement. The following example describes how you can modify the values for Mode attribute.

In case of Online only Monitoring (PRON), Mode value can be set to 2. Run the following commands at the respective levels to modify the Mode value:

  1. At the type level:
    # hatype -display <resource-type> -attribute IMF
    #Type         Attribute Value
    CustomProcess IMF  Mode 3 MonitorFreq 1 RegisterRetryLimit 3
    
    # hatype -modify <resource-type> IMF -update Mode 2
    
    # hatype -display <resource-type> -attribute IMF
    #Type         Attribute Value
    CustomProcess IMF Mode 2 MonitorFreq 1 RegisterRetryLimit 3
    
    
  2. At the Resource level, first check that whether static attribute IMF is overridden or not.
    # hares -display <resource-name> -attribute IMF
    VCS WARNING V-16-1-10554 No resource exists with attribute IMF

    In case not overridden , you can now override static attribute IMF at resource level using following command:

    # hares -override <resource-name> IMF
    # hares -display <resource-name> -attribute IMF
    #Resource Attribute System Value
    pres1     IMF global Mode 3 MonitorFreq 1 RegisterRetryLimit 3
    
    # hares -modify pres1 IMF -update Mode 2
    
    # hares -display pres1 -attribute IMF
    #Resource Attribute System Value
    pres1     IMF global Mode 2 MonitorFreq 1 RegisterRetryLimit 3