search

Process Classes

Process Classes are used to define sets of similar running processes using a regular expression. You can then monitor various aspects of the running processes, such as CPU and memory usage, with a datasource.

To define a class, supply the Process Class Organizer under which the Process Class will reside. Optionally add a description of the organizer. Then, for each Process Class, supply the processes to include/exclude, description, and replacement text. You can also optionally override specific zProperties of a process class, such as zMonitor or zFailSeverity. See the Process Class Fields section below.

The following example shows an example of a zenpack.yaml file with an example of a definition of a process class.

zenpack.yaml
name: ZenPacks.acme.Processes

process_class_organizers:
  Widget:
    description: Organizer for Widget process classes
    process_classes:
      widget:
        description: Widget process class
        includeRegex: sbin\/widget
        excludeRegex: "\\b(vim|tail|grep|tar|cat|bash)\\b"
        replaceRegex: .*
        replacement: Widget


When you define a process class organizer and/or class which already exists, any settings defined in your ZenPack will overwrite existing settings.

Since this is a YAML “mapping”, the minmal specification (name only) would look like:

zenpack.yaml
process_class_organizers:
  Widget: {}

Process Class Organizer Fields

The following fields are valid for a process class organizer entry.

NameDescriptionRequiredTypeDefault Value
nameName (e.g. Widget or “Widget/ACME”).yesstring(implied from key in process_class_organizers map)
descriptionDescription of the process class organizer.nostring"" (empty string)
createShould the process class organizer be created when the ZenPack is installed?nobooleantrue
removeShould the process class organizer be removed when the ZenPack is removed?
This will only apply to a ZenPack that has created the process class organizer.
Any existing process class organizers not created by the ZenPack will not be removed.
Any process class organizer created by the platform will also never be removed.
nobooleanfalse
resetIf true, any zProperties defined here will override those of the target process class organizer.nobooleanfalse
zPropertieszProperty values to set on the process class organizer.nomap<name, value>{} (empty map)

Process Class Fields

The following fields are valid for a process class entry.

NameDescriptionRequiredTypeDefault Value
nameName of the process class (e.g. widget).yesstring

(implied from key in process_classes map)

descriptionDescription of the process class.nostring"" (empty string)
zPropertieszProperty values to set on the process class.nomap<name, value>{} (empty map)
includeRegexInclude processes matching this regular expression.nostringname field value
excludeRegexExclude processes matching this regular expression.nostring"" (empty string)
replaceRegexReplace command line text matching this regular expression.nostring"" (empty string)
replacementText which will replace the command line text that matches replaceRegex.nostring"" (empty string)
monitorEnable monitoring? Overrides parent process class organizer setting.nobooleanNone (don't override)
alert_on_restartSend event on restart? Overrides parent process class organizer setting.nobooleanNone (don't override)
fail_severityFailure event severity. Overrides parent process class organizer setting.
0=Clear, 1=Debug, 2=Info, 3=Warning, 4=Error, 5=Critical
nointegerNone (don't override)
modeler_lockLock process components. Overrides parent process class organizer setting.
0=Unlocked, 1=Lock from Deletes, 2=Lock from Updates
nointegerNone (don't override)
send_event_when_blockedSend and event when action is blocked? Overrides parent class organizer setting.nobooleanNone (don't override)