Skip to content
Snippets Groups Projects
Verified Commit df289738 authored by David Mehren's avatar David Mehren
Browse files

Switch postgres collector to Go

parent a302bb6b
Branches
No related tags found
No related merge requests found
Pipeline #147429 passed
...@@ -55,6 +55,16 @@ ...@@ -55,6 +55,16 @@
when: netdata_enable_haproxy when: netdata_enable_haproxy
notify: restart netdata notify: restart netdata
- name: Copy netdata postgres.plugin config
ansible.builtin.template:
src: postgres.conf.j2
dest: /etc/netdata/go.d/postgres.conf
owner: root
group: root
mode: 0644
when: netdata_enable_postgres
notify: restart netdata
- name: Enable netdata - name: Enable netdata
ansible.builtin.service: ansible.builtin.service:
name: netdata name: netdata
......
...@@ -18,3 +18,5 @@ modules: ...@@ -18,3 +18,5 @@ modules:
elasticsearch: {% if netdata_enable_elasticsearch %} yes {% else %} no {% endif %} elasticsearch: {% if netdata_enable_elasticsearch %} yes {% else %} no {% endif %}
mysql: {% if netdata_enable_mysql %} yes {% else %} no {% endif %} mysql: {% if netdata_enable_mysql %} yes {% else %} no {% endif %}
postgres: {% if netdata_enable_postgres %} yes {% else %} no {% endif %}
# netdata go.d.plugin configuration for postgres [39/57]
#
# This file is in YAML format. Generally the format is:
#
# name: value
#
# There are 2 sections:
# - GLOBAL
# - JOBS
#
#
# [ GLOBAL ]
# These variables set the defaults for all JOBs, however each JOB may define its own, overriding the defaults.
#
# The GLOBAL section format:
# param1: value1
# param2: value2
#
# Currently supported global parameters:
# - update_every
# Data collection frequency in seconds. Default: 1.
#
# - autodetection_retry
# Re-check interval in seconds. Attempts to start the job are made once every interval.
# Zero means not to schedule re-check. Default: 0.
#
# - priority
# Priority is the relative priority of the charts as rendered on the web page,
# lower numbers make the charts appear before the ones with higher numbers. Default: 70000.
#
#
# [ JOBS ]
# JOBS allow you to collect values from multiple sources.
# Each source will have its own set of charts.
#
# IMPORTANT:
# - Parameter 'name' is mandatory.
# - Jobs with the same name are mutually exclusive. Only one of them will be allowed running at any time.
#
# This allows autodetection to try several alternatives and pick the one that works.
# Any number of jobs is supported.
#
# The JOBS section format:
#
# jobs:
# - name: job1
# param1: value1
# param2: value2
#
# - name: job2
# param1: value1
# param2: value2
#
# - name: job2
# param1: value1
#
#
# [ List of JOB specific parameters ]:
# - dsn
# Data Source Name.
# Format: postgres://[username[:password]]@host:port[/dbname]?sslmode=[disable|verify-ca|verify-full]
# Syntax:
# dsn: postgres://postgres:postgres@127.0.0.1:5432/postgres
#
#
# [ JOB defaults ]:
# No parameters
#
#
# [ JOB mandatory parameters ]:
# - name
# - dsn
# ------------------------------------------------MODULE-CONFIGURATION--------------------------------------------------
# update_every: 1
# autodetection_retry: 0
# priority: 70000
jobs:
- name: local
dsn: 'postgres://postgres:postgres@127.0.0.1:5432/postgres'
collect_databases_matching: '*'
- name: local
dsn: 'host=/var/run/postgresql dbname=postgres user=postgres'
collect_databases_matching: '*'
...@@ -14,5 +14,3 @@ enabled: yes ...@@ -14,5 +14,3 @@ enabled: yes
default_run: {% if netdata_is_container %} no {% else %} yes {% endif %} default_run: {% if netdata_is_container %} no {% else %} yes {% endif %}
haproxy: {% if netdata_enable_haproxy %} yes {% else %} no {% endif %} haproxy: {% if netdata_enable_haproxy %} yes {% else %} no {% endif %}
postgres: {% if netdata_enable_postgres %} yes {% else %} no {% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment