Permissions

Description

Collect UID, GID, if a file or directory exists and its permissions (in rwx or integer format).

Parameters

ParameterDescriptionTypeDefault
formatFormat to collect permissions instr(rwx or int)"int"
pathPath to the file or directory to collect data from, support environment variablesstrN/A (mandatory)

Schemas

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Permissions",
    "description": "Permissions of a file/directory",
    "properties": {
        "uid": {
            "description": "File/directory User IDentifier",
            "type": "integer"
        },
        "gid": {
            "description": "File/directory Group IDentifier",
            "type": "integer"
        },
        "exists": {
            "description": "File/directory exists",
            "type": "boolean"
        },
        "permissions": {
            "description": "Permissions as rwx or integer",
            "type": "string"
        }
    },
    "type": "object"
}

Measurement configuration

...
permission_home_dc:
  plugin: "dc_measurements/Permissions"
  topic_output: "/dc/measurement/permissions_home_dc"
  tags: ["flb_stdout"]
  path: "$HOME/dc"
  format: "rwx"