{
  "name": "postgresql",
  "title": "PostgreSQL",
  "version": "1.26.0",
  "release": "ga",
  "description": "Collect logs and metrics from PostgreSQL servers with Elastic Agent.",
  "type": "integration",
  "download": "/epr/postgresql/postgresql-1.26.0.zip",
  "path": "/package/postgresql/1.26.0",
  "icons": [
    {
      "src": "/img/logo_postgres.svg",
      "path": "/package/postgresql/1.26.0/img/logo_postgres.svg",
      "title": "logo postgres",
      "size": "32x32",
      "type": "image/svg+xml"
    }
  ],
  "conditions": {
    "kibana": {
      "version": "^8.13.0"
    },
    "elastic": {
      "subscription": "basic"
    }
  },
  "owner": {
    "type": "elastic",
    "github": "elastic/obs-infraobs-integrations"
  },
  "categories": [
    "datastore",
    "observability"
  ],
  "signature_path": "/epr/postgresql/postgresql-1.26.0.zip.sig",
  "format_version": "3.0.2",
  "readme": "/package/postgresql/1.26.0/docs/README.md",
  "license": "basic",
  "screenshots": [
    {
      "src": "/img/logs-overview.png",
      "path": "/package/postgresql/1.26.0/img/logs-overview.png",
      "title": "PostgreSQL logs overview",
      "size": "1919x951",
      "type": "image/png"
    },
    {
      "src": "/img/logs-slowlog-overview.png",
      "path": "/package/postgresql/1.26.0/img/logs-slowlog-overview.png",
      "title": "Filebeat PostgreSQL slowlog overview",
      "size": "1918x789",
      "type": "image/png"
    },
    {
      "src": "/img/metrics-overview.png",
      "path": "/package/postgresql/1.26.0/img/metrics-overview.png",
      "title": "Metricbeat PostgreSQL overview",
      "size": "1919x952",
      "type": "image/png"
    }
  ],
  "assets": [
    "/package/postgresql/1.26.0/LICENSE.txt",
    "/package/postgresql/1.26.0/changelog.yml",
    "/package/postgresql/1.26.0/manifest.yml",
    "/package/postgresql/1.26.0/docs/README.md",
    "/package/postgresql/1.26.0/img/logo_postgres.svg",
    "/package/postgresql/1.26.0/img/logs-overview.png",
    "/package/postgresql/1.26.0/img/logs-slowlog-overview.png",
    "/package/postgresql/1.26.0/img/metrics-overview.png",
    "/package/postgresql/1.26.0/data_stream/activity/manifest.yml",
    "/package/postgresql/1.26.0/data_stream/activity/sample_event.json",
    "/package/postgresql/1.26.0/data_stream/bgwriter/manifest.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/sample_event.json",
    "/package/postgresql/1.26.0/data_stream/database/manifest.yml",
    "/package/postgresql/1.26.0/data_stream/database/sample_event.json",
    "/package/postgresql/1.26.0/data_stream/log/manifest.yml",
    "/package/postgresql/1.26.0/data_stream/log/sample_event.json",
    "/package/postgresql/1.26.0/data_stream/statement/manifest.yml",
    "/package/postgresql/1.26.0/data_stream/statement/sample_event.json",
    "/package/postgresql/1.26.0/kibana/dashboard/postgresql-158be870-87f4-11e7-ad9c-db80de0bf8d3.json",
    "/package/postgresql/1.26.0/kibana/dashboard/postgresql-4288b790-b79f-11e9-a579-f5c0a5d81340.json",
    "/package/postgresql/1.26.0/kibana/dashboard/postgresql-e4c5f230-87f3-11e7-ad9c-db80de0bf8d3.json",
    "/package/postgresql/1.26.0/data_stream/activity/fields/agent.yml",
    "/package/postgresql/1.26.0/data_stream/activity/fields/base-fields.yml",
    "/package/postgresql/1.26.0/data_stream/activity/fields/ecs.yml",
    "/package/postgresql/1.26.0/data_stream/activity/fields/fields.yml",
    "/package/postgresql/1.26.0/data_stream/activity/fields/package-fields.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/fields/agent.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/fields/base-fields.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/fields/ecs.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/fields/fields.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/fields/package-fields.yml",
    "/package/postgresql/1.26.0/data_stream/database/fields/agent.yml",
    "/package/postgresql/1.26.0/data_stream/database/fields/base-fields.yml",
    "/package/postgresql/1.26.0/data_stream/database/fields/ecs.yml",
    "/package/postgresql/1.26.0/data_stream/database/fields/fields.yml",
    "/package/postgresql/1.26.0/data_stream/database/fields/package-fields.yml",
    "/package/postgresql/1.26.0/data_stream/log/fields/agent.yml",
    "/package/postgresql/1.26.0/data_stream/log/fields/base-fields.yml",
    "/package/postgresql/1.26.0/data_stream/log/fields/fields.yml",
    "/package/postgresql/1.26.0/data_stream/log/fields/package-fields.yml",
    "/package/postgresql/1.26.0/data_stream/statement/fields/agent.yml",
    "/package/postgresql/1.26.0/data_stream/statement/fields/base-fields.yml",
    "/package/postgresql/1.26.0/data_stream/statement/fields/ecs.yml",
    "/package/postgresql/1.26.0/data_stream/statement/fields/fields.yml",
    "/package/postgresql/1.26.0/data_stream/statement/fields/package-fields.yml",
    "/package/postgresql/1.26.0/data_stream/activity/agent/stream/stream.yml.hbs",
    "/package/postgresql/1.26.0/data_stream/activity/elasticsearch/ingest_pipeline/default.yml",
    "/package/postgresql/1.26.0/data_stream/bgwriter/agent/stream/stream.yml.hbs",
    "/package/postgresql/1.26.0/data_stream/database/agent/stream/stream.yml.hbs",
    "/package/postgresql/1.26.0/data_stream/log/agent/stream/log.yml.hbs",
    "/package/postgresql/1.26.0/data_stream/log/elasticsearch/ingest_pipeline/default.yml",
    "/package/postgresql/1.26.0/data_stream/log/elasticsearch/ingest_pipeline/pipeline-aws-log.yml",
    "/package/postgresql/1.26.0/data_stream/log/elasticsearch/ingest_pipeline/pipeline-csv.yml",
    "/package/postgresql/1.26.0/data_stream/log/elasticsearch/ingest_pipeline/pipeline-log.yml",
    "/package/postgresql/1.26.0/data_stream/statement/agent/stream/stream.yml.hbs"
  ],
  "policy_templates": [
    {
      "name": "postgresql",
      "title": "PostgreSQL logs and metrics",
      "description": "Collect logs and metrics from PostgreSQL instances",
      "inputs": [
        {
          "type": "logfile",
          "vars": [
            {
              "name": "condition",
              "type": "text",
              "title": "Condition",
              "description": "Condition to filter when to collect this datastream. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "title": "Collect PostgreSQL logs",
          "description": "Collecting application logs from PostgreSQL instances"
        },
        {
          "type": "postgresql/metrics",
          "vars": [
            {
              "name": "hosts",
              "type": "text",
              "title": "Hosts",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "postgres://localhost:5432"
              ]
            },
            {
              "name": "username",
              "type": "text",
              "title": "Username",
              "multi": false,
              "required": false,
              "show_user": false
            },
            {
              "name": "password",
              "type": "password",
              "title": "Password",
              "multi": false,
              "required": false,
              "show_user": false
            },
            {
              "name": "condition",
              "type": "text",
              "title": "Condition",
              "description": "Condition to filter when to collect this datastream. See [Dynamic Input Configuration](https://www.elastic.co/guide/en/fleet/current/dynamic-input-configuration.html) for details.",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "title": "Collect PostgreSQL metrics",
          "description": "Collecting activity, bgwriter, database and statement metrics from PostgreSQL instances"
        }
      ],
      "multiple": true
    }
  ],
  "data_streams": [
    {
      "type": "metrics",
      "dataset": "postgresql.activity",
      "title": "PostgreSQL activity metrics",
      "release": "ga",
      "ingest_pipeline": "default",
      "streams": [
        {
          "input": "postgresql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.\n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "PostgreSQL activity metrics",
          "description": "Collect PostgreSQL activity metrics",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "postgresql",
      "elasticsearch": {
        "ingest_pipeline.name": "default"
      },
      "path": "activity"
    },
    {
      "type": "metrics",
      "dataset": "postgresql.bgwriter",
      "title": "PostgreSQL bgwriter metrics",
      "release": "ga",
      "streams": [
        {
          "input": "postgresql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.  \n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "PostgreSQL bgwriter metrics",
          "description": "Collect PostgreSQL bgwriter metrics",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "postgresql",
      "elasticsearch": {},
      "path": "bgwriter"
    },
    {
      "type": "metrics",
      "dataset": "postgresql.database",
      "title": "PostgreSQL database metrics",
      "release": "ga",
      "streams": [
        {
          "input": "postgresql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.  \n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "PostgreSQL database metrics",
          "description": "Collect PostgreSQL database metrics",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "postgresql",
      "elasticsearch": {},
      "path": "database"
    },
    {
      "type": "logs",
      "dataset": "postgresql.log",
      "title": "PostgreSQL logs",
      "release": "ga",
      "ingest_pipeline": "default",
      "streams": [
        {
          "input": "logfile",
          "vars": [
            {
              "name": "paths",
              "type": "text",
              "title": "Paths",
              "multi": true,
              "required": true,
              "show_user": true,
              "default": [
                "/var/log/postgresql/postgresql-*-*.log*",
                "/var/log/postgresql/postgresql-*-*.csv*"
              ]
            },
            {
              "name": "tags",
              "type": "text",
              "title": "Tags",
              "multi": true,
              "required": true,
              "show_user": false,
              "default": [
                "postgresql-log"
              ]
            },
            {
              "name": "preserve_original_event",
              "type": "bool",
              "title": "Preserve original event",
              "description": "Preserves a raw copy of the original event, added to the field `event.original`",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": false
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details.\n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "log.yml.hbs",
          "title": "PostgreSQL logs",
          "description": "Collect PostgreSQL log logs using log input",
          "enabled": true,
          "ingestion_method": "File"
        }
      ],
      "package": "postgresql",
      "path": "log"
    },
    {
      "type": "metrics",
      "dataset": "postgresql.statement",
      "title": "PostgreSQL statement metrics",
      "release": "ga",
      "streams": [
        {
          "input": "postgresql/metrics",
          "vars": [
            {
              "name": "period",
              "type": "text",
              "title": "Period",
              "multi": false,
              "required": true,
              "show_user": true,
              "default": "10s"
            },
            {
              "name": "processors",
              "type": "yaml",
              "title": "Processors",
              "description": "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. The agent executes this before the events are shipped. See [Processors](https://www.elastic.co/guide/en/fleet/current/elastic-agent-processor-configuration.html) for details.\n",
              "multi": false,
              "required": false,
              "show_user": false
            }
          ],
          "template_path": "stream.yml.hbs",
          "title": "PostgreSQL statement metrics",
          "description": "Collect PostgreSQL statement metrics",
          "enabled": true,
          "ingestion_method": "Database"
        }
      ],
      "package": "postgresql",
      "elasticsearch": {},
      "path": "statement"
    }
  ]
}
