Advertisement
savicheval

template.j2

Feb 2nd, 2021
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.23 KB | None | 0 0
  1. {% if key == "postgresql", _  in process.elk.additions.metricbeat %}
  2. #------------------------------ PostgreSQL Module ------------------------------
  3. - module: postgresql
  4.   enabled: true
  5.   metricsets:
  6.     # Stats about every PostgreSQL database
  7.     - database
  8.  
  9.     # Stats about the background writer process's activity
  10.     - bgwriter
  11.  
  12.     # Stats about every PostgreSQL process
  13.     - activity
  14.  
  15.     #period: 10s
  16. {% for item in process.elk.additions.metricbeat %}
  17.   period: ["{{ item.period }}"]
  18. {% endfor %}
  19.  
  20.  
  21.   # The host must be passed as PostgreSQL URL. Example:
  22.   # postgres://localhost:5432?sslmode=disable
  23.   # The available parameters are documented here:
  24.   # https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters
  25. {% for item in process.elk.additions.metricbeat %}
  26.   hosts: ["{{ item.hosts }}"]
  27. {% endfor %}
  28.  
  29.   # Username to use when connecting to PostgreSQL. Empty by default.
  30.   #username: user
  31. {% for item in process.elk.additions.metricbeat %}
  32.   username: ["{{ item.username }}"]
  33. {% endfor %}
  34.   # Password to use when connecting to PostgreSQL. Empty by default.
  35.   #password: pass
  36. {% for item in process.elk.additions.metricbeat %}
  37.   password: ["{{ item.password }}"]
  38. {% endfor %}
  39. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement