Creating XML file required for AMF plugins to do resource registration for online and offline state monitoring

Create the amfregister.xml file that is used by imf_register entry point to do registration of process-based resource for online and offline monitoring with AMF. Since imf_register entry point is a generic script used by different agents to register resources for online and offline monitoring, you must specify what needs to be registered for a resource of a particular type with the help of amfregister.xml. You can refer the following table description to know about the tags used in amfregister.xml.

Table: Common tags for the amfregister.xml file

Tag name

Description

RegType

This tag is used to specify the type of registration. This tag is common between PRON and PROFF - specific tags.

Set it to PROFF to do resource registration with AMF for process offline monitoring.

Set it to PRON to do resource registration with AMF for process online monitoring.

ReaperName

It contains the reaper name (type name) for the agent. Agent will be registered with this name in the IMF notification module.

Table: PRON-specific tags

Tag name

Description

ProcPattern

Indicates how the process-based resource shows up in the process table. The specified ProcPattern is searched in the process table and the corresponding pid is registered with AMF for online monitoring.

PronOptions

Specifies additional options for ProcPattern matching. If it is set to IGNORE_ARGS, the value specified in ProcPattern is considered as the process path. While matching against the process table entries, only the process path is matched against the ProcPattern. The pid of the matching process is registered with AMF.

If PronOptions is set to IGNORE_PATH, the value mentioned in the ProcPattern is considered as the process name followed by the process args. While matching against the process table entries, only the base name of the process path and the process args are matched against ProcPattern. The pid of the matching process is registered with AMF.

If the PronOptions is set to IGNORE_ARGS IGNORE_PATH, the value mentioned in the ProcPattern is considered as just the process name. While matching against the process table entries, only the base name of the process path is matched against the process name mentioned in the ProcPattern. The arguments of the process are not considered. The pid of the matching process is registered with AMF.

Table: PROFF-specific tags

Tag name

Description

Owner

It is the user who executes this process. The UID and GID of this user are used to register the PROFF event with AMF.

Path

Complete path of the binary.

arg0

Name with which the binary is executed. If it is executed with the complete path, you need not provide this.

arg0flag

This is used to further refine the matching behavior of arg0. The string specified in arg0 (for example: string A) is searched inside the arg0 of the process that is being matched against (for example: string PA). This can have the following values:

  • FREE: Look for string A in string PA using a free substring match operation.

  • BOUNDLEFT: Look for string A in string PA using a left-bounded substring match operation.

  • BOUNDRIGHT: Look for string A in string PA using a right-bounded substring match operation.

  • EXACT: String A must exactly match string PA.

    If arg0flag is not provided, the default value for arg0flag is considered as EXACT.

    Note:

    BOUNDLEFT and BOUNDRIGHT can be specified together, separated by a space. BOUNDLEFT and BOUNDRIGHT specified together is not the same as EXACT.

args

Arguments with which the binary is executed. This is used for matching while finding the process in the process table. Here it looks for exact match.

ArgsSubString

Apart from the default exact match of the arguments, you can specify a list of substrings that must appear in the argument list of the process that is being matched against.

Using the ArgsSubString tag, you can specify one substring. You can specify up to 8 such substrings.

Note:

If ArgsSubString is provided, you must not provide args.

ArgsSubStringFlag

For each substring specified, you can specify additional flags to control the matching behavior. Each substring specified (for example: string SS) is searched inside args of the process that is being matched against (for example: string PA).

  • FREE: Look for string SS in string PA using a free substring match operation.

  • BOUNDLEFT: Look for string SS in string PA using a left-bounded substring match operation.

  • BOUNDRIGHT: Look for string SS in string PA using a right-bounded substring match operation.

    Every ArgsSubString shall have a corresponding ArgsSubStringFlag. If no ArgsSubStringFlag is provided, the default flag is FREE.

ArgsFlag

This tag is used to control the behavior of overall substring matching.

It can have the following values:

  • MATCH_ALL: Match all substrings specified.

  • MATCH_ANY: Match any of the substrings specified.

  • IGNORE_ARGS: Ignore the args completely. You must not provide this if ArgsSubString or args tags are provided.

    A set of zero or more ArgsSubString and ArgsSubStringFlag tags can be followed by an optional tag ArgsFlag. If no ArgsFlag is provided, MATCH_ALL is considered as the default value for ArgsFlag.