Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netdata_collector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSI Ansible
netdata_collector
Commits
df289738
Verified
Commit
df289738
authored
2 years ago
by
David Mehren
Browse files
Options
Downloads
Patches
Plain Diff
Switch postgres collector to Go
parent
a302bb6b
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#147429
passed
2 years ago
Stage: linting
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tasks/main.yml
+10
-0
10 additions, 0 deletions
tasks/main.yml
templates/go.d.conf.j2
+2
-0
2 additions, 0 deletions
templates/go.d.conf.j2
templates/postgres.conf.j2
+85
-0
85 additions, 0 deletions
templates/postgres.conf.j2
templates/python.d.conf.j2
+0
-2
0 additions, 2 deletions
templates/python.d.conf.j2
with
97 additions
and
2 deletions
tasks/main.yml
+
10
−
0
View file @
df289738
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
templates/go.d.conf.j2
+
2
−
0
View file @
df289738
...
@@ -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 %}
This diff is collapsed.
Click to expand it.
templates/postgres.conf.j2
0 → 100644
+
85
−
0
View file @
df289738
# 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: '*'
This diff is collapsed.
Click to expand it.
templates/python.d.conf.j2
+
0
−
2
View file @
df289738
...
@@ -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 %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment