getvariablemetatags

Table of Contents

Prototype: getvariablemetatags(varname)

Return type: slist

Description: Returns the list of meta tags for variable varname.

Make sure you specify the correct scope when supplying the name of the variable.

Arguments:

  • varname: string, in the range: [a-zA-Z0-9_$(){}\[\].:]+

Example:

body common control
{
      bundlesequence => { "example" };
}

bundle agent example
{
  vars:
      "v" string => "myvalue", meta => { "mytag" };
      "vtags" slist => getvariablemetatags("example.v");

  reports:
      "Found tags: $(vtags)";

}

Output:

R: Found tags: source=promise
R: Found tags: mytag

Notes:

See also: getclassmetatags()