Next: , Previous: , Up: Top   [Contents][Index]


5 Remote management

Process groups can be managed remotely by setting the processGroupModify.0 instance to a string containing a modification request formatted as a JSON object. This object can contain the following attributes:

Modify: string name

The name of the group to configure. If such a group already exists, it will be modified. If not, a new group with this name will be created.

This attribute is mandatory.

Modify: boolean excluded

If true, the group is an exclusion group. Otherwise, it is a regular process group.

Modify: boolean delete

If true the group identified by the above variables will be deleted. Otherwise, it will be created or (if it already exists) modified.

Unless the delete attribute is true, the following attributes can also be used:

Modify: string pattern

Pattern for process name. Equivalent to the pattern configuration statement.

Modify: string field

Specifies what to match against the pattern. See field, for the list of allowed values.

Modify: string match

Specify how to match the selected field against the pattern. See match, for the list of allowed values.

Modify: number minCount

Sets the minimum number of processes in this group. Equivalent to the min configuration statement.

Modify: number maxCount

Sets the maximum number of processes in this group. Equivalent to the max configuration statement.

Modify: number maxVSZ

Sets the maximum allowed size of virtual memory for use by processes in this group (kB). See the vsize configuration variable.

Modify: number maxRSS

Sets the maximum resident set size for processes in this group (kB). See the rss configuration variable.

Modify: number maxCPU

Sets the maximum instantaneous CPU usage for the group. Equivalent to the cpu configuration variable.

The following command creates the exclusion group ‘test’ with the default settings:

snmpset localhost HOSTPROC-MIB::processGroupModify s '{
     "name": "test",
     "exclude": true 
  }'

The following command deletes that group:

snmpset localhost HOSTPROC-MIB::processGroupModify s '{
      "name": "test",
      "exclude": true,
      "delete": true 
  }'

Process groups defined via the remote management interface persist across program restarts.

A companion package tallyman uses remote management interface to automatically update hostproc configuration to reflect the running docker containers, grouped by the functionality they provide. Refer to the tallyman project page for details.


Next: , Previous: , Up: Top   [Contents][Index]