groupexists

Table of Contents

Prototype: groupexists(group)

Return type: boolean

Description: Returns whether a group group exists on this host.

The group may be specified by name or identifier.

Arguments:

  • group: string, in the range: .*

Example:

body common control

{
      bundlesequence  => { "example" };
}


bundle agent example
{
  classes:
      "gname" expression => groupexists("sys");
      "gid"   expression => groupexists("0");

  reports:
    gname::
      "Group exists by name";
    gid::
      "Group exists by id";
}

Output:

R: Group exists by name
R: Group exists by id