├── collectd ├── modules │ └── files │ │ └── .gitkeep ├── files │ ├── types.db │ ├── syslog.conf │ ├── vmem.conf │ ├── write_prometheus.conf │ ├── redis.conf │ ├── statsd.conf │ ├── default.conf │ ├── memcached.conf │ ├── zookeeper.conf │ ├── csv.conf │ ├── md.conf │ ├── disk.conf │ ├── ntpd.conf │ ├── ethstat.conf │ ├── exec.conf │ ├── rrdtool.conf │ ├── interface.conf │ ├── librato.conf │ ├── processes.conf │ ├── logfile.conf │ ├── unixsock.conf │ ├── protocols.conf │ ├── extra.conf │ ├── tail.conf │ ├── tcpconns.conf │ ├── elasticsearch.conf │ ├── collectd.conf │ ├── powerdns.conf │ ├── python.conf │ ├── openvpn.conf │ ├── apache.conf │ ├── nginx.conf │ ├── mysql.conf │ ├── openldap.conf │ ├── dbi.conf │ ├── network.conf │ ├── redis_info.conf │ ├── df.conf │ ├── ping.conf │ ├── bind.conf │ ├── write_graphite.conf │ ├── rabbitmq.conf │ ├── write_riemann.conf │ ├── curl_json.conf │ ├── curl_xml.conf │ ├── postgresql.conf │ └── java.conf ├── service.sls ├── _mapdata │ ├── _mapdata.jinja │ └── init.sls ├── df.sls ├── md.sls ├── modules.sls ├── bind.sls ├── csv.sls ├── dbi.sls ├── disk.sls ├── exec.sls ├── tail.sls ├── types.sls ├── vmem.sls ├── apache.sls ├── mysql.sls ├── nginx.sls ├── python.sls ├── statsd.sls ├── syslog.sls ├── ethstat.sls ├── librato.sls ├── logfile.sls ├── openvpn.sls ├── rrdtool.sls ├── curl_json.sls ├── curl_xml.sls ├── interface.sls ├── memcached.sls ├── openldap.sls ├── powerdns.sls ├── processes.sls ├── protocols.sls ├── tcpconns.sls ├── unixsock.sls ├── zookeeper.conf ├── write_graphite.sls ├── write_riemann.sls ├── write_prometheus.sls ├── redis.sls ├── ping.sls ├── packages.sls ├── rabbitmq.sls ├── extra-plugins.sls ├── ntpd.sls ├── redis_info.sls ├── elasticsearch.sls ├── postgresql.sls ├── java.sls ├── network.sls ├── init.sls └── map.jinja ├── .rstcheck.cfg ├── commitlint.config.js ├── .github └── workflows │ └── commitlint.yml ├── FORMULA ├── test ├── integration │ ├── default │ │ ├── controls │ │ │ ├── install.rb │ │ │ ├── config.rb │ │ │ └── service.rb │ │ ├── inspec.yml │ │ └── README.md │ └── share │ │ ├── inspec.yml │ │ ├── README.md │ │ └── libraries │ │ └── system.rb └── salt │ └── pillar │ └── default │ └── collectd.sls ├── bin ├── install-hooks └── kitchen ├── .salt-lint ├── LICENSE ├── .rubocop.yml ├── release-rules.js ├── Gemfile ├── pre-commit_semantic-release.sh ├── CHANGELOG.rst ├── .yamllint ├── .gitignore ├── .pre-commit-config.yaml ├── CODEOWNERS ├── release.config.js ├── .travis.yml ├── AUTHORS.md ├── docs ├── README.rst └── AUTHORS.rst ├── pillar.example ├── kitchen.yml ├── .gitlab-ci.yml └── CHANGELOG.md /collectd/modules/files/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.rstcheck.cfg: -------------------------------------------------------------------------------- 1 | [rstcheck] 2 | report=info 3 | ignore_language=rst 4 | ignore_messages=(Duplicate (ex|im)plicit target.*|Hyperlink target ".*" is not referenced\.$) 5 | -------------------------------------------------------------------------------- /collectd/files/types.db: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | {%- for type in collectd_settings.types %} 4 | {{ type }} 5 | {%- endfor %} 6 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'body-max-line-length': [2, 'always', 120], 5 | 'footer-max-line-length': [2, 'always', 120], 6 | 'header-max-length': [2, 'always', 72], 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /collectd/files/syslog.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin syslog 10 | 11 | 12 | LogLevel {{ collectd_settings.plugins.syslog.loglevel }} 13 | 14 | -------------------------------------------------------------------------------- /collectd/files/vmem.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin vmem 10 | 11 | 12 | Verbose {{ collectd_settings.plugins.vmem.verbose | lower }} 13 | 14 | -------------------------------------------------------------------------------- /.github/workflows/commitlint.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | name: Commitlint 5 | 'on': [pull_request] 6 | 7 | jobs: 8 | lint: 9 | runs-on: ubuntu-latest 10 | env: 11 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 12 | steps: 13 | - uses: actions/checkout@v2 14 | with: 15 | fetch-depth: 0 16 | - uses: wagoid/commitlint-github-action@v1 17 | -------------------------------------------------------------------------------- /collectd/files/write_prometheus.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin write_prometheus 10 | 11 | 12 | Port "{{ collectd_settings.plugins.write_prometheus.port }}" 13 | 14 | -------------------------------------------------------------------------------- /collectd/files/redis.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin redis 10 | 11 | 12 | 13 | Host "localhost" 14 | Port "6379" 15 | Timeout 2000 16 | 17 | 18 | -------------------------------------------------------------------------------- /collectd/service.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | collectd-service: 4 | {% if collectd_settings.enable_service %} 5 | service.running: 6 | {% else %} 7 | service.dead: 8 | {% endif %} 9 | - name: {{ collectd_settings.service }} 10 | - enable: {{ collectd_settings.enable_service }} 11 | - require: 12 | - pkg: {{ collectd_settings.pkg }} 13 | -------------------------------------------------------------------------------- /collectd/files/statsd.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin statsd 10 | 11 | 12 | Host "{{ collectd_settings.plugins.statsd.host }}" 13 | Port {{ collectd_settings.plugins.statsd.port }} 14 | 15 | -------------------------------------------------------------------------------- /collectd/_mapdata/_mapdata.jinja: -------------------------------------------------------------------------------- 1 | # yamllint disable rule:indentation rule:line-length 2 | # {{ grains.get("osfinger", grains.os) }} 3 | --- 4 | {#- use salt.slsutil.serialize to avoid encoding errors on some platforms #} 5 | {{ salt["slsutil.serialize"]( 6 | "yaml", 7 | map, 8 | default_flow_style=False, 9 | allow_unicode=True, 10 | ) 11 | | regex_replace("^\s+'$", "'", multiline=True) 12 | | trim 13 | }} 14 | -------------------------------------------------------------------------------- /collectd/files/default.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | # Loaded by collectd.conf (Include {{ collectd_settings.plugindirconfig }}/*.conf) 9 | 10 | {% for plugin in collectd_settings.plugins.default %} 11 | LoadPlugin {{ plugin }} 12 | {%- endfor %} 13 | -------------------------------------------------------------------------------- /collectd/files/memcached.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin memcached 10 | 11 | 12 | Host "{{ collectd_settings.plugins.memcached.host }}" 13 | Port "{{ collectd_settings.plugins.memcached.port }}" 14 | 15 | -------------------------------------------------------------------------------- /collectd/files/zookeeper.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin zookeeper 10 | 11 | 12 | Host {{ collectd_settings.plugins.zookeeper.host }} 13 | Port {{ collectd_settings.plugins.zookeeper.port }} 14 | 15 | -------------------------------------------------------------------------------- /collectd/df.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/df.conf: 7 | file.managed: 8 | - source: salt://collectd/files/df.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/md.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/md.conf: 7 | file.managed: 8 | - source: salt://collectd/files/md.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/modules.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.moduledirconfig }}: 7 | file.recurse: 8 | - source: salt://collectd/modules/files 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - file_mode: 644 12 | - dir_mode: 755 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/bind.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/bind.conf: 7 | file.managed: 8 | - source: salt://collectd/files/bind.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/csv.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/csv.conf: 7 | file.managed: 8 | - source: salt://collectd/files/csv.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/dbi.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/dbi.conf: 7 | file.managed: 8 | - source: salt://collectd/files/dbi.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/disk.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/disk.conf: 7 | file.managed: 8 | - source: salt://collectd/files/disk.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/exec.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/exec.conf: 7 | file.managed: 8 | - source: salt://collectd/files/exec.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/tail.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/tail.conf: 7 | file.managed: 8 | - source: salt://collectd/files/tail.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/types.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/types.db: 7 | file.managed: 8 | - source: salt://collectd/files/types.db 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/vmem.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/vmem.conf: 7 | file.managed: 8 | - source: salt://collectd/files/vmem.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/apache.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/apache.conf: 7 | file.managed: 8 | - source: salt://collectd/files/apache.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/mysql.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/mysql.conf: 7 | file.managed: 8 | - source: salt://collectd/files/mysql.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 600 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/nginx.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/nginx.conf: 7 | file.managed: 8 | - source: salt://collectd/files/nginx.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/python.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/python.conf: 7 | file.managed: 8 | - source: salt://collectd/files/python.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/statsd.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/statsd.conf: 7 | file.managed: 8 | - source: salt://collectd/files/statsd.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/syslog.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/syslog.conf: 7 | file.managed: 8 | - source: salt://collectd/files/syslog.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/ethstat.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/ethstat.conf: 7 | file.managed: 8 | - source: salt://collectd/files/ethstat.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/librato.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/librato.conf: 7 | file.managed: 8 | - source: salt://collectd/files/librato.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/logfile.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/logfile.conf: 7 | file.managed: 8 | - source: salt://collectd/files/logfile.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/openvpn.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/openvpn.conf: 7 | file.managed: 8 | - source: salt://collectd/files/openvpn.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/rrdtool.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/rrdtool.conf: 7 | file.managed: 8 | - source: salt://collectd/files/rrdtool.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/curl_json.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/curl_json.conf: 7 | file.managed: 8 | - source: salt://collectd/files/curl_json.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/curl_xml.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/curl_xml.conf: 7 | file.managed: 8 | - source: salt://collectd/files/curl_xml.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/files/csv.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | {%- set csv_settings = collectd_settings.plugins.csv -%} 3 | # 4 | # DO NOT EDIT 5 | # 6 | # This file is managed by salt via {{ source }} 7 | # Modify the config that generates this file instead 8 | # 9 | 10 | LoadPlugin csv 11 | 12 | 13 | DataDir "{{ csv_settings.DataDir }}" 14 | StoreRates {{ csv_settings.StoreRates | lower }} 15 | 16 | -------------------------------------------------------------------------------- /collectd/interface.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/interface.conf: 7 | file.managed: 8 | - source: salt://collectd/files/interface.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/memcached.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/memcached.conf: 7 | file.managed: 8 | - source: salt://collectd/files/memcached.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/openldap.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/openldap.conf: 7 | file.managed: 8 | - source: salt://collectd/files/openldap.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/powerdns.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/powerdns.conf: 7 | file.managed: 8 | - source: salt://collectd/files/powerdns.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/processes.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/processes.conf: 7 | file.managed: 8 | - source: salt://collectd/files/processes.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/protocols.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/protocols.conf: 7 | file.managed: 8 | - source: salt://collectd/files/protocols.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/tcpconns.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/tcpconns.conf: 7 | file.managed: 8 | - source: salt://collectd/files/tcpconns.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/unixsock.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/unixsock.conf: 7 | file.managed: 8 | - source: salt://collectd/files/unixsock.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/zookeeper.conf: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/zookeeper.conf: 7 | file.managed: 8 | - source: salt://collectd/files/zookeeper.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /FORMULA: -------------------------------------------------------------------------------- 1 | name: collectd 2 | os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS 3 | os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS 4 | version: 1.2.1 5 | release: 1 6 | minimum_version: 2016.11 7 | summary: Collectd formula 8 | description: Formula to use to install and configure collectd 9 | top_level_dir: collectd 10 | -------------------------------------------------------------------------------- /collectd/write_graphite.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/write_graphite.conf: 7 | file.managed: 8 | - source: salt://collectd/files/write_graphite.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/write_riemann.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/write_riemann.conf: 7 | file.managed: 8 | - source: salt://collectd/files/write_riemann.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /collectd/files/md.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin md 10 | 11 | 12 | {%- for device in collectd_settings.plugins.md.Devices %} 13 | Device "{{ device }}" 14 | {%- endfor %} 15 | IgnoreSelected "{{ collectd_settings.plugins.md.IgnoreSelected }}" 16 | 17 | -------------------------------------------------------------------------------- /collectd/write_prometheus.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/write_prometheus.conf: 7 | file.managed: 8 | - source: salt://collectd/files/write_prometheus.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: 644 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | -------------------------------------------------------------------------------- /test/integration/default/controls/install.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Set defaults, use debian as base 4 | 5 | pkg = 'collectd-core' 6 | 7 | # Override by platform 8 | case platform[:family] 9 | when 'redhat', 'fedora', 'suse' 10 | pkg = 'collectd' 11 | when 'bsd' 12 | pkg = 'collectd5' 13 | end 14 | 15 | control 'Collectd package' do 16 | title 'should be installed' 17 | 18 | describe package(pkg) do 19 | it { should be_installed } 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /collectd/files/disk.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin disk 10 | 11 | 12 | {%- for match in collectd_settings.plugins.disk.matches %} 13 | Disk "{{ match}}" 14 | {%- endfor %} 15 | IgnoreSelected "{{ collectd_settings.plugins.disk.IgnoreSelected }}" 16 | 17 | -------------------------------------------------------------------------------- /collectd/files/ntpd.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin ntpd 10 | 11 | 12 | Host "{{ collectd_settings.plugins.ntpd.host }}" 13 | Port "{{ collectd_settings.plugins.ntpd.port }}" 14 | ReverseLookups {{ collectd_settings.plugins.ntpd.ReverseLookups }} 15 | 16 | -------------------------------------------------------------------------------- /collectd/redis.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | libhiredis0.13: 7 | pkg.installed 8 | 9 | {{ collectd_settings.plugindirconfig }}/redis.conf: 10 | file.managed: 11 | - source: salt://collectd/files/redis.conf 12 | - user: {{ collectd_settings.user }} 13 | - group: {{ collectd_settings.group }} 14 | - mode: 644 15 | - template: jinja 16 | - watch_in: 17 | - service: collectd-service 18 | -------------------------------------------------------------------------------- /collectd/files/ethstat.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin ethstat 10 | 11 | 12 | Interface "{{ collectd_settings.plugins.ethstat.interface }}" 13 | Map "rx_csum_offload_errors" "if_rx_errors" "checksum_offload" 14 | Map "multicast" "if_multicast" 15 | MappedOnly false 16 | 17 | -------------------------------------------------------------------------------- /collectd/files/exec.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin exec 10 | 11 | {%- if collectd_settings.plugins.exec is defined and collectd_settings.plugins.exec %} 12 | 13 | {%- for exec_line in collectd_settings.plugins.exec %} 14 | {{ exec_line }} 15 | {%- endfor %} 16 | 17 | {%- endif %} 18 | -------------------------------------------------------------------------------- /collectd/files/rrdtool.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin rrdtool 10 | 11 | 12 | DataDir "{{ collectd_settings.plugins.rrdtool.datadir }}" 13 | CacheFlush {{ collectd_settings.plugins.rrdtool.cacheflush }} 14 | WritesPerSecond {{ collectd_settings.plugins.rrdtool.writespersecond }} 15 | 16 | -------------------------------------------------------------------------------- /collectd/files/interface.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin interface 10 | 11 | 12 | {%- for interface in collectd_settings.plugins.interface.interfaces %} 13 | Interface "{{ interface }}" 14 | {%- endfor %} 15 | IgnoreSelected {{ collectd_settings.plugins.interface.IgnoreSelected }} 16 | 17 | -------------------------------------------------------------------------------- /collectd/ping.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | liboping0: 7 | pkg.installed 8 | 9 | {{ collectd_settings.plugindirconfig }}/ping.conf: 10 | file.managed: 11 | - source: salt://collectd/files/ping.conf 12 | - user: {{ collectd_settings.user }} 13 | - group: {{ collectd_settings.group }} 14 | - mode: 644 15 | - template: jinja 16 | - require: 17 | - pkg: liboping0 18 | - watch_in: 19 | - service: collectd-service 20 | -------------------------------------------------------------------------------- /collectd/files/librato.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin write_http 10 | 11 | 12 | 13 | User "{{ collectd_settings.plugins.librato.user }}" 14 | Password "{{ collectd_settings.plugins.librato.token }}" 15 | Format "JSON" 16 | 17 | 18 | -------------------------------------------------------------------------------- /collectd/files/processes.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin processes 10 | 11 | 12 | {%- for proc in collectd_settings.plugins.processes.Processes %} 13 | Process "{{ proc }}" 14 | {%- endfor %} 15 | {%- for procm in collectd_settings.plugins.processes.ProcessMatches %} 16 | ProcessMatch {{ procm }} 17 | {%- endfor %} 18 | 19 | -------------------------------------------------------------------------------- /collectd/packages.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {%- if collectd_settings.additional_packages is defined and collectd_settings.additional_packages %} 7 | collectd_additional_packages: 8 | pkg.installed: 9 | - pkgs: 10 | {%- for pkg in collectd_settings.additional_packages %} 11 | - {{ pkg.name }}{% if pkg.version is defined and pkg.version %}: '{{ pkg.version }}' {% endif %} 12 | {%- endfor %} 13 | - watch_in: 14 | - service: collectd-service 15 | {%- endif %} 16 | -------------------------------------------------------------------------------- /bin/install-hooks: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -o nounset # Treat unset variables as an error and immediately exit 3 | set -o errexit # If a command fails exit the whole script 4 | 5 | if [ "${DEBUG:-false}" = "true" ]; then 6 | set -x # Run the entire script in debug mode 7 | fi 8 | 9 | if ! command -v pre-commit >/dev/null 2>&1; then 10 | echo "pre-commit not found: please install or check your PATH" >&2 11 | echo "See https://pre-commit.com/#installation" >&2 12 | exit 1 13 | fi 14 | 15 | pre-commit install --install-hooks 16 | pre-commit install --hook-type commit-msg --install-hooks 17 | -------------------------------------------------------------------------------- /collectd/files/logfile.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin logfile 10 | 11 | 12 | LogLevel "{{ collectd_settings.plugins.logfile.log_level }}" 13 | File "{{ collectd_settings.plugins.logfile.file }}" 14 | Timestamp {{ collectd_settings.plugins.logfile.timestamp | lower}} 15 | PrintSeverity {{ collectd_settings.plugins.logfile.print_severity | lower }} 16 | 17 | -------------------------------------------------------------------------------- /.salt-lint: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | exclude_paths: [] 5 | rules: {} 6 | skip_list: 7 | # Using `salt-lint` for linting other files as well, such as Jinja macros/templates 8 | - 205 # Use ".sls" as a Salt State file extension 9 | # Skipping `207` and `208` because `210` is sufficient, at least for the time-being 10 | # I.e. Allows 3-digit unquoted codes to still be used, such as `644` and `755` 11 | - 207 # File modes should always be encapsulated in quotation marks 12 | - 208 # File modes should always contain a leading zero 13 | tags: [] 14 | verbosity: 1 15 | -------------------------------------------------------------------------------- /collectd/files/unixsock.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin unixsock 10 | 11 | 12 | SocketFile "{{ collectd_settings.plugins.unixsock.socket_file }}" 13 | SocketGroup "{{ collectd_settings.plugins.unixsock.socket_group }}" 14 | SocketPerms "{{ collectd_settings.plugins.unixsock.socket_perms }}" 15 | DeleteSocket {{ collectd_settings.plugins.unixsock.delete_socket }} 16 | 17 | -------------------------------------------------------------------------------- /collectd/files/protocols.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin protocols 10 | 11 | 12 | {%- for value in collectd_settings.plugins.protocols.values_ %} 13 | Value "{{ value }}" 14 | {%- endfor %} 15 | {%- if collectd_settings.plugins.protocols.IgnoreSelected is defined %} 16 | IgnoreSelected {{ collectd_settings.plugins.protocols.IgnoreSelected | lower }} 17 | {%- endif %} 18 | 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2015 Salt Stack Formulas 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /collectd/files/extra.conf: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT 3 | # 4 | # This file is managed by salt via {{ source }} 5 | # Modify the config that generates this file instead 6 | # 7 | 8 | {%- macro format_value(value) -%} 9 | {%- if value is sameas true -%} 10 | true 11 | {%- elif value is sameas false -%} 12 | false 13 | {%- elif value is number -%} 14 | {{ value }} 15 | {%- else -%} 16 | "{{ value }}" 17 | {%- endif %} 18 | {%- endmacro %} 19 | 20 | LoadPlugin {{ plugin }} 21 | 22 | 23 | {%- for name, value in (plugin_settings|default({})).items() %} 24 | {{ name }} {{ format_value(value )}} 25 | {%- endfor %} 26 | 27 | -------------------------------------------------------------------------------- /collectd/rabbitmq.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | collectd-rabbitmq-module: 7 | pip.installed: 8 | - name: collectd-rabbitmq 9 | - require_in: 10 | - service: collectd-service 11 | - watch_in: 12 | - service: collectd-service 13 | 14 | {{ collectd_settings.plugindirconfig }}/rabbitmq.conf: 15 | file.managed: 16 | - source: salt://collectd/files/rabbitmq.conf 17 | - user: {{ collectd_settings.user }} 18 | - group: {{ collectd_settings.group }} 19 | - mode: 600 20 | - template: jinja 21 | - watch_in: 22 | - service: collectd-service 23 | -------------------------------------------------------------------------------- /collectd/extra-plugins.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {%- for plugin, plugin_settings in collectd_settings.plugins.extra.items() %} 7 | {{ collectd_settings.plugindirconfig }}/{{ plugin }}.conf: 8 | file.managed: 9 | - source: salt://collectd/files/extra.conf 10 | - user: {{ collectd_settings.user }} 11 | - group: {{ collectd_settings.group }} 12 | - mode: 644 13 | - template: jinja 14 | - defaults: 15 | plugin: {{ plugin }} 16 | plugin_settings: {{ plugin_settings }} 17 | - watch_in: 18 | - service: collectd-service 19 | {% endfor %} 20 | -------------------------------------------------------------------------------- /test/integration/default/controls/config.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Set defaults, use debian as base 4 | 5 | config = '/etc/collectd/collectd.conf' 6 | 7 | # Override by platform 8 | case platform[:family] 9 | when 'redhat', 'fedora', 'suse' 10 | config = '/etc/collectd.conf' 11 | when 'bsd' 12 | config = '/usr/local/etc/collectd.conf' 13 | end 14 | 15 | control 'Collectd configuration' do 16 | title 'should match desired lines' 17 | 18 | describe file(config) do 19 | it { should be_file } 20 | it { should be_owned_by 'root' } 21 | it { should be_grouped_into 'root' } 22 | its('mode') { should cmp '0644' } 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /collectd/ntpd.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | - collectd.python 6 | 7 | collectd-ntp-module: 8 | pip.installed: 9 | - name: collectd-ntp == 0.0.4 10 | - require_in: 11 | - service: collectd-service 12 | - watch_in: 13 | - service: collectd-service 14 | 15 | {{ collectd_settings.plugindirconfig }}/ntpd.conf: 16 | file.managed: 17 | - source: salt://collectd/files/ntpd.conf 18 | - user: {{ collectd_settings.user }} 19 | - group: {{ collectd_settings.group }} 20 | - mode: 644 21 | - template: jinja 22 | - watch_in: 23 | - service: collectd-service 24 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # General overrides used across formulas in the org 5 | Layout/LineLength: 6 | # Increase from default of `80` 7 | # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) 8 | Max: 88 9 | Metrics/BlockLength: 10 | IgnoredMethods: 11 | - control 12 | - describe 13 | # Increase from default of `25` 14 | Max: 30 15 | Security/YAMLLoad: 16 | Exclude: 17 | - test/integration/**/_mapdata.rb 18 | 19 | # General settings across all cops in this formula 20 | AllCops: 21 | NewCops: enable 22 | 23 | # Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` 24 | -------------------------------------------------------------------------------- /collectd/files/tail.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin tail 10 | 11 | 12 | {%- for tail in collectd_settings.plugins.tail %} 13 | 14 | Instance "{{ tail.instance }}" 15 | {%- for match in tail.match %} 16 | 17 | Regex "{{ match.regex }}" 18 | DSType "{{ match.dstype }}" 19 | Type "{{ match.type }}" 20 | Instance "{{ match.instance }}" 21 | 22 | {%- endfor %} 23 | 24 | {%- endfor %} 25 | 26 | -------------------------------------------------------------------------------- /test/integration/share/inspec.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | name: share 5 | title: InSpec shared resources 6 | maintainer: SaltStack Formulas 7 | license: Apache-2.0 8 | summary: shared resources 9 | supports: 10 | - platform-name: debian 11 | - platform-name: ubuntu 12 | - platform-name: centos 13 | - platform-name: fedora 14 | - platform-name: opensuse 15 | - platform-name: suse 16 | - platform-name: freebsd 17 | - platform-name: openbsd 18 | - platform-name: amazon 19 | - platform-name: oracle 20 | - platform-name: arch 21 | - platform-name: gentoo 22 | - platform-name: almalinux 23 | - platform-name: rocky 24 | - platform-name: mac_os_x 25 | - platform: windows 26 | -------------------------------------------------------------------------------- /collectd/redis_info.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | - collectd.python 6 | 7 | collectd-redis-module: 8 | pip.installed: 9 | - name: git+https://github.com/ministryofjustice/redis-collectd-plugin@make-it-a-pip 10 | - require_in: 11 | - service: collectd-service 12 | - watch_in: 13 | - service: collectd-service 14 | 15 | {{ collectd_settings.plugindirconfig }}/redis_info.conf: 16 | file.managed: 17 | - source: salt://collectd/files/redis_info.conf 18 | - user: {{ collectd_settings.user }} 19 | - group: {{ collectd_settings.group }} 20 | - mode: 644 21 | - template: jinja 22 | - watch_in: 23 | - service: collectd-service 24 | -------------------------------------------------------------------------------- /collectd/files/tcpconns.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin tcpconns 10 | 11 | 12 | ListeningPorts {{ collectd_settings.plugins.tcpconns.listening_ports | lower }} 13 | AllPortsSummary {{ collectd_settings.plugins.tcpconns.all_ports_summary | lower }} 14 | {%- for local_port in collectd_settings.plugins.tcpconns.local_ports %} 15 | LocalPort "{{ local_port }}" 16 | {%- endfor %} 17 | {%- for remote_port in collectd_settings.plugins.tcpconns.remote_ports %} 18 | RemotePort "{{ remote_port }}" 19 | {%- endfor %} 20 | 21 | -------------------------------------------------------------------------------- /release-rules.js: -------------------------------------------------------------------------------- 1 | // No release is triggered for the types commented out below. 2 | // Commits using these types will be incorporated into the next release. 3 | // 4 | // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. 5 | module.exports = [ 6 | {breaking: true, release: 'major'}, 7 | // {type: 'build', release: 'patch'}, 8 | // {type: 'chore', release: 'patch'}, 9 | // {type: 'ci', release: 'patch'}, 10 | {type: 'docs', release: 'patch'}, 11 | {type: 'feat', release: 'minor'}, 12 | {type: 'fix', release: 'patch'}, 13 | {type: 'perf', release: 'patch'}, 14 | {type: 'refactor', release: 'patch'}, 15 | {type: 'revert', release: 'patch'}, 16 | {type: 'style', release: 'patch'}, 17 | {type: 'test', release: 'patch'}, 18 | ]; 19 | -------------------------------------------------------------------------------- /collectd/elasticsearch.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | - collectd.python 6 | 7 | collectd-elasticsearch-module: 8 | pip.installed: 9 | - name: git+https://github.com/ministryofjustice/elasticsearch-collectd-plugin 10 | - require_in: 11 | - service: collectd-service 12 | - watch_in: 13 | - service: collectd-service 14 | 15 | 16 | {{ collectd_settings.plugindirconfig }}/elasticsearch.conf: 17 | file.managed: 18 | - source: salt://collectd/files/elasticsearch.conf 19 | - user: {{ collectd_settings.user }} 20 | - group: {{ collectd_settings.group }} 21 | - mode: 644 22 | - template: jinja 23 | - watch_in: 24 | - service: collectd-service 25 | -------------------------------------------------------------------------------- /collectd/_mapdata/init.sls: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=sls 3 | --- 4 | {#- Get the `tplroot` from `tpldir` #} 5 | {%- set tplroot = tpldir.split("/")[0] %} 6 | {%- from tplroot ~ "/map.jinja" import collectd_settings with context %} 7 | 8 | {%- set _mapdata = { 9 | "values": collectd_settings, 10 | } %} 11 | {%- do salt["log.debug"]("### MAP.JINJA DUMP ###\n" ~ _mapdata | yaml(False)) %} 12 | 13 | {%- set output_dir = "/temp" if grains.os_family == "Windows" else "/tmp" %} 14 | {%- set output_file = output_dir ~ "/salt_mapdata_dump.yaml" %} 15 | 16 | {{ tplroot }}-mapdata-dump: 17 | file.managed: 18 | - name: {{ output_file }} 19 | - source: salt://{{ tplroot }}/_mapdata/_mapdata.jinja 20 | - template: jinja 21 | - context: 22 | map: {{ _mapdata | yaml }} 23 | -------------------------------------------------------------------------------- /collectd/postgresql.sls: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | {%- set postgresql_settings = collectd_settings.get('plugins:postgresql') %} 3 | 4 | include: 5 | - collectd 6 | 7 | # Install the required dependency package corresponding to the OS 8 | collectd-postgresql-pkg-installed: 9 | pkg.installed: 10 | - name: {{ collectd_settings.plugin_postgresql.pkg }} 11 | 12 | {{ collectd_settings.plugindirconfig }}/postgresql.conf: 13 | file.managed: 14 | - source: salt://collectd/files/postgresql.conf 15 | - user: {{ collectd_settings.user }} 16 | - group: {{ collectd_settings.group }} 17 | - mode: 644 18 | - template: jinja 19 | - watch_in: 20 | - service: collectd-service 21 | - require: 22 | - pkg: collectd-postgresql-pkg-installed 23 | -------------------------------------------------------------------------------- /collectd/files/elasticsearch.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | 10 | Globals true 11 | 12 | 13 | 14 | ModulePath "{{ collectd_settings.moduledirconfig }}" 15 | Import "elasticsearch" 16 | 17 | Host {{ collectd_settings.plugins.elasticsearch.host }} 18 | Port {{ collectd_settings.plugins.elasticsearch.port }} 19 | Verbose {{ collectd_settings.plugins.elasticsearch.verbose }} 20 | Version "{{ collectd_settings.plugins.elasticsearch.version }}" 21 | Cluster "{{ collectd_settings.plugins.elasticsearch.cluster }}" 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/integration/default/inspec.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | name: default 5 | title: collectd formula 6 | maintainer: SaltStack Formulas 7 | license: Apache-2.0 8 | summary: Verify that the collectd formula is setup and configured correctly 9 | depends: 10 | - name: share 11 | path: test/integration/share 12 | supports: 13 | - platform-name: debian 14 | - platform-name: ubuntu 15 | - platform-name: centos 16 | - platform-name: fedora 17 | - platform-name: opensuse 18 | - platform-name: suse 19 | - platform-name: freebsd 20 | - platform-name: openbsd 21 | - platform-name: amazon 22 | - platform-name: oracle 23 | - platform-name: arch 24 | - platform-name: gentoo 25 | - platform-name: almalinux 26 | - platform-name: rocky 27 | - platform-name: mac_os_x 28 | - platform: windows 29 | -------------------------------------------------------------------------------- /collectd/files/collectd.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | Hostname "{{ collectd_settings.Hostname }}" 10 | FQDNLookup {{ collectd_settings.FQDNLookup }} 11 | 12 | {% for type in collectd_settings.TypesDB %} 13 | TypesDB "{{ type }}" 14 | {%- endfor %} 15 | Interval {{ collectd_settings.Interval }} 16 | Timeout {{ collectd_settings.Timeout }} 17 | ReadThreads {{ collectd_settings.ReadThreads }} 18 | WriteQueueLimitHigh {{ collectd_settings.WriteQueueLimitHigh }} 19 | WriteQueueLimitLow {{ collectd_settings.WriteQueueLimitLow }} 20 | CollectInternalStats {{ collectd_settings.CollectInternalStats }} 21 | 22 | Include "{{ collectd_settings.plugindirconfig }}/*.conf" 23 | -------------------------------------------------------------------------------- /collectd/java.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | collectd-java: 7 | file.rename: 8 | - name: {{ collectd_settings.javalib }} 9 | - source: {{ collectd_settings.javalib }}.new 10 | - force: False 11 | - makedirs: False 12 | 13 | {% if collectd_settings.plugins.java.lib is defined and collectd_settings.plugins.java.lib %} 14 | {{ collectd_settings.javalib }}: 15 | file.symlink: 16 | - target: {{ collectd_settings.plugins.java.lib }} 17 | - makedirs: False 18 | {% endif %} 19 | 20 | {{ collectd_settings.plugindirconfig }}/java.conf: 21 | file.managed: 22 | - source: salt://collectd/files/java.conf 23 | - user: {{ collectd_settings.user }} 24 | - group: {{ collectd_settings.group }} 25 | - mode: 644 26 | - template: jinja 27 | - watch_in: 28 | - service: collectd-service 29 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source ENV.fetch('PROXY_RUBYGEMSORG', 'https://rubygems.org') 4 | 5 | # Install the `inspec` gem using `git` because versions after `4.22.22` 6 | # suppress diff output; this version fixes this for our uses. 7 | # rubocop:disable Layout/LineLength 8 | gem 'inspec', git: 'https://gitlab.com/saltstack-formulas/infrastructure/inspec', branch: 'ssf' 9 | # rubocop:enable Layout/LineLength 10 | 11 | # Install the `kitchen-docker` gem using `git` in order to gain a performance 12 | # improvement: avoid package installations which are already covered by the 13 | # `salt-image-builder` (i.e. the pre-salted images that we're using) 14 | # rubocop:disable Layout/LineLength 15 | gem 'kitchen-docker', git: 'https://gitlab.com/saltstack-formulas/infrastructure/kitchen-docker', branch: 'ssf' 16 | # rubocop:enable Layout/LineLength 17 | 18 | gem 'kitchen-inspec', '>= 2.5.0' 19 | gem 'kitchen-salt', '>= 0.7.2' 20 | -------------------------------------------------------------------------------- /collectd/files/powerdns.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin powerdns 10 | 11 | 12 | 13 | Collect "latency" 14 | Collect "udp-answers" "udp-queries" 15 | Collect "recursing-answers" "recursing-questions" 16 | Collect "packetcache-hit" "packetcache-miss" 17 | Collect "query-cache-hit" "query-cache-miss" 18 | Collect "packetcache-size" "qsize-q" 19 | Collect "corrupt-packets" "servfail-packets" 20 | Collect "tcp-answers" "tcp-queries" 21 | Collect "udp4-answers" "udp4-queries" 22 | Collect "udp6-answers" "udp6-queries" 23 | Collect "deferred-cache-inserts" "deferred-cache-lookup" 24 | Socket "{{ collectd_settings.plugins.powerdns.socket }}" 25 | 26 | 27 | -------------------------------------------------------------------------------- /bin/kitchen: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'kitchen' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require 'pathname' 12 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path('bundle', __dir__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort( 22 | 'Your `bin/bundle` was not generated by Bundler, ' \ 23 | 'so this binstub cannot run. Replace `bin/bundle` by running ' \ 24 | '`bundle binstubs bundler --force`, then run this command again.' 25 | ) 26 | end 27 | end 28 | 29 | require 'rubygems' 30 | require 'bundler/setup' 31 | 32 | load Gem.bin_path('test-kitchen', 'kitchen') 33 | -------------------------------------------------------------------------------- /collectd/network.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd 5 | 6 | {{ collectd_settings.plugindirconfig }}/network.conf: 7 | file.managed: 8 | - source: salt://collectd/files/network.conf 9 | - user: {{ collectd_settings.user }} 10 | - group: {{ collectd_settings.group }} 11 | - mode: '0600' 12 | - template: jinja 13 | - watch_in: 14 | - service: collectd-service 15 | 16 | {% if collectd_settings.plugins.network.authfile is defined and 17 | collectd_settings.plugins.network.username is defined and 18 | collectd_settings.plugins.network.type == 'Listen' %} 19 | {{ collectd_settings.plugins.network.authfile }}: 20 | file.managed: 21 | - user: {{ collectd_settings.user }} 22 | - group: {{ collectd_settings.group }} 23 | - mode: '0600' 24 | - contents: '{{ collectd_settings.plugins.network.username }}: {{ collectd_settings.plugins.network.password }}' 25 | - watch_in: 26 | - service: collectd-service 27 | {% endif %} 28 | -------------------------------------------------------------------------------- /collectd/files/python.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | 10 | Globals {{ collectd_settings.plugins.python.Globals | lower }} 11 | 12 | 13 | 14 | ModulePath "{{ collectd_settings.moduledirconfig }}" 15 | LogTraces {{ collectd_settings.plugins.python.LogTraces | lower }} 16 | Interactive {{ collectd_settings.plugins.python.Interactive | lower }} 17 | 18 | {% if collectd_settings.plugins.python.get('modules', false) %} 19 | {%- for module, array in collectd_settings.plugins.python.modules.items() %} 20 | Import "{{ module }}" 21 | {%- if array['variables'] is defined %} 22 | 23 | {%- for key, value in array['variables'].items() | sort %} 24 | {{ key }} {{ value }} 25 | {%- endfor %} 26 | 27 | {%- endif %} 28 | {%- endfor %} 29 | {% endif %} 30 | 31 | -------------------------------------------------------------------------------- /pre-commit_semantic-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ############################################################################### 4 | # (A) Update `FORMULA` with `${nextRelease.version}` 5 | ############################################################################### 6 | sed -i -e "s_^\(version:\).*_\1 ${1}_" FORMULA 7 | 8 | 9 | ############################################################################### 10 | # (B) Use `m2r2` to convert automatically produced `.md` docs to `.rst` 11 | ############################################################################### 12 | 13 | # Install `m2r2` 14 | pip3 install m2r2 15 | 16 | # Copy and then convert the `.md` docs 17 | cp ./*.md docs/ 18 | cd docs/ || exit 19 | m2r2 --overwrite ./*.md 20 | 21 | # Change excess `H1` headings to `H2` in converted `CHANGELOG.rst` 22 | sed -i -e '/^=.*$/s/=/-/g' CHANGELOG.rst 23 | sed -i -e '1,4s/-/=/g' CHANGELOG.rst 24 | 25 | # Use for debugging output, when required 26 | # cat AUTHORS.rst 27 | # cat CHANGELOG.rst 28 | 29 | # Return back to the main directory 30 | cd .. 31 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | Collectd formula 2 | ================ 3 | 4 | 1.1.x (unreleased) 5 | 6 | - The creation of a symlink for `javalib` is optional and controlled by the parameter found in the pillar. If the `collected.plugins.java.lib` value is not present, the symlink is not created, thus avoiding a highstate failure. Resolves issue 26_. 7 | 8 | .. _26: https://github.com/saltstack-formulas/collectd-formula/issues/26 9 | 10 | 11 | 1.1.0 12 | 13 | Feature release: 14 | * Add elasticsearch, ntpd and redis to available modules 15 | 16 | 0.0.6 (2014-08-18) 17 | 18 | - Created collectd formula 19 | 20 | 0.0.5 (2014-07-28) 21 | 22 | - Fixed broken link to Salt Formula documentation 23 | 24 | 25 | 0.0.4 (2014-02-26) 26 | 27 | - Add CHANGELOG.rst 28 | 29 | 30 | 0.0.3 (2014-02-17) 31 | 32 | - Add map.jinja 33 | - Use map.jinja content in init.sls 34 | 35 | 36 | 0.0.2 (2014-02-16) 37 | 38 | - Better README extension changed from .md to .rst 39 | - Add link to Salt Formula documentation 40 | 41 | 42 | 0.0.1 (2013-11-03) 43 | 44 | - Initial version 45 | -------------------------------------------------------------------------------- /collectd/files/openvpn.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin openvpn 10 | 11 | 12 | {%- for status_file in collectd_settings.plugins.openvpn.status_file %} 13 | StatusFile "{{ status_file }}" 14 | {%- endfor %} 15 | # 16 | # Since 23. March 2010 17 | # http://github.com/octo/collectd/commit/f4c25b4b234ba63fb9b15c2219d55d8af3e3f39d 18 | # 19 | # Collect one RRD for each logged in user 20 | CollectIndividualUsers {{ collectd_settings.plugins.openvpn.individual_users | lower }} 21 | # 22 | # Aggregate number of connected users 23 | CollectUserCount {{ collectd_settings.plugins.openvpn.user_count | lower }} 24 | # 25 | # Store compression statistics 26 | CollectCompression {{ collectd_settings.plugins.openvpn.compression | lower }} 27 | # 28 | # Use new NamingSchema 29 | ImprovedNamingSchema {{ collectd_settings.plugins.openvpn.improved_naming_scheme | lower }} 30 | 31 | -------------------------------------------------------------------------------- /collectd/files/apache.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin apache 10 | 11 | 12 | {%- for instance in collectd_settings.plugins.apache.instances %} 13 | 14 | URL "{{ instance.url }}" 15 | {%- if instance.user is defined and instance.user %} 16 | User "{{ instance.user }}" 17 | {%- endif %} 18 | {%- if instance.pass is defined and instance.pass %} 19 | Password "{{ instance.pass }}" 20 | {%- endif %} 21 | {%- if instance.verifypeer is defined and instance.verifypeer %} 22 | VerifyPeer {{ instance.verifypeer }} 23 | {%- endif %} 24 | {%- if instance.verifyhost is defined and instance.verifyhost %} 25 | VerifyHost {{ instance.verifyhost | lower }} 26 | {%- endif %} 27 | {%- if instance.cacert is defined and instance.cacert %} 28 | CACert "{{ instance.cacert }}" 29 | {%- endif %} 30 | {%- if instance.server is defined and instance.server %} 31 | Server "{{ instance.server }}" 32 | {% endif %} 33 | 34 | {%- endfor %} 35 | 36 | -------------------------------------------------------------------------------- /test/salt/pillar/default/collectd.sls: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | collectd: 5 | FQDNLookup: true 6 | plugins: 7 | postgresql: 8 | databases: 9 | - name: 'foo' 10 | host: 'hostname' 11 | port: '5432' 12 | user: 'username' 13 | pass: 'secret' 14 | sslmode: 'prefer' 15 | krbsrvname: 'kerberos_service_name' 16 | service: 'service_name' 17 | interval: '3600' 18 | queries: 19 | - 'magic' 20 | - name: 'bar' 21 | service: 'service_name' 22 | queries: 23 | - 'rt36_tickets' 24 | - 'backend' 25 | queries: 26 | - name: 'magic' 27 | statement: 'mystatement' 28 | param: 'hostname' 29 | results: 30 | - type: 'gauge' 31 | instanceprefix: 'magic' 32 | valuesfrom: 'count' 33 | - name: 'rt36_tickets' 34 | statement: 'mystatement' 35 | param: 'hostname' 36 | results: 37 | - type: 'counter' 38 | instanceprefix: 'rt36_tickets' 39 | instancesfrom: 'type' 40 | valuesfrom: 'count' 41 | -------------------------------------------------------------------------------- /collectd/files/nginx.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin nginx 10 | 11 | 12 | URL "{{ collectd_settings.plugins.nginx.url }}" 13 | {%- if collectd_settings.plugins.nginx.user is defined and collectd_settings.plugins.nginx.user %} 14 | User "{{ collectd_settings.plugins.nginx.user }}" 15 | {%- endif %} 16 | {%- if collectd_settings.plugins.nginx.password is defined and collectd_settings.plugins.nginx.password %} 17 | Password "{{ collectd_settings.plugins.nginx.password }}" 18 | {%- endif %} 19 | {%- if collectd_settings.plugins.nginx.verifypeer is defined and collectd_settings.plugins.nginx.verifypeer %} 20 | VerifyPeer "{{ collectd_settings.plugins.nginx.verifypeer }}" 21 | {%- endif %} 22 | {%- if collectd_settings.plugins.nginx.verifyhost is defined and collectd_settings.plugins.nginx.verifyhost %} 23 | VerifyHost "{{ collectd_settings.plugins.nginx.verifyhost }}" 24 | {%- endif %} 25 | {%- if collectd_settings.plugins.nginx.cacert is defined and collectd_settings.plugins.nginx.cacert %} 26 | CACert "{{ collectd_settings.plugins.nginx.cacert }}" 27 | {%- endif %} 28 | 29 | -------------------------------------------------------------------------------- /test/integration/default/README.md: -------------------------------------------------------------------------------- 1 | # InSpec Profile: `default` 2 | 3 | This shows the implementation of the `default` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). 4 | 5 | ## Verify a profile 6 | 7 | InSpec ships with built-in features to verify a profile structure. 8 | 9 | ```bash 10 | $ inspec check default 11 | Summary 12 | ------- 13 | Location: default 14 | Profile: profile 15 | Controls: 4 16 | Timestamp: 2019-06-24T23:09:01+00:00 17 | Valid: true 18 | 19 | Errors 20 | ------ 21 | 22 | Warnings 23 | -------- 24 | ``` 25 | 26 | ## Execute a profile 27 | 28 | To run all **supported** controls on a local machine use `inspec exec /path/to/profile`. 29 | 30 | ```bash 31 | $ inspec exec default 32 | .. 33 | 34 | Finished in 0.0025 seconds (files took 0.12449 seconds to load) 35 | 8 examples, 0 failures 36 | ``` 37 | 38 | ## Execute a specific control from a profile 39 | 40 | To run one control from the profile use `inspec exec /path/to/profile --controls name`. 41 | 42 | ```bash 43 | $ inspec exec default --controls package 44 | . 45 | 46 | Finished in 0.0025 seconds (files took 0.12449 seconds to load) 47 | 1 examples, 0 failures 48 | ``` 49 | 50 | See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb). 51 | -------------------------------------------------------------------------------- /collectd/files/mysql.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin mysql 10 | 11 | 12 | {% for db in collectd_settings.plugins.mysql.databases %} 13 | 14 | Host "{{ db.host }}" 15 | {%- if db.port is defined and db.port %} 16 | Port "{{ db.port }}" 17 | {%- endif %} 18 | {%- if db.user is defined and db.user %} 19 | User "{{ db.user }}" 20 | {%- endif %} 21 | {%- if db.pass is defined and db.pass %} 22 | Password "{{ db.pass }}" 23 | {%- endif %} 24 | {%- if db.dbname is defined and db.dbname %} 25 | Database "{{ db.dbname }}" 26 | {%- endif %} 27 | {%- if db.socket is defined and db.socket %} 28 | Socket "{{ db.socket }}" 29 | {%- endif %} 30 | {%- if db.masterstats is defined and db.masterstats %} 31 | MasterStats {{ db.masterstats|lower }} 32 | {%- endif %} 33 | {%- if db.slavestats is defined and db.slavestats %} 34 | SlaveStats {{ db.slavestats|lower }} 35 | {%- endif %} 36 | {%- if db.slavenotifications is defined and db.slavenotifications %} 37 | SlaveNotifications {{ db.slavenotifications|lower }} 38 | {%- endif %} 39 | 40 | {%- endfor %} 41 | 42 | -------------------------------------------------------------------------------- /test/integration/default/controls/service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | config_plugin_file = 4 | case platform[:family] 5 | when 'redhat', 'fedora' 6 | '/etc/collectd.d/postgresql.conf' 7 | when 'suse' 8 | '/usr/lib64/collectd/postgresql.conf' 9 | else 10 | '/etc/collectd/plugins/postgresql.conf' 11 | end 12 | 13 | control 'Collectd service' do 14 | title 'should be running and enabled' 15 | 16 | describe service('collectd') do 17 | it { should be_installed } 18 | it { should be_enabled } 19 | it { should be_running } 20 | end 21 | 22 | describe file(config_plugin_file) do 23 | its('owner') { should eq 'root' } 24 | its('group') { should eq 'root' } 25 | it { should be_readable.by('others') } 26 | it { should_not be_writable.by('others') } 27 | it { should_not be_executable.by('others') } 28 | end 29 | 30 | describe file(config_plugin_file) do 31 | it { should exist } 32 | it { should be_file } 33 | its(:content) { should match(//) } 34 | its(:content) { should match(//) } 35 | its(:content) { should match(//) } 36 | 37 | its(:content) { should match(//) } 38 | its(:content) { should match(//) } 39 | its(:content) { should match(/Statement */) } 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /collectd/files/openldap.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin openldap 10 | 11 | 12 | {%- for instance in collectd_settings.plugins.openldap.instances %} 13 | 14 | URL "{{ instance.url }}" 15 | {%- if instance.binddn is defined %} 16 | BindDN "{{ instance.binddn }}" 17 | {%- endif %} 18 | {%- if instance.password is defined %} 19 | Password "{{ instance.password }}" 20 | {%- endif %} 21 | {%- if instance.starttls is defined %} 22 | {%- if instance.starttls %} 23 | StartTLS true 24 | {%- else %} 25 | StartTLS false 26 | {% endif %} 27 | {%- endif %} 28 | {%- if instance.verifyhost is defined %} 29 | {%- if instance.verifyhost %} 30 | VerifyHost true 31 | {%- else %} 32 | VerifyHost false 33 | {% endif %} 34 | {%- endif %} 35 | {%- if instance.cacert is defined %} 36 | CACert "{{ instance.cacert }}" 37 | {%- endif %} 38 | {%- if instance.timeout is defined %} 39 | Timeout "{{ instance.timeout }}" 40 | {%- endif %} 41 | {%- if instance.version is defined %} 42 | Version "{{ instance.version }}" 43 | {%- endif %} 44 | 45 | {%- endfor %} 46 | 47 | -------------------------------------------------------------------------------- /test/integration/share/README.md: -------------------------------------------------------------------------------- 1 | # InSpec Profile: `share` 2 | 3 | This shows the implementation of the `share` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). 4 | 5 | Its goal is to share the libraries between all profiles. 6 | 7 | ## Libraries 8 | 9 | ### `system` 10 | 11 | The `system` library provides easy access to system dependent information: 12 | 13 | - `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective 14 | - `system.platform[:family]` provide a family name for Arch and Gentoo 15 | - `system.platform[:name]` append `linux` to both `amazon` and `oracle`; ensure Windows platforms are resolved as simply `windows` 16 | - `system.platform[:release]` tweak Arch, Amazon Linux, Gentoo, openSUSE and Windows: 17 | - `Arch` is always `base-latest` 18 | - `Amazon Linux` release `2018` is resolved as `1` 19 | - `Gentoo` release is trimmed to its major version number and then the init system is appended (i.e. `sysv` or `sysd`) 20 | - `openSUSE` is resolved as `tumbleweed` if the `platform[:release]` is in date format 21 | - `Windows` uses the widely-used release number (e.g. `8.1` or `2019-server`) in place of the actual system release version 22 | - `system.platform[:finger]` is the concatenation of the name and the major release number (except for Ubuntu, which gives `ubuntu-20.04` for example) 23 | -------------------------------------------------------------------------------- /collectd/init.sls: -------------------------------------------------------------------------------- 1 | {% from "collectd/map.jinja" import collectd_settings with context %} 2 | 3 | include: 4 | - collectd.service 5 | 6 | collectd: 7 | pkg.installed: 8 | - name: {{ collectd_settings.pkg }} 9 | {%- if collectd_settings.pkg_version is defined and collectd_settings.pkg_version %} 10 | - version: '{{ collectd_settings.pkg_version }}' 11 | {%- endif %} 12 | 13 | {{ collectd_settings.plugindirconfig }}: 14 | file.directory: 15 | - user: {{ collectd_settings.user }} 16 | - group: {{ collectd_settings.group }} 17 | - dir_mode: 755 18 | - file_mode: 644 19 | - makedirs: True 20 | - clean: {{ collectd_settings.purge_plugindir }} 21 | - require_in: 22 | - service: collectd-service # set proper file mode before service runs 23 | 24 | {{ collectd_settings.config }}: 25 | file.managed: 26 | - source: salt://collectd/files/collectd.conf 27 | - user: {{ collectd_settings.user }} 28 | - group: {{ collectd_settings.group }} 29 | - mode: 644 30 | - template: jinja 31 | - watch_in: 32 | - service: collectd-service 33 | 34 | {{ collectd_settings.plugindirconfig }}/default.conf: 35 | file.managed: 36 | - source: salt://collectd/files/default.conf 37 | - user: {{ collectd_settings.user }} 38 | - group: {{ collectd_settings.group }} 39 | - mode: 644 40 | - template: jinja 41 | - watch_in: 42 | - service: collectd-service 43 | -------------------------------------------------------------------------------- /collectd/files/dbi.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin dbi 10 | 11 | 12 | {%- for query in collectd_settings.plugins.dbi.queries %} 13 | 14 | Statement "{{ query.statement }}" 15 | {%- for res in query.results %} 16 | 17 | Type {{ res.type }} 18 | {%- if res.instancesFrom is defined and res.instancesFrom %} 19 | InstancesFrom {{ res.instancesFrom }} 20 | {%- endif %} 21 | {%- if res.valuesFrom is defined and res.valuesFrom %} 22 | ValuesFrom {{ res.valuesFrom }} 23 | {%- endif %} 24 | {%- if res.instancePrefix is defined and res.instancePrefix %} 25 | InstancePrefix {{ res.instancePrefix }} 26 | {%- endif %} 27 | 28 | {%- endfor %} 29 | 30 | {%- endfor %} 31 | 32 | {%- for db in collectd_settings.plugins.dbi.databases %} 33 | 34 | Driver {{ db.driver }} 35 | {%- for driverOption in db.driverOptions %} 36 | DriverOption "{{ driverOption.name }}" {{ driverOption.value }} 37 | {%- endfor %} 38 | {%- for query in db.queries %} 39 | Query {{ query }} 40 | {%- endfor %} 41 | 42 | {%- endfor %} 43 | 44 | 45 | -------------------------------------------------------------------------------- /.yamllint: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # Extend the `default` configuration provided by `yamllint` 5 | extends: 'default' 6 | 7 | # Files to ignore completely 8 | # 1. All YAML files under directory `.bundle/`, introduced if gems are installed locally 9 | # 2. All YAML files under directory `.cache/`, introduced during the CI run 10 | # 3. All YAML files under directory `.git/` 11 | # 4. All YAML files under directory `node_modules/`, introduced during the CI run 12 | # 5. Any SLS files under directory `test/`, which are actually state files 13 | # 6. Any YAML files under directory `.kitchen/`, introduced during local testing 14 | # 7. `kitchen.vagrant.yml`, which contains Embedded Ruby (ERB) template syntax 15 | ignore: | 16 | .bundle/ 17 | .cache/ 18 | .git/ 19 | node_modules/ 20 | test/**/states/**/*.sls 21 | .kitchen/ 22 | kitchen.vagrant.yml 23 | 24 | yaml-files: 25 | # Default settings 26 | - '*.yaml' 27 | - '*.yml' 28 | - .salt-lint 29 | - .yamllint 30 | # SaltStack Formulas additional settings 31 | - '*.example' 32 | - test/**/*.sls 33 | 34 | rules: 35 | empty-values: 36 | forbid-in-block-mappings: true 37 | forbid-in-flow-mappings: true 38 | line-length: 39 | # Increase from default of `80` 40 | # Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`) 41 | max: 88 42 | octal-values: 43 | forbid-implicit-octal: true 44 | forbid-explicit-octal: true 45 | -------------------------------------------------------------------------------- /collectd/files/network.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin network 10 | 11 | 12 | <{{ collectd_settings.plugins.network.type | default('Server') }} "{{ collectd_settings.plugins.network.host }}" "{{ collectd_settings.plugins.network.port }}"> 13 | {%- if collectd_settings.plugins.network.securitylevel is defined%} 14 | SecurityLevel "{{ collectd_settings.plugins.network.securitylevel }}" 15 | {%- endif %} 16 | {%- if collectd_settings.plugins.network.username is defined and collectd_settings.plugins.network.username and collectd_settings.plugins.network.type == 'Server' %} 17 | UserName "{{ collectd_settings.plugins.network.username }}" 18 | {%- endif %} 19 | {%- if collectd_settings.plugins.network.password is defined and collectd_settings.plugins.network.password and collectd_settings.plugins.network.type == 'Server' %} 20 | Password "{{ collectd_settings.plugins.network.password }}" 21 | {%- endif %} 22 | {%- if collectd_settings.plugins.network.authfile is defined and collectd_settings.plugins.network.authfile and collectd_settings.plugins.network.type == 'Listen' %} 23 | AuthFile "{{ collectd_settings.plugins.network.authfile }}" 24 | {%- endif %} 25 | 26 | 27 | -------------------------------------------------------------------------------- /collectd/files/redis_info.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | 10 | Globals true 11 | 12 | 13 | 14 | ModulePath "{{ collectd_settings.moduledirconfig }}" 15 | Import "redis_info" 16 | 17 | 18 | Host {{ collectd_settings.plugins.redis_info.host }} 19 | Port {{ collectd_settings.plugins.redis_info.port }} 20 | {%- if collectd_settings.plugins.redis_info.auth is defined %} 21 | Auth "{{ collectd_settings.plugins.redis_info.auth }}" 22 | {%- endif %} 23 | Verbose {{ collectd_settings.plugins.redis_info.verbose }} 24 | 25 | # Catch Redis metrics (prefix with Redis_) 26 | Redis_uptime_in_seconds "gauge" 27 | Redis_uptime_in_days "gauge" 28 | Redis_lru_clock "counter" 29 | Redis_connected_clients "gauge" 30 | Redis_connected_slaves "gauge" 31 | Redis_blocked_clients "gauge" 32 | Redis_evicted_keys "gauge" 33 | Redis_used_memory "bytes" 34 | Redis_used_memory_peak "bytes" 35 | Redis_changes_since_last_save "gauge" 36 | Redis_instantaneous_ops_per_sec "gauge" 37 | Redis_rdb_bgsave_in_progress "gauge" 38 | Redis_total_connections_received "counter" 39 | Redis_total_commands_processed "counter" 40 | Redis_keyspace_hits "derive" 41 | Redis_keyspace_misses "derive" 42 | 43 | 44 | -------------------------------------------------------------------------------- /collectd/files/df.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin df 10 | 11 | {%- if collectd_settings.plugins.df.Device is defined and collectd_settings.plugins.df.Device %} 12 | {%- do collectd_settings.plugins.df.Devices.append(collectd_settings.plugins.df.Device) %} {# backwards compat #} 13 | {%- endif %} 14 | 15 | 16 | {%- for device in collectd_settings.plugins.df.Devices %} 17 | Device "{{ device }}" 18 | {%- endfor %} 19 | {%- if collectd_settings.plugins.df.MountPoints is defined and collectd_settings.plugins.df.MountPoints %} 20 | {%- for mountpoint in collectd_settings.plugins.df.MountPoints %} 21 | MountPoint "{{ mountpoint }}" 22 | {%- endfor %} 23 | {%- endif %} 24 | {%- if collectd_settings.plugins.df.FSTypes is defined and collectd_settings.plugins.df.FSTypes %} 25 | {%- for fstype in collectd_settings.plugins.df.FSTypes %} 26 | FSType "{{ fstype }}" 27 | {%- endfor %} 28 | {%- endif %} 29 | IgnoreSelected "{{ collectd_settings.plugins.df.IgnoreSelected|lower }}" 30 | ReportByDevice "{{ collectd_settings.plugins.df.ReportByDevice|lower }}" 31 | {%- if not collectd_settings.plugins.df.disable_report_reserved %} 32 | # ReportReserved is only supported in old versions of collectd 33 | ReportReserved "{{ collectd_settings.plugins.df.ReportReserved|lower }}" 34 | {%- endif %} 35 | ReportInodes "{{ collectd_settings.plugins.df.ReportInodes|lower }}" 36 | ValuesPercentage "{{ collectd_settings.plugins.df.ValuesPercentage|lower }}" 37 | 38 | -------------------------------------------------------------------------------- /collectd/files/ping.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | {%- set hosts = collectd_settings.plugins.ping.hosts %} 3 | {%- set hfg = collectd_settings.plugins.ping.hosts_from_grains %} 4 | {%- if hfg and salt['mine.get'](hfg.target, hfg.fun, hfg.expr_form) %} 5 | {%- set hosts = hosts + salt['mine.get'](hfg.target, hfg.fun, hfg.expr_form).values() %} 6 | {%- endif %} 7 | # 8 | # DO NOT EDIT 9 | # 10 | # This file is managed by salt via {{ source }} 11 | # Modify the config that generates this file instead 12 | # 13 | 14 | LoadPlugin ping 15 | 16 | 17 | {%- for host in hosts %} 18 | Host "{{ host }}" 19 | {%- endfor %} 20 | 21 | {%- if collectd_settings.plugins.ping.Device is defined and collectd_settings.plugins.ping.Device %} 22 | Interval "{{ collectd_settings.plugins.ping.interval }}" 23 | {%- endif %} 24 | {%- if collectd_settings.plugins.ping.Device is defined and collectd_settings.plugins.ping.Device %} 25 | Timeout "{{ collectd_settings.plugins.ping.timeout }}" 26 | {%- endif %} 27 | {%- if collectd_settings.plugins.ping.Device is defined and collectd_settings.plugins.ping.Device %} 28 | TTL "{{ collectd_settings.plugins.ping.ttl }}" 29 | {%- endif %} 30 | {%- if collectd_settings.plugins.ping.Device is defined and collectd_settings.plugins.ping.Device %} 31 | SourceAddress "{{ collectd_settings.plugins.ping.sourceaddress }}" 32 | {%- endif %} 33 | {%- if collectd_settings.plugins.ping.Device is defined and collectd_settings.plugins.ping.Device %} 34 | Device "{{ collectd_settings.plugins.ping.device }}" 35 | {%- endif %} 36 | {%- if collectd_settings.plugins.ping.Device is defined and collectd_settings.plugins.ping.Device %} 37 | MaxMissed "{{ collectd_settings.plugins.ping.maxmissed }}" 38 | {%- endif %} 39 | 40 | -------------------------------------------------------------------------------- /collectd/files/bind.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin bind 10 | 11 | 12 | URL "{{ collectd_settings.plugins.bind.proto }}://{{ collectd_settings.plugins.bind.host }}:{{ collectd_settings.plugins.bind.port }}/" 13 | ParseTime {{ collectd_settings.plugins.bind.parsetime | lower }} 14 | OpCodes {{ collectd_settings.plugins.bind.opcodes | lower }} 15 | QTypes {{ collectd_settings.plugins.bind.qtypes | lower }} 16 | 17 | ServerStats {{ collectd_settings.plugins.bind.serverstats | lower }} 18 | ZoneMaintStats {{ collectd_settings.plugins.bind.zonemaintstats | lower }} 19 | ResolverStats {{ collectd_settings.plugins.bind.resolverstats | lower }} 20 | MemoryStats {{ collectd_settings.plugins.bind.memorystats | lower }} 21 | 22 | {%- if collectd_settings.plugins.bind.views is defined %} 23 | {% for view in collectd_settings.plugins.bind.views %} 24 | 25 | {%- if view.qtypes is defined %} 26 | QTypes {{ view.qtypes | lower }} 27 | {%- else %} 28 | QTypes true 29 | {%- endif %} 30 | {%- if view.resolverstats is defined %} 31 | ResolverStats {{ view.resolverstats | lower }} 32 | {%- else %} 33 | ResolverStats true 34 | {%- endif %} 35 | {%- if view.cacherrsets is defined %} 36 | CacheRRSets {{ view.cacherrsets | lower }} 37 | {%- else %} 38 | CacheRRSets true 39 | {%- endif %} 40 | 41 | {%- if view.zones is defined %} 42 | {% for zone in view.zones %} 43 | Zone "{{ zone }}" 44 | {%- endfor %} 45 | {%- endif %} 46 | 47 | {%- endfor %} 48 | {%- endif %} 49 | 50 | -------------------------------------------------------------------------------- /collectd/files/write_graphite.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin write_graphite 10 | 11 | 12 | 13 | Host "{{ collectd_settings.plugins.write_graphite.host }}" 14 | Port "{{ collectd_settings.plugins.write_graphite.port }}" 15 | {%- if collectd_settings.plugins.write_graphite.protocol is defined %} 16 | Protocol "{{ collectd_settings.plugins.write_graphite.protocol|lower }}" 17 | {%- endif %} 18 | Prefix "{{ collectd_settings.plugins.write_graphite.prefix }}" 19 | Postfix "{{ collectd_settings.plugins.write_graphite.postfix }}" 20 | {%- if collectd_settings.plugins.write_graphite.escapecharacter is defined and collectd_settings.plugins.write_graphite.escapecharacter %} 21 | EscapeCharacter "{{ collectd_settings.plugins.write_graphite.escapecharacter }}" 22 | {%- endif %} 23 | {%- if collectd_settings.plugins.write_graphite.logsenderrors is defined and collectd_settings.plugins.write_graphite.logsenderrors %} 24 | LogSendErrors {{ collectd_settings.plugins.write_graphite.logsenderrors|lower }} 25 | {%- endif %} 26 | {%- if collectd_settings.plugins.write_graphite.separateinstances is defined and collectd_settings.plugins.write_graphite.separateinstances %} 27 | SeparateInstances {{ collectd_settings.plugins.write_graphite.separateinstances|lower }} 28 | {%- endif %} 29 | {%- if collectd_settings.plugins.write_graphite.storerates is defined %} 30 | StoreRates {{ collectd_settings.plugins.write_graphite.storerates|lower }} 31 | {%- endif %} 32 | {%- if collectd_settings.plugins.write_graphite.alwaysappendds is defined and collectd_settings.plugins.write_graphite.alwaysappendds %} 33 | AlwaysAppendDS {{ collectd_settings.plugins.write_graphite.alwaysappendds|lower }} 34 | {%- endif %} 35 | 36 | 37 | -------------------------------------------------------------------------------- /collectd/files/rabbitmq.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | # Configure the rabbitmq-collectd-plugin 10 | TypesDB "/usr/local/share/collectd-rabbitmq/types.db.custom" 11 | 12 | 13 | Globals true 14 | 15 | 16 | 17 | LogTraces true 18 | Interactive false 19 | Import "collectd_rabbitmq.collectd_plugin" 20 | 21 | 22 | {%- if collectd_settings.plugins.rabbitmq.username is defined %} 23 | Username "{{ collectd_settings.plugins.rabbitmq.username }}" 24 | {%- endif %} 25 | {%- if collectd_settings.plugins.rabbitmq.password is defined %} 26 | Password "{{ collectd_settings.plugins.rabbitmq.password }}" 27 | {%- endif %} 28 | {%- if collectd_settings.plugins.rabbitmq.realm is defined %} 29 | Realm "{{ collectd_settings.plugins.rabbitmq.realm }}" 30 | {%- endif %} 31 | {%- if collectd_settings.plugins.rabbitmq.host is defined %} 32 | Host "{{ collectd_settings.plugins.rabbitmq.host }}" 33 | {%- endif %} 34 | {%- if collectd_settings.plugins.rabbitmq.port is defined %} 35 | Port "{{ collectd_settings.plugins.rabbitmq.port }}" 36 | {%- endif %} 37 | {%- if collectd_settings.plugins.rabbitmq.vhost_prefix is defined %} 38 | VHostPrefix "{{ collectd_settings.plugins.rabbitmq.vhost_prefix }}" 39 | {%- endif %} 40 | {%- if collectd_settings.plugins.rabbitmq.ignore_queue_regex is defined %} 41 | 42 | {%- for queue in collectd_settings.plugins.rabbitmq.ignore_queue_regex %} 43 | Regex "{{ queue }}" 44 | {%- endfor %} 45 | 46 | {%- endif %} 47 | {%- if collectd_settings.plugins.rabbitmq.ignore_exchange_regex is defined %} 48 | 49 | {%- for exchange in collectd_settings.plugins.rabbitmq.ignore_exchange_regex %} 50 | Regex "{{ exchange }}" 51 | {%- endfor %} 52 | 53 | {%- endif %} 54 | 55 | 56 | -------------------------------------------------------------------------------- /collectd/files/write_riemann.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin write_riemann 10 | 11 | 12 | 13 | Host "{{ collectd_settings.plugins.write_riemann.host }}" 14 | Port "{{ collectd_settings.plugins.write_riemann.port }}" 15 | Protocol {{ collectd_settings.plugins.write_riemann.protocol|upper }} 16 | Batch {{ collectd_settings.plugins.write_riemann.batch|lower }} 17 | {%- if collectd_settings.plugins.write_riemann.batchmaxsize is defined %} 18 | BatchMaxSize {{ collectd_settings.plugins.write_riemann.baxmaxsize }} 19 | {%- endif %} 20 | {%- if collectd_settings.plugins.write_riemann.storerates is defined and collectd_settings.plugins.write_riemann.storerates %} 21 | StoreRates {{ collectd_settings.plugins.write_riemann.storerates|lower }} 22 | {%- endif %} 23 | {%- if collectd_settings.plugins.write_riemann.alwaysappendds is defined and collectd_settings.plugins.write_riemann.alwaysappendds %} 24 | AlwaysAppendDS {{ collectd_settings.plugins.write_riemann.alwaysappendds|lower }} 25 | {%- endif %} 26 | {%- if collectd_settings.plugins.write_riemann.ttlfactor is defined %} 27 | TTLFactor {{ collectd_settings.plugins.write_riemann.ttlfactor }} 28 | {%- endif %} 29 | {%- if collectd_settings.plugins.write_riemann.notifications is defined %} 30 | Notifications {{ collectd_settings.plugins.write_riemann.notifications|lower }} 31 | {%- endif %} 32 | {%- if collectd_settings.plugins.write_riemann.checkthresholds is defined %} 33 | CheckThresholds {{ collectd_settings.plugins.write_riemann.checkthresholds|lower }} 34 | {%- endif %} 35 | {%- if collectd_settings.plugins.write_riemann.eventserviceprefix is defined %} 36 | EventServicePrefix {{ collectd_settings.plugins.write_riemann.eventserviceprefix }} 37 | {%- endif %} 38 | 39 | {%- if collectd_settings.plugins.write_riemann.tag is defined %} 40 | Tag "{{ collectd_settings.plugins.write_riemann.tag }}" 41 | {%- endif %} 42 | 43 | -------------------------------------------------------------------------------- /collectd/files/curl_json.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin curl_json 10 | 11 | 12 | {% for block, block_data in collectd_settings.plugins.curl_json.items() %} 13 | <{{ block }}> 14 | {%- if block_data.instance is defined %} 15 | Instance "{{ block_data.instance }}" 16 | {%- endif %} 17 | {%- if block_data.host is defined %} 18 | Host "{{ block_data.host }}" 19 | {%- endif %} 20 | {%- if block_data.interval is defined %} 21 | Interval {{ block_data.interval }} 22 | {%- endif %} 23 | {%- if block_data.user is defined %} 24 | User "{{ block_data.user }}" 25 | {%- endif %} 26 | {%- if block_data.password is defined %} 27 | Password "{{ block_data.password }}" 28 | {%- endif %} 29 | {%- if block_data.digest is defined %} 30 | Digest {{ block_data.digest | lower }} 31 | {%- endif %} 32 | {%- if block_data.verifypeer is defined %} 33 | VerifyPeer {{ block_data.verifypeer | lower }} 34 | {%- endif %} 35 | {%- if block_data.verifyhost is defined %} 36 | VerifyHost {{ block_data.verifyhost | lower }} 37 | {%- endif %} 38 | {%- if block_data.cacert is defined %} 39 | CACert "{{ block_data.cacert }}" 40 | {%- endif %} 41 | {%- if block_data.header is defined %} 42 | Header "{{ block_data.header }}" 43 | {%- endif %} 44 | {%- if block_data.post is defined %} 45 | Post "{{ block_data.post }}" 46 | {%- endif %} 47 | {%- if block_data.timeout is defined %} 48 | Timeout {{ block_data.timeout }} 49 | {%- endif %} 50 | {%- for key, key_data in block_data['keys'].items() %} 51 | 52 | Type "{{ key_data.type }}" 53 | {%- if key_data.interval is defined %} 54 | Interval {{ key_data.interval }} 55 | {%- endif %} 56 | {%- if key_data.instance is defined %} 57 | Instance {{ key_data.instance }} 58 | {%- endif %} 59 | 60 | {%- endfor %} 61 | 62 | {% endfor %} 63 | 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a packager 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .kitchen 49 | .kitchen.local.yml 50 | kitchen.local.yml 51 | junit-*.xml 52 | 53 | # Translations 54 | *.mo 55 | *.pot 56 | 57 | # Django stuff: 58 | *.log 59 | local_settings.py 60 | 61 | # Flask stuff: 62 | instance/ 63 | .webassets-cache 64 | 65 | # Scrapy stuff: 66 | .scrapy 67 | 68 | # Sphinx documentation 69 | docs/_build/ 70 | 71 | # PyBuilder 72 | target/ 73 | 74 | # Jupyter Notebook 75 | .ipynb_checkpoints 76 | 77 | # pyenv 78 | .python-version 79 | 80 | # celery beat schedule file 81 | celerybeat-schedule 82 | 83 | # SageMath parsed files 84 | *.sage.py 85 | 86 | # dotenv 87 | .env 88 | 89 | # virtualenv 90 | .venv 91 | venv/ 92 | ENV/ 93 | 94 | # visual studio 95 | .vs/ 96 | 97 | # Spyder project settings 98 | .spyderproject 99 | .spyproject 100 | 101 | # Rope project settings 102 | .ropeproject 103 | 104 | # mkdocs documentation 105 | /site 106 | 107 | # mypy 108 | .mypy_cache/ 109 | 110 | # Bundler 111 | .bundle/ 112 | 113 | # copied `.md` files used for conversion to `.rst` using `m2r` 114 | docs/*.md 115 | 116 | # Vim 117 | *.sw? 118 | 119 | ## Collected when centralising formulas (check and sort) 120 | # `collectd-formula` 121 | .pytest_cache/ 122 | /.idea/ 123 | Dockerfile.*_* 124 | ignore/ 125 | tmp/ 126 | 127 | # `salt-formula` -- Vagrant Specific files 128 | .vagrant 129 | top.sls 130 | !test/salt/pillar/top.sls 131 | 132 | # `suricata-formula` -- Platform binaries 133 | *.rpm 134 | *.deb 135 | -------------------------------------------------------------------------------- /collectd/files/curl_xml.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin curl_xml 10 | 11 | 12 | {% for block, block_data in collectd_settings.plugins.curl_xml.items() %} 13 | <{{ block }}> 14 | {%- if block_data.host is defined %} 15 | Host "{{ block_data.host }}" 16 | {%- endif %} 17 | {%- if block_data.instance is defined %} 18 | Instance "{{ block_data.instance }}" 19 | {%- endif %} 20 | {%- if block_data.namespace is defined %} 21 | Namespace "{{ block_data.namespace }}" 22 | {%- endif %} 23 | {%- if block_data.user is defined %} 24 | User "{{ block_data.user }}" 25 | {%- endif %} 26 | {%- if block_data.password is defined %} 27 | Password "{{ block_data.password }}" 28 | {%- endif %} 29 | {%- if block_data.digest is defined %} 30 | Digest {{ block_data.digest | lower }} 31 | {%- endif %} 32 | {%- if block_data.verifypeer is defined %} 33 | VerifyPeer {{ block_data.verifypeer | lower }} 34 | {%- endif %} 35 | {%- if block_data.verifyhost is defined %} 36 | VerifyHost {{ block_data.verifyhost | lower }} 37 | {%- endif %} 38 | {%- if block_data.cacert is defined %} 39 | CACert "{{ block_data.cacert }}" 40 | {%- endif %} 41 | {%- if block_data.header is defined %} 42 | Header "{{ block_data.header }}" 43 | {%- endif %} 44 | {%- if block_data.post is defined %} 45 | Post "{{ block_data.post }}" 46 | {%- endif %} 47 | {%- if block_data.timeout is defined %} 48 | Timeout {{ block_data.timeout }} 49 | {%- endif %} 50 | 51 | {%- for xpath in block_data['xpaths'] %} 52 | 53 | Type "{{ xpath.data.type }}" 54 | {%- if xpath.data.instance_prefix is defined %} 55 | InstancePrefix "{{ xpath.data.instance_prefix }}" 56 | {%- endif %} 57 | {%- if xpath.data.instance_from is defined %} 58 | InstanceFrom "{{ xpath.data.instance_from }}" 59 | {%- endif %} 60 | {%- if xpath.data.values_from is defined %} 61 | ValuesFrom {% for value in xpath.data.values_from %}"{{ value }}" {% endfor %} 62 | {%- endif %} 63 | 64 | {%- endfor %} 65 | 66 | {% endfor %} 67 | 68 | -------------------------------------------------------------------------------- /collectd/files/postgresql.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin postgresql 10 | 11 | 12 | {%- for query in collectd_settings.plugins.postgresql.queries %} 13 | 14 | {%- if query.statement is defined and query.statement %} 15 | Statement "{{ query.statement }}" 16 | {%- endif %} 17 | {%- if query.param is defined and query.param %} 18 | Param "{{ query.param }}" 19 | {%- endif %} 20 | {%- for result in query.results %} 21 | 22 | {%- if result.type is defined and result.type %} 23 | Type {{ result.type }} 24 | {%- endif %} 25 | {%- if result.instanceprefix is defined and result.instanceprefix %} 26 | InstancePrefix "{{ result.instanceprefix }}" 27 | {%- endif %} 28 | {%- if result.instancesfrom is defined and result.instancesfrom %} 29 | InstancesFrom "{{ result.instancesfrom }}" 30 | {%- endif %} 31 | {%- if result.valuesfrom is defined and result.valuesfrom %} 32 | ValuesFrom "{{ result.valuesfrom }}" 33 | {%- endif %} 34 | 35 | {%- endfor %} 36 | 37 | {%- endfor %} 38 | 39 | {%- for db in collectd_settings.plugins.postgresql.databases %} 40 | 41 | {%- if db.host is defined and db.host %} 42 | Host "{{ db.host }}" 43 | {%- endif %} 44 | {%- if db.port is defined and db.port %} 45 | Port "{{ db.port }}" 46 | {%- endif %} 47 | {%- if db.user is defined and db.user %} 48 | User "{{ db.user }}" 49 | {%- endif %} 50 | {%- if db.pass is defined and db.pass %} 51 | Password "{{ db.pass }}" 52 | {%- endif %} 53 | {%- if db.sslmode is defined and db.sslmode %} 54 | SSLMode "{{ db.sslmode }}" 55 | {%- endif %} 56 | {%- if db.krbsrvname is defined and db.krbsrvname %} 57 | KRBSrvName "{{ db.krbsrvname }}" 58 | {%- endif %} 59 | {%- if db.service is defined and db.service %} 60 | Service "{{ db.service }}" 61 | {%- endif %} 62 | {%- if db.interval is defined and db.interval %} 63 | Interval "{{ db.interval }}" 64 | {%- endif %} 65 | {%- for query in db.queries %} 66 | Query {{ query }} 67 | {%- endfor %} 68 | 69 | {%- endfor %} 70 | 71 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # See https://pre-commit.com for more information 5 | # See https://pre-commit.com/hooks.html for more hooks 6 | ci: 7 | autofix_commit_msg: | 8 | ci(pre-commit.ci): apply auto fixes from pre-commit.com hooks 9 | 10 | For more information, see https://pre-commit.ci 11 | autofix_prs: true 12 | autoupdate_branch: '' 13 | autoupdate_commit_msg: | 14 | ci(pre-commit.ci): perform `pre-commit` autoupdate 15 | autoupdate_schedule: quarterly 16 | skip: [] 17 | submodules: false 18 | default_stages: [commit] 19 | repos: 20 | - repo: https://github.com/dafyddj/commitlint-pre-commit-hook 21 | rev: v2.3.0 22 | hooks: 23 | - id: commitlint 24 | name: Check commit message using commitlint 25 | description: Lint commit message against @commitlint/config-conventional rules 26 | stages: [commit-msg] 27 | additional_dependencies: ['@commitlint/config-conventional@8.3.4'] 28 | - id: commitlint-travis 29 | stages: [manual] 30 | additional_dependencies: ['@commitlint/config-conventional@8.3.4'] 31 | always_run: true 32 | - repo: https://github.com/rubocop-hq/rubocop 33 | rev: v1.30.1 34 | hooks: 35 | - id: rubocop 36 | name: Check Ruby files with rubocop 37 | args: [--debug] 38 | always_run: true 39 | pass_filenames: false 40 | - repo: https://github.com/shellcheck-py/shellcheck-py 41 | rev: v0.8.0.4 42 | hooks: 43 | - id: shellcheck 44 | name: Check shell scripts with shellcheck 45 | files: ^.*\.(sh|bash|ksh)$ 46 | types: [] 47 | - repo: https://github.com/adrienverge/yamllint 48 | rev: v1.26.3 49 | hooks: 50 | - id: yamllint 51 | name: Check YAML syntax with yamllint 52 | args: [--strict, '.'] 53 | always_run: true 54 | pass_filenames: false 55 | - repo: https://github.com/warpnet/salt-lint 56 | rev: v0.8.0 57 | hooks: 58 | - id: salt-lint 59 | name: Check Salt files using salt-lint 60 | files: ^.*\.(sls|jinja|j2|tmpl|tst)$ 61 | - repo: https://github.com/myint/rstcheck 62 | rev: 3f929574 63 | hooks: 64 | - id: rstcheck 65 | name: Check reST files using rstcheck 66 | exclude: 'docs/CHANGELOG.rst' 67 | - repo: https://github.com/saltstack-formulas/mirrors-rst-lint 68 | rev: v1.3.2 69 | hooks: 70 | - id: rst-lint 71 | name: Check reST files using rst-lint 72 | exclude: | 73 | (?x)^( 74 | docs/CHANGELOG.rst| 75 | docs/TOFS_pattern.rst| 76 | )$ 77 | additional_dependencies: [pygments==2.9.0] 78 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners 2 | 3 | # SECTION: Owner(s) for everything in the repo, unless a later match takes precedence 4 | # ************************************************************************** 5 | # *** NO GLOBAL OWNER(S) SPECIFIED *** 6 | # *** Ideally this will be defined for a healthy, well-maintained repo *** 7 | # ************************************************************************** 8 | # FILE PATTERN OWNER(S) 9 | * @NONE 10 | 11 | # SECTION: Owner(s) for specific directories 12 | # FILE PATTERN OWNER(S) 13 | 14 | # SECTION: Owner(s) for files/directories related to `semantic-release` 15 | # FILE PATTERN OWNER(S) 16 | /.github/workflows/ @saltstack-formulas/ssf 17 | /bin/install-hooks @saltstack-formulas/ssf 18 | /bin/kitchen @saltstack-formulas/ssf 19 | /docs/AUTHORS.rst @saltstack-formulas/ssf 20 | /docs/CHANGELOG.rst @saltstack-formulas/ssf 21 | /docs/TOFS_pattern.rst @saltstack-formulas/ssf 22 | /*/_mapdata/ @saltstack-formulas/ssf 23 | /*/libsaltcli.jinja @saltstack-formulas/ssf 24 | /*/libtofs.jinja @saltstack-formulas/ssf 25 | /test/integration/**/_mapdata.rb @saltstack-formulas/ssf 26 | /test/integration/**/libraries/system.rb @saltstack-formulas/ssf 27 | /test/integration/**/inspec.yml @saltstack-formulas/ssf 28 | /test/integration/**/README.md @saltstack-formulas/ssf 29 | /test/salt/pillar/top.sls @saltstack-formulas/ssf 30 | /.gitignore @saltstack-formulas/ssf 31 | /.cirrus.yml @saltstack-formulas/ssf 32 | /.gitlab-ci.yml @saltstack-formulas/ssf 33 | /.pre-commit-config.yaml @saltstack-formulas/ssf 34 | /.rstcheck.cfg @saltstack-formulas/ssf 35 | /.rubocop.yml @saltstack-formulas/ssf 36 | /.salt-lint @saltstack-formulas/ssf 37 | /.travis.yml @saltstack-formulas/ssf 38 | /.yamllint @saltstack-formulas/ssf 39 | /AUTHORS.md @saltstack-formulas/ssf 40 | /CHANGELOG.md @saltstack-formulas/ssf 41 | /CODEOWNERS @saltstack-formulas/ssf 42 | /commitlint.config.js @saltstack-formulas/ssf 43 | /FORMULA @saltstack-formulas/ssf 44 | /Gemfile @saltstack-formulas/ssf 45 | /Gemfile.lock @saltstack-formulas/ssf 46 | /kitchen.yml @saltstack-formulas/ssf 47 | /kitchen.vagrant.yml @saltstack-formulas/ssf 48 | /kitchen.windows.yml @saltstack-formulas/ssf 49 | /pre-commit_semantic-release.sh @saltstack-formulas/ssf 50 | /release-rules.js @saltstack-formulas/ssf 51 | /release.config.js @saltstack-formulas/ssf 52 | 53 | # SECTION: Owner(s) for specific files 54 | # FILE PATTERN OWNER(S) 55 | -------------------------------------------------------------------------------- /release.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | branch: 'master', 3 | repositoryUrl: 'https://github.com/saltstack-formulas/collectd-formula', 4 | plugins: [ 5 | ['@semantic-release/commit-analyzer', { 6 | preset: 'angular', 7 | releaseRules: './release-rules.js', 8 | }], 9 | '@semantic-release/release-notes-generator', 10 | ['@semantic-release/changelog', { 11 | changelogFile: 'CHANGELOG.md', 12 | changelogTitle: '# Changelog', 13 | }], 14 | ['@semantic-release/exec', { 15 | prepareCmd: 'sh ./pre-commit_semantic-release.sh ${nextRelease.version}', 16 | }], 17 | ['@semantic-release/git', { 18 | assets: ['*.md', 'docs/*.rst', 'FORMULA'], 19 | }], 20 | '@semantic-release/github', 21 | ], 22 | generateNotes: { 23 | preset: 'angular', 24 | writerOpts: { 25 | // Required due to upstream bug preventing all types being displayed. 26 | // Bug: https://github.com/conventional-changelog/conventional-changelog/issues/317 27 | // Fix: https://github.com/conventional-changelog/conventional-changelog/pull/410 28 | transform: (commit, context) => { 29 | const issues = [] 30 | 31 | commit.notes.forEach(note => { 32 | note.title = `BREAKING CHANGES` 33 | }) 34 | 35 | // NOTE: Any changes here must be reflected in `CONTRIBUTING.md`. 36 | if (commit.type === `feat`) { 37 | commit.type = `Features` 38 | } else if (commit.type === `fix`) { 39 | commit.type = `Bug Fixes` 40 | } else if (commit.type === `perf`) { 41 | commit.type = `Performance Improvements` 42 | } else if (commit.type === `revert`) { 43 | commit.type = `Reverts` 44 | } else if (commit.type === `docs`) { 45 | commit.type = `Documentation` 46 | } else if (commit.type === `style`) { 47 | commit.type = `Styles` 48 | } else if (commit.type === `refactor`) { 49 | commit.type = `Code Refactoring` 50 | } else if (commit.type === `test`) { 51 | commit.type = `Tests` 52 | } else if (commit.type === `build`) { 53 | commit.type = `Build System` 54 | // } else if (commit.type === `chore`) { 55 | // commit.type = `Maintenance` 56 | } else if (commit.type === `ci`) { 57 | commit.type = `Continuous Integration` 58 | } else { 59 | return 60 | } 61 | 62 | if (commit.scope === `*`) { 63 | commit.scope = `` 64 | } 65 | 66 | if (typeof commit.hash === `string`) { 67 | commit.shortHash = commit.hash.substring(0, 7) 68 | } 69 | 70 | if (typeof commit.subject === `string`) { 71 | let url = context.repository 72 | ? `${context.host}/${context.owner}/${context.repository}` 73 | : context.repoUrl 74 | if (url) { 75 | url = `${url}/issues/` 76 | // Issue URLs. 77 | commit.subject = commit.subject.replace(/#([0-9]+)/g, (_, issue) => { 78 | issues.push(issue) 79 | return `[#${issue}](${url}${issue})` 80 | }) 81 | } 82 | if (context.host) { 83 | // User URLs. 84 | commit.subject = commit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g, (_, username) => { 85 | if (username.includes('/')) { 86 | return `@${username}` 87 | } 88 | 89 | return `[@${username}](${context.host}/${username})` 90 | }) 91 | } 92 | } 93 | 94 | // remove references that already appear in the subject 95 | commit.references = commit.references.filter(reference => { 96 | if (issues.indexOf(reference.issue) === -1) { 97 | return true 98 | } 99 | 100 | return false 101 | }) 102 | 103 | return commit 104 | }, 105 | }, 106 | }, 107 | }; 108 | -------------------------------------------------------------------------------- /test/integration/share/libraries/system.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # system.rb -- InSpec resources for system values 4 | # Author: Daniel Dehennin 5 | # Copyright (C) 2020 Daniel Dehennin 6 | 7 | # rubocop:disable Metrics/ClassLength 8 | class SystemResource < Inspec.resource(1) 9 | name 'system' 10 | 11 | attr_reader :platform 12 | 13 | def initialize 14 | super 15 | @platform = build_platform 16 | end 17 | 18 | private 19 | 20 | def build_platform 21 | { 22 | family: build_platform_family, 23 | name: build_platform_name, 24 | release: build_platform_release, 25 | finger: build_platform_finger, 26 | codename: build_platform_codename 27 | } 28 | end 29 | 30 | def build_platform_family 31 | case inspec.platform[:name] 32 | when 'arch', 'gentoo' 33 | inspec.platform[:name] 34 | else 35 | inspec.platform[:family] 36 | end 37 | end 38 | 39 | def build_platform_name 40 | case inspec.platform[:name] 41 | when 'amazon', 'oracle', 'rocky' 42 | "#{inspec.platform[:name]}linux" 43 | when /^windows_/ 44 | inspec.platform[:family] 45 | else 46 | inspec.platform[:name] 47 | end 48 | end 49 | 50 | # rubocop:disable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity 51 | def build_platform_release 52 | case inspec.platform[:name] 53 | when 'amazon' 54 | # `2018` relase is named `1` in `kitchen.yml` 55 | inspec.platform[:release].gsub(/2018.*/, '1') 56 | when 'arch' 57 | 'base-latest' 58 | when 'gentoo' 59 | "#{inspec.platform[:release].split('.')[0]}-#{derive_gentoo_init_system}" 60 | when 'mac_os_x' 61 | inspec.command('sw_vers -productVersion').stdout.to_s 62 | when 'opensuse' 63 | # rubocop:disable Style/NumericLiterals,Layout/LineLength 64 | inspec.platform[:release].to_i > 20210101 ? 'tumbleweed' : inspec.platform[:release] 65 | # rubocop:enable Style/NumericLiterals,Layout/LineLength 66 | when 'windows_8.1_pro' 67 | '8.1' 68 | when 'windows_server_2022_datacenter' 69 | '2022-server' 70 | when 'windows_server_2019_datacenter' 71 | '2019-server' 72 | when 'windows_server_2016_datacenter' 73 | '2016-server' 74 | else 75 | inspec.platform[:release] 76 | end 77 | end 78 | # rubocop:enable Metrics/MethodLength,Metrics/AbcSize,Metrics/CyclomaticComplexity 79 | 80 | def derive_gentoo_init_system 81 | inspec.command('systemctl').exist? ? 'sysd' : 'sysv' 82 | end 83 | 84 | def build_platform_finger 85 | "#{build_platform_name}-#{build_finger_release}" 86 | end 87 | 88 | def build_finger_release 89 | case inspec.platform[:name] 90 | when 'ubuntu' 91 | build_platform_release.split('.').slice(0, 2).join('.') 92 | else 93 | build_platform_release.split('.')[0] 94 | end 95 | end 96 | 97 | # rubocop:disable Metrics/MethodLength,Metrics/CyclomaticComplexity 98 | def build_platform_codename 99 | case build_platform_finger 100 | when 'ubuntu-22.04' 101 | 'jammy' 102 | when 'ubuntu-20.04' 103 | 'focal' 104 | when 'ubuntu-18.04' 105 | 'bionic' 106 | when 'debian-11' 107 | 'bullseye' 108 | when 'debian-10' 109 | 'buster' 110 | when 'debian-9' 111 | 'stretch' 112 | when 'almalinux-8' 113 | "AlmaLinux #{build_platform_release} (Arctic Sphynx)" 114 | when 'amazonlinux-2' 115 | 'Amazon Linux 2' 116 | when 'arch-base-latest' 117 | 'Arch Linux' 118 | when 'centos-7' 119 | 'CentOS Linux 7 (Core)' 120 | when 'centos-8' 121 | 'CentOS Stream 8' 122 | when 'opensuse-tumbleweed' 123 | 'openSUSE Tumbleweed' 124 | when 'opensuse-15' 125 | "openSUSE Leap #{build_platform_release}" 126 | when 'oraclelinux-8', 'oraclelinux-7' 127 | "Oracle Linux Server #{build_platform_release}" 128 | when 'gentoo-2-sysd', 'gentoo-2-sysv' 129 | 'Gentoo/Linux' 130 | when 'rockylinux-8' 131 | "Rocky Linux #{build_platform_release} (Green Obsidian)" 132 | else 133 | '' 134 | end 135 | end 136 | # rubocop:enable Metrics/MethodLength,Metrics/CyclomaticComplexity 137 | end 138 | # rubocop:enable Metrics/ClassLength 139 | -------------------------------------------------------------------------------- /collectd/files/java.conf: -------------------------------------------------------------------------------- 1 | {%- from "collectd/map.jinja" import collectd_settings with context %} 2 | # 3 | # DO NOT EDIT 4 | # 5 | # This file is managed by salt via {{ source }} 6 | # Modify the config that generates this file instead 7 | # 8 | 9 | LoadPlugin java 10 | 11 | 12 | 13 | {%- if collectd_settings.plugins.java.jvmargs is defined %} 14 | {%- for jvmarg in collectd_settings.plugins.java.jvmargs %} 15 | JVMARG "{{ jvmarg }}" 16 | {%- endfor %} 17 | {%- endif %} 18 | 19 | LoadPlugin "org.collectd.java.GenericJMX" 20 | 21 | 22 | ################ 23 | # MBean blocks # 24 | ################ 25 | # Number of classes being loaded. 26 | 27 | ObjectName "java.lang:type=ClassLoading" 28 | #InstancePrefix "" 29 | #InstanceFrom "" 30 | 31 | 32 | Type "gauge" 33 | InstancePrefix "loaded_classes" 34 | #InstanceFrom "" 35 | Table false 36 | Attribute "LoadedClassCount" 37 | 38 | 39 | 40 | # Time spent by the JVM compiling or optimizing. 41 | 42 | ObjectName "java.lang:type=Compilation" 43 | #InstancePrefix "" 44 | #InstanceFrom "" 45 | 46 | 47 | Type "total_time_in_ms" 48 | InstancePrefix "compilation_time" 49 | #InstanceFrom "" 50 | Table false 51 | Attribute "TotalCompilationTime" 52 | 53 | 54 | 55 | # Garbage collector information 56 | 57 | ObjectName "java.lang:type=GarbageCollector,*" 58 | InstancePrefix "gc-" 59 | InstanceFrom "name" 60 | 61 | 62 | Type "invocations" 63 | #InstancePrefix "" 64 | #InstanceFrom "" 65 | Table false 66 | Attribute "CollectionCount" 67 | 68 | 69 | 70 | Type "total_time_in_ms" 71 | InstancePrefix "collection_time" 72 | #InstanceFrom "" 73 | Table false 74 | Attribute "CollectionTime" 75 | 76 | 77 | # # Not that useful, therefore commented out. 78 | # 79 | # Type "threads" 80 | # #InstancePrefix "" 81 | # #InstanceFrom "" 82 | # Table false 83 | # # Demonstration how to access composite types 84 | # Attribute "LastGcInfo.GcThreadCount" 85 | # 86 | 87 | 88 | ###################################### 89 | # Define the "jmx_memory" type as: # 90 | # jmx_memory value:GAUGE:0:U # 91 | # See types.db(5) for details. # 92 | ###################################### 93 | 94 | # Generic heap/nonheap memory usage. 95 | 96 | ObjectName "java.lang:type=Memory" 97 | #InstanceFrom "" 98 | InstancePrefix "memory" 99 | 100 | # Creates four values: committed, init, max, used 101 | 102 | Type "jmx_memory" 103 | #InstancePrefix "" 104 | #InstanceFrom "" 105 | Table true 106 | Attribute "HeapMemoryUsage" 107 | InstancePrefix "heap-" 108 | 109 | 110 | # Creates four values: committed, init, max, used 111 | 112 | Type "jmx_memory" 113 | #InstancePrefix "" 114 | #InstanceFrom "" 115 | Table true 116 | Attribute "NonHeapMemoryUsage" 117 | InstancePrefix "nonheap-" 118 | 119 | 120 | 121 | # Memory usage by memory pool. 122 | 123 | ObjectName "java.lang:type=MemoryPool,*" 124 | InstancePrefix "memory_pool-" 125 | InstanceFrom "name" 126 | 127 | 128 | Type "jmx_memory" 129 | #InstancePrefix "" 130 | #InstanceFrom "" 131 | Table true 132 | Attribute "Usage" 133 | 134 | 135 | 136 | {% if collectd_settings.plugins.java.tomcat is defined and collectd_settings.plugins.java.tomcat %} 137 | ### MBeans by Catalina / Tomcat ### 138 | # The global request processor (summary for each request processor) 139 | 140 | ObjectName "Catalina:type=Manager,*" 141 | InstancePrefix "sessions" 142 | InstanceFrom "context" 143 | 144 | 145 | Type "total_sessions" 146 | InstancePrefix "global" 147 | #InstanceFrom "" 148 | Table false 149 | Attribute "activeSessions" 150 | 151 | 152 | 153 | 154 | ObjectName "Catalina:type=GlobalRequestProcessor,*" 155 | InstancePrefix "request_processor" 156 | InstanceFrom "name" 157 | 158 | 159 | Type "io_octets" 160 | InstancePrefix "global" 161 | #InstanceFrom "" 162 | Table false 163 | Attribute "bytesReceived" 164 | Attribute "bytesSent" 165 | 166 | 167 | 168 | Type "total_requests" 169 | InstancePrefix "global" 170 | #InstanceFrom "" 171 | Table false 172 | Attribute "requestCount" 173 | 174 | 175 | 176 | Type "total_time_in_ms" 177 | InstancePrefix "global-processing" 178 | #InstanceFrom "" 179 | Table false 180 | Attribute "processingTime" 181 | 182 | 183 | 184 | # Thread pool 185 | 186 | ObjectName "Catalina:type=ThreadPool,*" 187 | InstancePrefix "request_processor" 188 | InstanceFrom "name" 189 | 190 | 191 | Type "threads" 192 | InstancePrefix "total" 193 | #InstanceFrom "" 194 | Table false 195 | Attribute "currentThreadCount" 196 | 197 | 198 | 199 | Type "threads" 200 | InstancePrefix "running" 201 | #InstanceFrom "" 202 | Table false 203 | Attribute "currentThreadsBusy" 204 | 205 | 206 | 207 | 208 | ObjectName "Catalina:type=Executor,*" 209 | InstancePrefix "executor" 210 | 211 | 212 | Type "threads" 213 | InstancePrefix "active" 214 | Table false 215 | Attribute "activeCount" 216 | 217 | 218 | 219 | Type "threads" 220 | InstancePrefix "poolSize" 221 | Table false 222 | Attribute "poolSize" 223 | 224 | 225 | 226 | {% endif %} 227 | ##################### 228 | # Connection blocks # 229 | ##################### 230 | 231 | ServiceURL "service:jmx:rmi:///jndi/rmi://{{ collectd_settings.plugins.java.host }}:{{ collectd_settings.plugins.java.port }}/jmxrmi" 232 | {%- if collectd_settings.plugins.java.user is defined and collectd_settings.plugins.java.user %} 233 | User "{{ user }}" 234 | {%- endif %} 235 | {%- if collectd_settings.plugins.java.password is defined and collectd_settings.plugins.java.password %} 236 | Password "{{ pass }}" 237 | {%- endif %} 238 | Host "{{ collectd_settings.plugins.java.host }}" 239 | Collect "classes" 240 | Collect "compilation" 241 | Collect "garbage_collector" 242 | Collect "memory" 243 | Collect "memory_pool" 244 | {% if collectd_settings.plugins.java.tomcat is defined and collectd_settings.plugins.java.tomcat %} 245 | Collect "catalina/manager" 246 | Collect "catalina/global_request_processor" 247 | Collect "catalina/thread_pool" 248 | Collect "catalina/executor" 249 | {%- endif %} 250 | 251 | 252 | 253 | 254 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | ################################################################################ 5 | # NOTE: This file is UNMAINTAINED; it is provided for references purposes only. 6 | # No guarantees are tendered that this structure will work after 2020. 7 | ################################################################################ 8 | # * https://en.wikipedia.org/wiki/Travis_CI: 9 | # - "... free open-source plans were removed in [sic] the end of 2020" 10 | # - https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing 11 | # - https://ropensci.org/technotes/2020/11/19/moving-away-travis/ 12 | ################################################################################ 13 | ## Machine config 14 | os: 'linux' 15 | arch: 'amd64' 16 | dist: 'bionic' 17 | version: '~> 1.0' 18 | 19 | ## Language and cache config 20 | language: 'ruby' 21 | cache: 'bundler' 22 | 23 | ## Services config 24 | services: 25 | - docker 26 | 27 | ## Script to run for the test stage 28 | script: 29 | - bin/kitchen verify "${INSTANCE}" 30 | 31 | ## Stages and jobs matrix 32 | stages: 33 | - test 34 | # # As part of the switch away from Travis CI, ensure that the `release` stage 35 | # # is not run inadvertently 36 | # - name: 'release' 37 | # if: 'branch = master AND type != pull_request' 38 | jobs: 39 | include: 40 | ## Define the test stage that runs the linters (and testing matrix, if applicable) 41 | 42 | # Run all of the linters in a single job 43 | - language: 'node_js' 44 | node_js: 'lts/*' 45 | env: 'Lint' 46 | name: 'Lint: salt-lint, yamllint, rubocop, shellcheck & commitlint' 47 | before_install: 'skip' 48 | script: 49 | # Install and run `salt-lint` 50 | - pip install --user salt-lint 51 | - git ls-files -- '*.sls' '*.jinja' '*.j2' '*.tmpl' '*.tst' 52 | | xargs salt-lint 53 | # Install and run `yamllint` 54 | # Need at least `v1.17.0` for the `yaml-files` setting 55 | - pip install --user yamllint>=1.17.0 56 | - yamllint -s . 57 | # Install and run `rubocop` 58 | - gem install rubocop 59 | - rubocop -d 60 | # Run `shellcheck` (already pre-installed in Travis) 61 | - shellcheck --version 62 | - git ls-files -- '*.sh' '*.bash' '*.ksh' 63 | | xargs shellcheck 64 | # Install and run `commitlint` 65 | - npm i -D @commitlint/config-conventional 66 | @commitlint/travis-cli 67 | - commitlint-travis 68 | 69 | # Run `pre-commit` linters in a single job 70 | - language: 'python' 71 | env: 'Lint_pre-commit' 72 | name: 'Lint: pre-commit' 73 | before_install: 'skip' 74 | cache: 75 | directories: 76 | - $HOME/.cache/pre-commit 77 | script: 78 | # Install and run `pre-commit` 79 | - pip install pre-commit==2.7.1 80 | - pre-commit run --all-files --color always --verbose 81 | - pre-commit run --color always --hook-stage manual --verbose commitlint-travis 82 | 83 | ## Define the rest of the matrix based on Kitchen testing 84 | # Make sure the instances listed below match up with 85 | # the `platforms` defined in `kitchen.yml` 86 | # - env: INSTANCE=default-debian-11-tiamat-py3 87 | # - env: INSTANCE=default-debian-10-tiamat-py3 88 | # - env: INSTANCE=default-debian-9-tiamat-py3 89 | # - env: INSTANCE=default-ubuntu-2204-tiamat-py3 90 | # - env: INSTANCE=default-ubuntu-2004-tiamat-py3 91 | # - env: INSTANCE=default-ubuntu-1804-tiamat-py3 92 | # - env: INSTANCE=default-centos-stream8-tiamat-py3 93 | # - env: INSTANCE=default-centos-7-tiamat-py3 94 | # - env: INSTANCE=default-amazonlinux-2-tiamat-py3 95 | # - env: INSTANCE=default-oraclelinux-8-tiamat-py3 96 | # - env: INSTANCE=default-oraclelinux-7-tiamat-py3 97 | # - env: INSTANCE=default-almalinux-8-tiamat-py3 98 | # - env: INSTANCE=default-rockylinux-8-tiamat-py3 99 | - env: INSTANCE=default-debian-11-master-py3 100 | - env: INSTANCE=default-debian-10-master-py3 101 | - env: INSTANCE=default-debian-9-master-py3 102 | - env: INSTANCE=default-ubuntu-2204-master-py3 103 | - env: INSTANCE=default-ubuntu-2004-master-py3 104 | - env: INSTANCE=default-ubuntu-1804-master-py3 105 | - env: INSTANCE=default-centos-stream8-master-py3 106 | - env: INSTANCE=default-centos-7-master-py3 107 | - env: INSTANCE=default-fedora-36-master-py3 108 | - env: INSTANCE=default-fedora-35-master-py3 109 | - env: INSTANCE=default-opensuse-leap-153-master-py3 110 | - env: INSTANCE=default-opensuse-tmbl-latest-master-py3 111 | # - env: INSTANCE=default-amazonlinux-2-master-py3 112 | - env: INSTANCE=default-oraclelinux-8-master-py3 113 | - env: INSTANCE=default-oraclelinux-7-master-py3 114 | # - env: INSTANCE=default-arch-base-latest-master-py3 115 | # - env: INSTANCE=default-gentoo-stage3-latest-master-py3 116 | # - env: INSTANCE=default-gentoo-stage3-systemd-master-py3 117 | - env: INSTANCE=default-almalinux-8-master-py3 118 | - env: INSTANCE=default-rockylinux-8-master-py3 119 | # - env: INSTANCE=default-debian-11-3004-1-py3 120 | # - env: INSTANCE=default-debian-10-3004-1-py3 121 | # - env: INSTANCE=default-debian-9-3004-1-py3 122 | # - env: INSTANCE=default-ubuntu-2204-3004-1-py3 123 | # - env: INSTANCE=default-ubuntu-2004-3004-1-py3 124 | # - env: INSTANCE=default-ubuntu-1804-3004-1-py3 125 | # - env: INSTANCE=default-centos-stream8-3004-1-py3 126 | # - env: INSTANCE=default-centos-7-3004-1-py3 127 | # - env: INSTANCE=default-fedora-36-3004-1-py3 128 | # - env: INSTANCE=default-fedora-35-3004-1-py3 129 | # - env: INSTANCE=default-amazonlinux-2-3004-1-py3 130 | # - env: INSTANCE=default-oraclelinux-8-3004-1-py3 131 | # - env: INSTANCE=default-oraclelinux-7-3004-1-py3 132 | # - env: INSTANCE=default-arch-base-latest-3004-1-py3 133 | # - env: INSTANCE=default-gentoo-stage3-latest-3004-1-py3 134 | # - env: INSTANCE=default-gentoo-stage3-systemd-3004-1-py3 135 | # - env: INSTANCE=default-almalinux-8-3004-1-py3 136 | # - env: INSTANCE=default-rockylinux-8-3004-1-py3 137 | # - env: INSTANCE=default-opensuse-leap-153-3004-0-py3 138 | # - env: INSTANCE=default-opensuse-tmbl-latest-3004-0-py3 139 | # - env: INSTANCE=default-debian-10-3003-4-py3 140 | # - env: INSTANCE=default-debian-9-3003-4-py3 141 | # - env: INSTANCE=default-ubuntu-2004-3003-4-py3 142 | # - env: INSTANCE=default-ubuntu-1804-3003-4-py3 143 | # - env: INSTANCE=default-centos-stream8-3003-4-py3 144 | # - env: INSTANCE=default-centos-7-3003-4-py3 145 | # - env: INSTANCE=default-amazonlinux-2-3003-4-py3 146 | # - env: INSTANCE=default-oraclelinux-8-3003-4-py3 147 | # - env: INSTANCE=default-oraclelinux-7-3003-4-py3 148 | # - env: INSTANCE=default-almalinux-8-3003-4-py3 149 | 150 | ## Define the release stage that runs `semantic-release` 151 | - stage: 'release' 152 | language: 'node_js' 153 | node_js: 'lts/*' 154 | env: 'Release' 155 | name: 'Run semantic-release inc. file updates to AUTHORS, CHANGELOG & FORMULA' 156 | before_install: 'skip' 157 | script: 158 | # Update `AUTHORS.md` 159 | - export MAINTAINER_TOKEN=${GH_TOKEN} 160 | - go get github.com/myii/maintainer 161 | - maintainer contributor 162 | 163 | # Install all dependencies required for `semantic-release` 164 | - npm i -D @semantic-release/changelog@3 165 | @semantic-release/exec@3 166 | @semantic-release/git@7 167 | deploy: 168 | provider: 'script' 169 | # Opt-in to `dpl v2` to complete the Travis build config validation (beta) 170 | # * https://docs.travis-ci.com/user/build-config-validation 171 | # Deprecated `skip_cleanup` can now be avoided, `cleanup: false` is by default 172 | edge: true 173 | # Run `semantic-release` 174 | script: 'npx semantic-release@15.14' 175 | 176 | # Notification options: `always`, `never` or `change` 177 | notifications: 178 | webhooks: 179 | if: 'repo = saltstack-formulas/collectd-formula' 180 | urls: 181 | - https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Fcollectd-formula&ignore_pull_requests=true 182 | on_success: always # default: always 183 | on_failure: always # default: always 184 | on_start: always # default: never 185 | on_cancel: always # default: always 186 | on_error: always # default: always 187 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Authors 2 | 3 | This list is sorted by the number of commits per contributor in _descending_ order. 4 | 5 | Avatar|Contributor|Contributions 6 | :-:|---|:-: 7 | @myii|[@myii](https://github.com/myii)|146 8 | @fintanmm|[@fintanmm](https://github.com/fintanmm)|38 9 | @nmadhok|[@nmadhok](https://github.com/nmadhok)|26 10 | @wwentland|[@wwentland](https://github.com/wwentland)|22 11 | @genuss|[@genuss](https://github.com/genuss)|22 12 | @daks|[@daks](https://github.com/daks)|14 13 | @puneetk|[@puneetk](https://github.com/puneetk)|12 14 | @gravyboat|[@gravyboat](https://github.com/gravyboat)|12 15 | @n-rodriguez|[@n-rodriguez](https://github.com/n-rodriguez)|10 16 | @aboe76|[@aboe76](https://github.com/aboe76)|9 17 | @tomasfejfar|[@tomasfejfar](https://github.com/tomasfejfar)|8 18 | @kpostrup|[@kpostrup](https://github.com/kpostrup)|6 19 | @johnkeates|[@johnkeates](https://github.com/johnkeates)|5 20 | @iggy|[@iggy](https://github.com/iggy)|4 21 | @evvers|[@evvers](https://github.com/evvers)|4 22 | @junovitch|[@junovitch](https://github.com/junovitch)|4 23 | @whiteinge|[@whiteinge](https://github.com/whiteinge)|4 24 | @grumpydude|[@grumpydude](https://github.com/grumpydude)|4 25 | @bogdanr|[@bogdanr](https://github.com/bogdanr)|4 26 | @bdols|[@bdols](https://github.com/bdols)|3 27 | @dafyddj|[@dafyddj](https://github.com/dafyddj)|3 28 | @dosercz|[@dosercz](https://github.com/dosercz)|3 29 | @multani|[@multani](https://github.com/multani)|3 30 | @puckel|[@puckel](https://github.com/puckel)|3 31 | @hexedpackets|[@hexedpackets](https://github.com/hexedpackets)|3 32 | @aanriot|[@aanriot](https://github.com/aanriot)|2 33 | @colekowalski|[@colekowalski](https://github.com/colekowalski)|2 34 | @javierbertoli|[@javierbertoli](https://github.com/javierbertoli)|2 35 | @sawasy|[@sawasy](https://github.com/sawasy)|2 36 | @jettero|[@jettero](https://github.com/jettero)|2 37 | @roedie|[@roedie](https://github.com/roedie)|2 38 | @badele|[@badele](https://github.com/badele)|2 39 | @kaidokert|[@kaidokert](https://github.com/kaidokert)|2 40 | @dsala-it|[@dsala-it](https://github.com/dsala-it)|1 41 | @andreaspe|[@andreaspe](https://github.com/andreaspe)|1 42 | @Jokipii|[@Jokipii](https://github.com/Jokipii)|1 43 | @cmclaughlin|[@cmclaughlin](https://github.com/cmclaughlin)|1 44 | @ciprianc|[@ciprianc](https://github.com/ciprianc)|1 45 | @baby-gnu|[@baby-gnu](https://github.com/baby-gnu)|1 46 | @filipposc5|[@filipposc5](https://github.com/filipposc5)|1 47 | @kluzas|[@kluzas](https://github.com/kluzas)|1 48 | @duk3luk3|[@duk3luk3](https://github.com/duk3luk3)|1 49 | @magenbrot|[@magenbrot](https://github.com/magenbrot)|1 50 | @sroegner|[@sroegner](https://github.com/sroegner)|1 51 | @SJern|[@SJern](https://github.com/SJern)|1 52 | @sielaq|[@sielaq](https://github.com/sielaq)|1 53 | @hwhesselink|[@hwhesselink](https://github.com/hwhesselink)|1 54 | @mattLLVW|[@mattLLVW](https://github.com/mattLLVW)|1 55 | @noelmcloughlin|[@noelmcloughlin](https://github.com/noelmcloughlin)|1 56 | 57 | --- 58 | 59 | Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2022-10-10. 60 | -------------------------------------------------------------------------------- /docs/README.rst: -------------------------------------------------------------------------------- 1 | collectd-formula 2 | ================ 3 | 4 | |img_travis| |docs| |img_sr| 5 | 6 | .. |img_travis| image:: https://travis-ci.com/saltstack-formulas/collectd-formula.svg?branch=master 7 | :alt: Travis CI Build Status 8 | :scale: 100% 9 | :target: https://travis-ci.com/saltstack-formulas/collectd-formula 10 | .. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest 11 | :alt: Documentation Status 12 | :scale: 100% 13 | :target: https://collectd-formula.readthedocs.io/en/latest/?badge=latest 14 | .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg 15 | :alt: Semantic Release 16 | :scale: 100% 17 | :target: https://github.com/semantic-release/semantic-release 18 | 19 | A SaltStack formula that installs and configures collectd. The system statistics collection daemon. 20 | start on a new formula and it serves as a style guide. 21 | 22 | .. contents:: **Table of Contents** 23 | 24 | General notes 25 | ------------- 26 | 27 | See the full `SaltStack Formulas installation and usage instructions 28 | `_. 29 | 30 | If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section 31 | `_. 32 | 33 | If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``, 34 | which contains the currently released version. This formula is versioned according to `Semantic Versioning `_. 35 | 36 | See `Formula Versioning Section `_ for more details. 37 | 38 | Contributing to this repo 39 | ------------------------- 40 | 41 | **Commit message formatting is significant!!** 42 | 43 | Please see `How to contribute `_ for more details. 44 | 45 | Available states 46 | ---------------- 47 | 48 | .. contents:: 49 | :local: 50 | 51 | ``collectd`` 52 | ------------ 53 | 54 | *Meta-state (This is a state that includes other states)*. 55 | 56 | Installs the collectd package, and starts the associated collectd service. 57 | 58 | ``collectd.service`` 59 | ^^^^^^^^^^^^^^^^^^^^ 60 | 61 | Metastate used to include service into respective plugin states, included in ``collectd`` state. 62 | 63 | ``collectd.apache`` 64 | ^^^^^^^^^^^^^^^^^^^ 65 | 66 | Enables and configures the `apache plugin `_. 67 | All common parameters are supported, so pass something like :: 68 | 69 | apache: 70 | instances: 71 | - name: 'human-readable-name' 72 | url: 'http://localhost/server-status?auto' 73 | user: 'user' 74 | pass: 'your-password' 75 | 76 | Only ``name`` and ``url`` are required. 77 | 78 | ``collectd.bind`` 79 | ^^^^^^^^^^^^^^^^^ 80 | 81 | Enables and configures the bind plugin. 82 | 83 | ``collectd.dbi`` 84 | ^^^^^^^^^^^^^^^^ 85 | 86 | Enables and configures the dbi plugin. It's used for quering databases with libdbi. 87 | Refer to `collectd.conf(5) `_ manpage for details 88 | and ``pillar.example`` to see how values should be populated. 89 | 90 | Beware this plugin may need additional packages installed on your system to run properly. 91 | 92 | ``collectd.csv`` 93 | ^^^^^^^^^^^^^^^^ 94 | 95 | Enables and configures the csv write plugin. 96 | 97 | ``collectd.df`` 98 | ^^^^^^^^^^^^^^^ 99 | 100 | Enables and configures the df plugin. 101 | 102 | ``collectd.disk`` 103 | ^^^^^^^^^^^^^^^^^ 104 | 105 | Enables and configures the disk plugin. 106 | 107 | ``collectd.elasticsearch`` 108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 109 | 110 | Enables and configures the `elasticsearch plugin `_ 111 | 112 | ``collectd.ethstat`` 113 | ^^^^^^^^^^^^^^^^^^^^ 114 | 115 | Enables and configures the ethstat plugin (please note `there is a possible bug in the debian package `_). 116 | 117 | ``collectd.interface`` 118 | ^^^^^^^^^^^^^^^^^^^^^^ 119 | 120 | Enables and configures the interface plugin. 121 | 122 | ``collectd.java`` 123 | ^^^^^^^^^^^^^^^^^ 124 | 125 | Enables and configures the java plugin. If enabled it will also collect tomcat catalina metrics. 126 | 127 | Requires the installation of JDK. 128 | 129 | Pillar values used under `collectd.plugins.java`, an example :: 130 | 131 | 132 | collectd: 133 | plugins: 134 | java: 135 | host: localhost 136 | port: 39999 137 | user: 'someuser' (optional) 138 | group: 'someuser' (optional) 139 | lib: '/some/file' (optional) 140 | tomcat: true (optional) 141 | 142 | 143 | ``collectd.logfile`` 144 | ^^^^^^^^^^^^^^^^^^^^ 145 | 146 | Enables and configures the logfile plugin. 147 | 148 | ``collectd.modules`` 149 | ^^^^^^^^^^^^^^^^^^^^ 150 | 151 | This state helps distributing collectd external modules written in various languages 152 | (see `python `_ or 153 | `perl `_ for example). 154 | 155 | Sample usage: 156 | 157 | * Include ``collectd.modules`` in your topfile. 158 | * Create collectd/modules/files folder in your states. 159 | * Put modules you need in that folder. 160 | * Modules will be put in ``collectd.moduledirconfig`` folder. 161 | 162 | 163 | ``collectd.mysql`` 164 | ^^^^^^^^^^^^^^^^^^ 165 | 166 | Enables and configures the mysql plugin. Needs refinement. 167 | 168 | ``collectd.network`` 169 | ^^^^^^^^^^^^^^^^^^^^ 170 | 171 | Enables and configures the network plugin. 172 | 173 | ``collectd.ntpd`` 174 | ^^^^^^^^^^^^^^^^^ 175 | 176 | Enables and configures the ntpd plugin. 177 | 178 | ``collectd.packages`` 179 | ^^^^^^^^^^^^^^^^^^^^^ 180 | 181 | This state is used to install OS packages collectd plugins depend on. 182 | 183 | ``collectd.postgresql`` 184 | ^^^^^^^^^^^^^^^^^^^^^^^ 185 | 186 | Enables and configures the postgresql plugin. Needs refinement. 187 | 188 | ``collectd.processes`` 189 | ^^^^^^^^^^^^^^^^^^^^^^ 190 | 191 | Enables and configures the processes plugin 192 | 193 | ``collectd.protocols`` 194 | ^^^^^^^^^^^^^^^^^^^^^^ 195 | 196 | Enables and configures the protocols plugin 197 | 198 | ``collectd.powerdns`` 199 | ^^^^^^^^^^^^^^^^^^^^^ 200 | 201 | Enables and configures the powerdns plugin. 202 | 203 | ``collectd.rabbitmq`` 204 | ^^^^^^^^^^^^^^^^^^^^^ 205 | 206 | Enables and configures the rabbitmq plugin. 207 | 208 | ``collectd.redis`` 209 | ^^^^^^^^^^^^^^^^^^ 210 | 211 | Enables and configures the redis plugin. 212 | 213 | ``collectd.syslog`` 214 | ^^^^^^^^^^^^^^^^^^^ 215 | 216 | Enables and configures the syslog plugin. 217 | 218 | ``collectd.tail`` 219 | ^^^^^^^^^^^^^^^^^ 220 | 221 | Enables and configures the tail plugin. 222 | 223 | ``collectd.tcpconns`` 224 | ^^^^^^^^^^^^^^^^^^^^^ 225 | 226 | Enables and configures the tcpconns plugin. 227 | 228 | ``collectd.types`` 229 | ^^^^^^^^^^^^^^^^^^ 230 | 231 | Manages a TypesDB file stored at `plugindirconfig`/types.db. 232 | 233 | ``collectd.curl_json`` 234 | ^^^^^^^^^^^^^^^^^^^^^^ 235 | 236 | Enables and configures the curl_json plugin. 237 | 238 | ``collectd.curl_xml`` 239 | ^^^^^^^^^^^^^^^^^^^^^ 240 | 241 | Enables and configures the curl_xml plugin. 242 | 243 | ``collectd.python`` 244 | ^^^^^^^^^^^^^^^^^^^ 245 | 246 | Enables and configures the python plugin, which allows executiong arbitrary python scripts. 247 | 248 | ``collectd.vmem`` 249 | ^^^^^^^^^^^^^^^^^ 250 | 251 | Enables and configures the vmem plugin. 252 | 253 | ``collectd.librato`` 254 | ^^^^^^^^^^^^^^^^^^^^ 255 | 256 | Enables and configures write_http plugin for reporting to Librato 257 | 258 | ``collectd.zookeeper`` 259 | ^^^^^^^^^^^^^^^^^^^^^^ 260 | 261 | Enables and configures the zookeeper plugin. 262 | 263 | ``collectd.unixsock`` 264 | ^^^^^^^^^^^^^^^^^^^^^ 265 | 266 | Enables and configures the unixsock plugin. 267 | 268 | Usage 269 | ----- 270 | 271 | Custom state file 272 | ^^^^^^^^^^^^^^^^^ 273 | 274 | Create a custom state file (for example ``collectd-custom.sls``) that includes the plugins you want and the base state. :: 275 | 276 | include: 277 | - collectd 278 | - collectd.disk 279 | - collectd.syslog 280 | 281 | Then in your topfile: :: 282 | 283 | 'servername': 284 | - collectd-custom 285 | 286 | Directly in topfile 287 | ^^^^^^^^^^^^^^^^^^^ 288 | 289 | Or if you don't mind having long lists in your topfile, just add whatever plugins you want and the base state. :: 290 | 291 | 'servername': 292 | - collectd 293 | - collectd.disk 294 | - collectd.syslog 295 | 296 | Combined 297 | ^^^^^^^^ 298 | 299 | Or you can combine both - default plugins in custom state and specific in topfile. :: 300 | 301 | 'apache-server': 302 | - collectd-custom 303 | - collectd.apache 304 | -------------------------------------------------------------------------------- /pillar.example: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | collectd: 5 | FQDNLookup: true 6 | # To add new types to collectd, you need to reference the new file in TypesDB 7 | TypesDB: ['/usr/share/collectd/types.db', '/etc/collectd/plugins/types.db'] 8 | # and add types below 9 | types: 10 | - 'jmx_memory value:GAUGE:0:U' 11 | # if true, all non salt-managed files in plugindir will be removed 12 | purge_plugindir: false 13 | # if false, service is not enabled and not started 14 | enable_service: true 15 | plugins: 16 | default: [battery, cpu, entropy, load, memory, swap, users] 17 | curl_json: 18 | Url "http://127.0.0.1/status?json": 19 | instance: php-fpm 20 | keys: 21 | start since: 22 | type: uptime 23 | accepted conn: 24 | type: http_requests 25 | listen queue: 26 | type: phpfpm_listen_queue 27 | listen queue len: 28 | type: phpfpm_listen_queue 29 | max listen queue: 30 | type: phpfpm_listen_queue 31 | idle processes: 32 | type: phpfpm_processes 33 | active processes: 34 | type: phpfpm_processes 35 | total processes: 36 | type: phpfpm_processes 37 | max active processes: 38 | type: phpfpm_processes 39 | max children reached: 40 | type: phpfpm_processes 41 | slow requests: 42 | type: phpfpm_slow_requests 43 | curl_xml: 44 | Url "127.0.0.1/stats": 45 | instance: instance 46 | xpaths: 47 | - name: /stats 48 | data: 49 | type: uptime 50 | values_from: 51 | - uptime 52 | apache: 53 | instances: 54 | - name: name 55 | url: 'http://localhost/server-status?auto' 56 | user: user 57 | pass: pass 58 | bind: 59 | proto: http 60 | host: localhost 61 | port: 8053 62 | parsetime: true 63 | opcodes: true 64 | qtypes: true 65 | serverstats: true 66 | zonemaintstats: true 67 | resolverstats: false 68 | memorystats: true 69 | views: 70 | - name: _default 71 | qtypes: false 72 | resolverstats: false 73 | cacherrsets: false 74 | zones: 75 | - 127.in-addr.arpa/IN 76 | dbi: 77 | queries: 78 | - name: mysql_user_connections 79 | statement: >- 80 | SELECT user, count(*) as nof_connections 81 | FROM information_schema.processlist 82 | GROUP BY user 83 | results: 84 | - type: gauge 85 | instancePrefix: mysql_user_connections 86 | instancesFrom: user 87 | valuesFrom: nof_connections 88 | databases: 89 | - name: name 90 | driver: mysql 91 | queries: 92 | - mysql_user_connections 93 | driverOptions: 94 | - name: host 95 | value: 192.168.1.100 96 | # Another method is to use `grains.get`: 97 | # value: {{ salt['grains.get']('ip4_interfaces:eth1')[0] }} 98 | - name: username 99 | value: user 100 | - name: password 101 | value: pass 102 | exec: 103 | - Exec "myuser:mygroup" "myprog" 104 | - Exec "otheruser" "/path/to/another/binary" "arg0" "arg1" 105 | - NotificationExec "user" "/usr/lib/collectd/exec/handle_notification" 106 | syslog: 107 | loglevel: info 108 | network: 109 | host: 'logstash' 110 | port: 25826 111 | securitylevel: 'Encrypt' 112 | username: 'user' 113 | password: 'password' 114 | mysql: 115 | databases: 116 | - host: 'foo' 117 | port: '3306' 118 | user: 'myuser' 119 | pass: 'mypass' 120 | name: 'mydb' 121 | masterstats: true 122 | - host: 'foo' 123 | name: 'mydb' 124 | socket: '/var/run/mysql/mysqld.sock' 125 | slavestats: true 126 | slavenotifications: true 127 | postgresql: 128 | databases: 129 | - name: 'foo' 130 | host: 'hostname' 131 | port: '5432' 132 | user: 'username' 133 | pass: 'secret' 134 | sslmode: 'prefer' 135 | krbsrvname: 'kerberos_service_name' 136 | service: 'service_name' 137 | queries: 138 | - 'magic' 139 | - name: 'bar' 140 | service: 'service_name' 141 | queries: 142 | - 'backend' 143 | - 'rt36_tickets' 144 | queries: 145 | - name: 'magic' 146 | statement: "SELECT magic FROM wizard WHERE host = $1;" 147 | param: 'hostname' 148 | results: 149 | - type: 'gauge' 150 | instanceprefix: 'magic' 151 | valuesfrom: 'magic' 152 | - name: 'rt36_tickets' 153 | statement: | 154 | SELECT COUNT(type) AS count, type 155 | FROM (SELECT CASE 156 | WHEN resolved = 'epoch' THEN 'open' 157 | ELSE 'resolved' END AS type 158 | FROM tickets) type 159 | GROUP BY type; 160 | results: 161 | - type: 'counter' 162 | instanceprefix: 'rt36_tickets' 163 | instancesfrom: 'type' 164 | valuesfrom: 'count' 165 | powerdns: 166 | socket: '/var/run/pdns.controlsocket' 167 | protocols: 168 | IgnoreSelected: true 169 | openldap: 170 | instances: 171 | - name: ldap 172 | url: ldap://localhost 173 | binddn: "cn=monitor, dc=example, dc=com" 174 | password: MyOwnPassword 175 | verifyhost: true 176 | starttls: true 177 | cacert: /etc/ssl/certs/ca-cert.pem 178 | df: 179 | Devices: 180 | - 'md1' 181 | - 'md2' 182 | MountPoints: 183 | - '/home' 184 | FSTypes: 185 | - 'ext4' 186 | - 'tmpfs' 187 | IgnoreSelected: false 188 | ReportByDevice: false 189 | ReportInodes: false 190 | ntpd: 191 | host: localhost 192 | port: 123 193 | ReverseLookups: 'false' 194 | java: 195 | host: localhost 196 | port: 17264 197 | user: '' 198 | pass: '' 199 | lib: '/usr/lib/jvm/java-7-oracle/jre/lib/amd64/libjava.so' 200 | ethstat: 201 | interface: 'eth0' 202 | interface: 203 | interfaces: ['eth0', 'lo0'] 204 | IgnoreSelected: 'false' 205 | # defaults as of 20141103 206 | ping: 207 | hosts: ['google.com', 'yahoo.com'] 208 | # interval: 1.0 209 | # timeout: 0.9 210 | # ttl: 64 211 | # sourceaddress: 10.0.1.1 212 | # device: eth0 213 | # maxmissed: -1 214 | disk: 215 | matches: ['/^[hs]d[a-f][0-9]?$/'] 216 | write_graphite: 217 | name: graphite 218 | host: graphite-host 219 | port: "2003" 220 | protocol: "tcp" 221 | prefix: "collectd." 222 | postfix: "" 223 | logsenderrors: false 224 | escapecharacter: "_" 225 | separateinstances: true 226 | storerates: true 227 | alwaysappendds: false 228 | processes: 229 | Processes: 230 | - 'java' 231 | - 'python' 232 | ProcessMatches: 233 | - '.*java.*' 234 | statsd: 235 | host: localhost 236 | port: 8125 237 | tail: 238 | - file: '/var/log/exim4/mainlog' 239 | instance: exim 240 | match: 241 | - instance: 'total' 242 | dstype: 'CounterAdd' 243 | type: 'ipt_bytes' 244 | regex: 'S=([1-9][0-9]*)' 245 | - instance: 'local_user' 246 | dstype: 'CounterInc' 247 | type: 'counter' 248 | regex: '\\' 249 | md: 250 | Device: ['md1', 'md2'] 251 | IgnoreSelected: false 252 | librato: 253 | user: example@example.com 254 | token: deadbeef 255 | python: 256 | Globals: true 257 | ModulePath: "/usr/share/collectd/modules" 258 | LogTraces: true 259 | Interactive: false 260 | modules: 261 | module_name: # Replace module_name by your Python module 262 | variables: 263 | var1: value1 264 | var2: value2 265 | extra: 266 | cpu: 267 | ReportByCpu: false 268 | tcpconns: 269 | listening_ports: 'true' 270 | all_ports_summary: 'false' 271 | local_ports: [] 272 | remote_ports: [] 273 | openvpn: 274 | status_file: 275 | - "/var/log/openvpn/openvpn-status.log" 276 | individual_users: 'false' 277 | user_count: 'true' 278 | compression: 'false' 279 | improved_naming_scheme: 'true' 280 | rabbitmq: 281 | username: 'guest' 282 | password: 'guest' 283 | realm: 'RabbitMQ Management' 284 | host: 'localhost' 285 | port: 15672 286 | ignore_queue_regex: 287 | - '^queue' 288 | ignore_exchange_regex: 289 | - '^exchange' 290 | zookeeper: 291 | host: localhost 292 | port: 2181 293 | -------------------------------------------------------------------------------- /collectd/map.jinja: -------------------------------------------------------------------------------- 1 | {% set os_map = salt['grains.filter_by']({ 2 | 'Debian': { 3 | 'config': '/etc/collectd/collectd.conf', 4 | 'javalib': '/usr/lib/collectd/java.so', 5 | 'pkg': 'collectd-core', 6 | 'plugindirconfig': '/etc/collectd/plugins', 7 | 'service': 'collectd', 8 | 'TypesDB': ['/usr/share/collectd/types.db'], 9 | 'moduledirconfig': '/usr/share/collectd/modules', 10 | 'user': 'root', 11 | 'group': 'root', 12 | 'plugin_postgresql': {'pkg': 'postgresql-client'}, 13 | }, 14 | 'RedHat': { 15 | 'config': '/etc/collectd.conf', 16 | 'pkg': 'collectd', 17 | 'plugindirconfig': '/etc/collectd.d', 18 | 'service': 'collectd', 19 | 'TypesDB': ['/usr/share/collectd/types.db'], 20 | 'moduledirconfig': '/usr/share/collectd/modules', 21 | 'user': 'root', 22 | 'group': 'root', 23 | 'plugin_postgresql': {'pkg': 'collectd-postgresql'}, 24 | }, 25 | 'FreeBSD': { 26 | 'config': '/usr/local/etc/collectd.conf', 27 | 'pkg': 'collectd5', 28 | 'plugindirconfig': '/usr/local/etc/collectd.d', 29 | 'service': 'collectd', 30 | 'TypesDB': ['/usr/local/share/collectd/types.db'], 31 | 'moduledirconfig': '/usr/local/share/collectd/modules', 32 | 'user': 'root', 33 | 'group': 'wheel', 34 | 'plugin_postgresql': {'pkg': 'postgresql-client'}, 35 | }, 36 | 'Suse': { 37 | 'config': '/etc/collectd.conf', 38 | 'pkg': 'collectd', 39 | 'plugindirconfig': '/usr/lib64/collectd', 40 | 'service': 'collectd', 41 | 'TypesDB': ['/usr/share/collectd/types.db'], 42 | 'moduledirconfig': '/usr/share/collectd/modules', 43 | 'user': 'root', 44 | 'group': 'root', 45 | 'plugin_postgresql': {'pkg': 'collectd-plugin-postgresql'}, 46 | }, 47 | }, merge=salt['pillar.get']('collectd:lookup')) %} 48 | 49 | {# Settings dictionary with default values #} 50 | {% set default_settings = { 51 | 'collectd': { 52 | 'Hostname': salt['grains.get']('fqdn'), 53 | 'Interval': 10, 54 | 'Timeout': 2, 55 | 'ReadThreads': 5, 56 | 'WriteQueueLimitHigh': 2000000, 57 | 'WriteQueueLimitLow': 1800000, 58 | 'CollectInternalStats': 'false', 59 | 'FQDNLookup': 'false', 60 | 'purge_plugindir': 'false', 61 | 'enable_service': true, 62 | 'plugins': { 63 | 'default': [ 64 | 'battery', 65 | 'cpu', 66 | 'entropy', 67 | 'load', 68 | 'memory', 69 | 'swap', 70 | 'users' 71 | ], 72 | 'extra': {}, 73 | 'apache': { 74 | 'instances' : [ { 75 | 'name': 'name', 76 | 'url': 'http://' + salt['grains.get']('host') + '/server-status?auto', 77 | 'verifypeer': 'false', 78 | 'verifyhost': 'false', 79 | 'server': 'apache' 80 | } 81 | ] 82 | }, 83 | 'bind': { 84 | 'proto': 'http', 85 | 'host': 'localhost', 86 | 'port': '8053', 87 | 'parsetime': true, 88 | 'opcodes': true, 89 | 'qtypes': true, 90 | 'serverstats': true, 91 | 'zonemaintstats': true, 92 | 'resolverstats': false, 93 | 'memorystats': true, 94 | }, 95 | 'csv': { 96 | 'DataDir': '/var/lib/collectd/csv', 97 | 'StoreRates': False 98 | }, 99 | 'df': { 100 | 'Devices': [], 101 | 'IgnoreSelected': 'false', 102 | 'ReportByDevice': 'false', 103 | 'ReportReserved': 'false', 104 | 'disable_report_reserved': 'false', 105 | 'ReportInodes': 'false', 106 | 'ValuesPercentage': 'false' 107 | }, 108 | 'disk': { 109 | 'matches': [], 110 | 'IgnoreSelected': 'false' 111 | }, 112 | 'ethstat': { 113 | 'interface': 'eth0' 114 | }, 115 | 'interface': { 116 | 'interfaces': ['eth0'], 117 | 'IgnoreSelected': 'false' 118 | }, 119 | 'java': { 120 | 'host': 'localhost', 121 | 'port': '17264', 122 | }, 123 | 'logfile': { 124 | 'log_level': 'warning', 125 | 'file': '/var/log/collectd.log', 126 | 'timestamp': true, 127 | 'print_severity': true, 128 | }, 129 | 'md': { 130 | 'Devices': [], 131 | 'IgnoreSelected': 'true' 132 | }, 133 | 'mysql': { 134 | 'databases': [] 135 | }, 136 | 'network': {}, 137 | 'nginx': { 138 | 'url': 'http://localhost/check_status', 139 | }, 140 | 'ntpd': { 141 | 'host': 'localhost', 142 | 'port': '123', 143 | 'ReverseLookups': 'false' 144 | }, 145 | 'memcached': { 146 | 'host': 'localhost', 147 | 'port': '11211', 148 | }, 149 | 'ping': { 150 | 'hosts': ['google.com', 'yahoo.com'], 151 | 'hosts_from_grains': {}, 152 | }, 153 | 'postgresql': { 154 | 'databases': [], 155 | 'queries' : [] 156 | }, 157 | 'powerdns': { 158 | 'socket': '/var/run/pdns.controlsocket' 159 | }, 160 | 'processes': { 161 | 'Processes': [], 162 | 'ProcessMatches': [] 163 | }, 164 | 'protocols': { 165 | 'values_': [], 166 | 'IgnoreSelected': True, 167 | }, 168 | 'statsd': { 169 | 'host': '"::"', 170 | 'port': 8125 171 | }, 172 | 'syslog': { 173 | 'loglevel': 'info' 174 | }, 175 | 'write_graphite': { 176 | 'host': salt['grains.get']('fqdn'), 177 | 'port': 2003, 178 | 'prefix': 'collectd.', 179 | 'postfix': '' 180 | }, 181 | 'write_prometheus': { 182 | 'port': 9103 183 | }, 184 | 'write_riemann': { 185 | 'host': salt['grains.get']('fqdn'), 186 | 'port': 5555, 187 | 'protocol': 'TCP', 188 | 'batch': True, 189 | }, 190 | 'python': { 191 | 'Globals': 'true', 192 | 'LogTraces': 'true', 193 | 'Interactive': 'false' 194 | }, 195 | 'elasticsearch': { 196 | 'host': 'localhost', 197 | 'port': 9200, 198 | 'cluster': 'elasticsearch', 199 | 'version': '1.0', 200 | 'verbose': 0 201 | }, 202 | 'redis_info': { 203 | 'host': 'localhost', 204 | 'port': 6379, 205 | 'verbose': 0 206 | }, 207 | 'rrdtool': { 208 | 'datadir': '/var/lib/collectd/rrd', 209 | 'cacheflush': 120, 210 | 'writespersecond': 50 211 | }, 212 | 'tcpconns': { 213 | 'listening_ports': 'true', 214 | 'all_ports_summary': 'false', 215 | 'local_ports': [], 216 | 'remote_ports': [] 217 | }, 218 | 'unixsock': { 219 | 'socket_file': '/var/run/collectd.socket', 220 | 'socket_group': 'root', 221 | 'socket_perms': '0644', 222 | 'delete_socket': true, 223 | }, 224 | 'vmem': { 225 | 'verbose': 'false' 226 | }, 227 | 'openvpn': { 228 | 'status_file': [ 229 | '/var/log/openvpn/openvpn-status.log' 230 | ], 231 | 'individual_users': 'false', 232 | 'user_count': 'true', 233 | 'compression': 'false', 234 | 'improved_naming_scheme': 'true' 235 | }, 236 | 'rabbitmq': { 237 | 'host': 'localhost', 238 | 'port': 15672, 239 | 'username': 'guest', 240 | 'password': 'guest' 241 | }, 242 | 'zookeeper': { 243 | 'host': 'localhost', 244 | 'port': '2181' 245 | } 246 | } 247 | } 248 | } %} 249 | 250 | {# Merge os_map into settings dictionary #} 251 | {% do default_settings.collectd.update(os_map) %} 252 | 253 | {# Update settings defaults from pillar data #} 254 | {% set collectd_settings = salt['pillar.get']('collectd', default=default_settings.collectd, merge=True) %} 255 | -------------------------------------------------------------------------------- /kitchen.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | # For help on this file's format, see https://kitchen.ci/ 5 | driver: 6 | name: docker 7 | use_sudo: false 8 | privileged: true 9 | run_command: /usr/lib/systemd/systemd 10 | 11 | provisioner: 12 | name: salt_solo 13 | log_level: debug 14 | salt_install: none 15 | require_chef: false 16 | formula: collectd 17 | salt_copy_filter: 18 | - .kitchen 19 | - .git 20 | 21 | platforms: 22 | ## SALT `tiamat` 23 | - name: debian-11-tiamat-py3 24 | driver: 25 | image: saltimages/salt-tiamat-py3:debian-11 26 | run_command: /lib/systemd/systemd 27 | - name: debian-10-tiamat-py3 28 | driver: 29 | image: saltimages/salt-tiamat-py3:debian-10 30 | run_command: /lib/systemd/systemd 31 | - name: debian-9-tiamat-py3 32 | driver: 33 | image: saltimages/salt-tiamat-py3:debian-9 34 | run_command: /lib/systemd/systemd 35 | - name: ubuntu-2204-tiamat-py3 36 | driver: 37 | image: saltimages/salt-tiamat-py3:ubuntu-22.04 38 | run_command: /lib/systemd/systemd 39 | - name: ubuntu-2004-tiamat-py3 40 | driver: 41 | image: saltimages/salt-tiamat-py3:ubuntu-20.04 42 | run_command: /lib/systemd/systemd 43 | - name: ubuntu-1804-tiamat-py3 44 | driver: 45 | image: saltimages/salt-tiamat-py3:ubuntu-18.04 46 | run_command: /lib/systemd/systemd 47 | - name: centos-stream8-tiamat-py3 48 | driver: 49 | image: saltimages/salt-tiamat-py3:centos-stream8 50 | - name: centos-7-tiamat-py3 51 | driver: 52 | image: saltimages/salt-tiamat-py3:centos-7 53 | - name: amazonlinux-2-tiamat-py3 54 | driver: 55 | image: saltimages/salt-tiamat-py3:amazonlinux-2 56 | - name: oraclelinux-8-tiamat-py3 57 | driver: 58 | image: saltimages/salt-tiamat-py3:oraclelinux-8 59 | - name: oraclelinux-7-tiamat-py3 60 | driver: 61 | image: saltimages/salt-tiamat-py3:oraclelinux-7 62 | - name: almalinux-8-tiamat-py3 63 | driver: 64 | image: saltimages/salt-tiamat-py3:almalinux-8 65 | - name: rockylinux-8-tiamat-py3 66 | driver: 67 | image: saltimages/salt-tiamat-py3:rockylinux-8 68 | 69 | ## SALT `master` 70 | - name: debian-11-master-py3 71 | driver: 72 | image: saltimages/salt-master-py3:debian-11 73 | run_command: /lib/systemd/systemd 74 | - name: debian-10-master-py3 75 | driver: 76 | image: saltimages/salt-master-py3:debian-10 77 | run_command: /lib/systemd/systemd 78 | - name: debian-9-master-py3 79 | driver: 80 | image: saltimages/salt-master-py3:debian-9 81 | run_command: /lib/systemd/systemd 82 | - name: ubuntu-2204-master-py3 83 | driver: 84 | image: saltimages/salt-master-py3:ubuntu-22.04 85 | run_command: /lib/systemd/systemd 86 | - name: ubuntu-2004-master-py3 87 | driver: 88 | image: saltimages/salt-master-py3:ubuntu-20.04 89 | run_command: /lib/systemd/systemd 90 | - name: ubuntu-1804-master-py3 91 | driver: 92 | image: saltimages/salt-master-py3:ubuntu-18.04 93 | run_command: /lib/systemd/systemd 94 | - name: centos-stream8-master-py3 95 | driver: 96 | image: saltimages/salt-master-py3:centos-stream8 97 | - name: centos-7-master-py3 98 | driver: 99 | image: saltimages/salt-master-py3:centos-7 100 | - name: fedora-36-master-py3 101 | driver: 102 | image: saltimages/salt-master-py3:fedora-36 103 | - name: fedora-35-master-py3 104 | driver: 105 | image: saltimages/salt-master-py3:fedora-35 106 | - name: opensuse-leap-153-master-py3 107 | driver: 108 | image: saltimages/salt-master-py3:opensuse-leap-15.3 109 | # Workaround to avoid intermittent failures on `opensuse-leap-15.3`: 110 | # => SCP did not finish successfully (255): (Net::SCP::Error) 111 | transport: 112 | max_ssh_sessions: 1 113 | - name: opensuse-tmbl-latest-master-py3 114 | driver: 115 | image: saltimages/salt-master-py3:opensuse-tumbleweed-latest 116 | # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: 117 | # => SCP did not finish successfully (255): (Net::SCP::Error) 118 | transport: 119 | max_ssh_sessions: 1 120 | - name: amazonlinux-2-master-py3 121 | driver: 122 | image: saltimages/salt-master-py3:amazonlinux-2 123 | - name: oraclelinux-8-master-py3 124 | driver: 125 | image: saltimages/salt-master-py3:oraclelinux-8 126 | - name: oraclelinux-7-master-py3 127 | driver: 128 | image: saltimages/salt-master-py3:oraclelinux-7 129 | - name: arch-base-latest-master-py3 130 | driver: 131 | image: saltimages/salt-master-py3:arch-base-latest 132 | - name: gentoo-stage3-latest-master-py3 133 | driver: 134 | image: saltimages/salt-master-py3:gentoo-stage3-latest 135 | run_command: /sbin/init 136 | - name: gentoo-stage3-systemd-master-py3 137 | driver: 138 | image: saltimages/salt-master-py3:gentoo-stage3-systemd 139 | - name: almalinux-8-master-py3 140 | driver: 141 | image: saltimages/salt-master-py3:almalinux-8 142 | - name: rockylinux-8-master-py3 143 | driver: 144 | image: saltimages/salt-master-py3:rockylinux-8 145 | 146 | ## SALT `3004.1` 147 | - name: debian-11-3004-1-py3 148 | driver: 149 | image: saltimages/salt-3004.1-py3:debian-11 150 | run_command: /lib/systemd/systemd 151 | - name: debian-10-3004-1-py3 152 | driver: 153 | image: saltimages/salt-3004.1-py3:debian-10 154 | run_command: /lib/systemd/systemd 155 | - name: debian-9-3004-1-py3 156 | driver: 157 | image: saltimages/salt-3004.1-py3:debian-9 158 | run_command: /lib/systemd/systemd 159 | - name: ubuntu-2204-3004-1-py3 160 | driver: 161 | image: saltimages/salt-3004.1-py3:ubuntu-22.04 162 | run_command: /lib/systemd/systemd 163 | - name: ubuntu-2004-3004-1-py3 164 | driver: 165 | image: saltimages/salt-3004.1-py3:ubuntu-20.04 166 | run_command: /lib/systemd/systemd 167 | - name: ubuntu-1804-3004-1-py3 168 | driver: 169 | image: saltimages/salt-3004.1-py3:ubuntu-18.04 170 | run_command: /lib/systemd/systemd 171 | - name: centos-stream8-3004-1-py3 172 | driver: 173 | image: saltimages/salt-3004.1-py3:centos-stream8 174 | - name: centos-7-3004-1-py3 175 | driver: 176 | image: saltimages/salt-3004.1-py3:centos-7 177 | - name: fedora-36-3004-1-py3 178 | driver: 179 | image: saltimages/salt-3004.1-py3:fedora-36 180 | - name: fedora-35-3004-1-py3 181 | driver: 182 | image: saltimages/salt-3004.1-py3:fedora-35 183 | - name: amazonlinux-2-3004-1-py3 184 | driver: 185 | image: saltimages/salt-3004.1-py3:amazonlinux-2 186 | - name: oraclelinux-8-3004-1-py3 187 | driver: 188 | image: saltimages/salt-3004.1-py3:oraclelinux-8 189 | - name: oraclelinux-7-3004-1-py3 190 | driver: 191 | image: saltimages/salt-3004.1-py3:oraclelinux-7 192 | - name: arch-base-latest-3004-1-py3 193 | driver: 194 | image: saltimages/salt-3004.1-py3:arch-base-latest 195 | - name: gentoo-stage3-latest-3004-1-py3 196 | driver: 197 | image: saltimages/salt-3004.1-py3:gentoo-stage3-latest 198 | run_command: /sbin/init 199 | - name: gentoo-stage3-systemd-3004-1-py3 200 | driver: 201 | image: saltimages/salt-3004.1-py3:gentoo-stage3-systemd 202 | - name: almalinux-8-3004-1-py3 203 | driver: 204 | image: saltimages/salt-3004.1-py3:almalinux-8 205 | - name: rockylinux-8-3004-1-py3 206 | driver: 207 | image: saltimages/salt-3004.1-py3:rockylinux-8 208 | 209 | ## SALT `3004.0` 210 | - name: opensuse-leap-153-3004-0-py3 211 | driver: 212 | image: saltimages/salt-3004.0-py3:opensuse-leap-15.3 213 | # Workaround to avoid intermittent failures on `opensuse-leap-15.3`: 214 | # => SCP did not finish successfully (255): (Net::SCP::Error) 215 | transport: 216 | max_ssh_sessions: 1 217 | - name: opensuse-tmbl-latest-3004-0-py3 218 | driver: 219 | image: saltimages/salt-3004.0-py3:opensuse-tumbleweed-latest 220 | # Workaround to avoid intermittent failures on `opensuse-tumbleweed`: 221 | # => SCP did not finish successfully (255): (Net::SCP::Error) 222 | transport: 223 | max_ssh_sessions: 1 224 | 225 | ## SALT `3003.4` 226 | - name: debian-10-3003-4-py3 227 | driver: 228 | image: saltimages/salt-3003.4-py3:debian-10 229 | run_command: /lib/systemd/systemd 230 | - name: debian-9-3003-4-py3 231 | driver: 232 | image: saltimages/salt-3003.4-py3:debian-9 233 | run_command: /lib/systemd/systemd 234 | - name: ubuntu-2004-3003-4-py3 235 | driver: 236 | image: saltimages/salt-3003.4-py3:ubuntu-20.04 237 | run_command: /lib/systemd/systemd 238 | - name: ubuntu-1804-3003-4-py3 239 | driver: 240 | image: saltimages/salt-3003.4-py3:ubuntu-18.04 241 | run_command: /lib/systemd/systemd 242 | - name: centos-stream8-3003-4-py3 243 | driver: 244 | image: saltimages/salt-3003.4-py3:centos-stream8 245 | - name: centos-7-3003-4-py3 246 | driver: 247 | image: saltimages/salt-3003.4-py3:centos-7 248 | - name: amazonlinux-2-3003-4-py3 249 | driver: 250 | image: saltimages/salt-3003.4-py3:amazonlinux-2 251 | - name: oraclelinux-8-3003-4-py3 252 | driver: 253 | image: saltimages/salt-3003.4-py3:oraclelinux-8 254 | - name: oraclelinux-7-3003-4-py3 255 | driver: 256 | image: saltimages/salt-3003.4-py3:oraclelinux-7 257 | - name: almalinux-8-3003-4-py3 258 | driver: 259 | image: saltimages/salt-3003.4-py3:almalinux-8 260 | 261 | verifier: 262 | # https://www.inspec.io/ 263 | name: inspec 264 | sudo: true 265 | reporter: 266 | # cli, documentation, html, progress, json, json-min, json-rspec, junit 267 | - cli 268 | 269 | suites: 270 | - name: default 271 | provisioner: 272 | state_top: 273 | base: 274 | '*': 275 | - collectd._mapdata 276 | - collectd 277 | - collectd.postgresql 278 | pillars: 279 | top.sls: 280 | base: 281 | '*': 282 | - collectd 283 | pillars_from_files: 284 | collectd.sls: test/salt/pillar/default/collectd.sls 285 | verifier: 286 | inspec_tests: 287 | - path: test/integration/default 288 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # vim: ft=yaml 3 | --- 4 | ############################################################################### 5 | # Define all YAML node anchors 6 | ############################################################################### 7 | .node_anchors: 8 | # `only` (also used for `except` where applicable) 9 | only_branch_master_parent_repo: &only_branch_master_parent_repo 10 | - 'master@saltstack-formulas/collectd-formula' 11 | # `stage` 12 | stage_lint: &stage_lint 'lint' 13 | stage_release: &stage_release 'release' 14 | stage_test: &stage_test 'test' 15 | # `image` 16 | image_commitlint: &image_commitlint 'myii/ssf-commitlint:11' 17 | image_dindruby: &image_dindruby 'myii/ssf-dind-ruby:2.7.1-r3' 18 | image_precommit: &image_precommit 19 | name: 'myii/ssf-pre-commit:2.9.2' 20 | entrypoint: ['/bin/bash', '-c'] 21 | image_rubocop: &image_rubocop 'pipelinecomponents/rubocop:latest' 22 | image_semantic-release: &image_semanticrelease 'myii/ssf-semantic-release:15.14' 23 | # `services` 24 | services_docker_dind: &services_docker_dind 25 | - 'docker:dind' 26 | # `variables` 27 | # https://forum.gitlab.com/t/gitlab-com-ci-caching-rubygems/5627/3 28 | # https://bundler.io/v1.16/bundle_config.html 29 | variables_bundler: &variables_bundler 30 | BUNDLE_CACHE_PATH: '${CI_PROJECT_DIR}/.cache/bundler' 31 | BUNDLE_WITHOUT: 'production' 32 | # `cache` 33 | cache_bundler: &cache_bundler 34 | key: '${CI_JOB_STAGE}' 35 | paths: 36 | - '${BUNDLE_CACHE_PATH}' 37 | 38 | ############################################################################### 39 | # Define stages and global variables 40 | ############################################################################### 41 | stages: 42 | - *stage_lint 43 | - *stage_test 44 | - *stage_release 45 | variables: 46 | DOCKER_DRIVER: 'overlay2' 47 | 48 | ############################################################################### 49 | # `lint` stage: `commitlint`, `pre-commit` & `rubocop` (latest, failure allowed) 50 | ############################################################################### 51 | commitlint: 52 | stage: *stage_lint 53 | image: *image_commitlint 54 | script: 55 | # Add `upstream` remote to get access to `upstream/master` 56 | - 'git remote add upstream 57 | https://gitlab.com/saltstack-formulas/collectd-formula.git' 58 | - 'git fetch --all' 59 | # Set default commit hashes for `--from` and `--to` 60 | - 'export COMMITLINT_FROM="$(git merge-base upstream/master HEAD)"' 61 | - 'export COMMITLINT_TO="${CI_COMMIT_SHA}"' 62 | # `coqbot` adds a merge commit to test PRs on top of the latest commit in 63 | # the repo; amend this merge commit message to avoid failure 64 | - | 65 | if [ "${GITLAB_USER_LOGIN}" = "coqbot" ] \ 66 | && [ "${CI_COMMIT_BRANCH}" != "master" ]; then 67 | git commit --amend -m \ 68 | 'chore: reword coqbot merge commit message for commitlint' 69 | export COMMITLINT_TO=HEAD 70 | fi 71 | # Run `commitlint` 72 | - 'commitlint --from "${COMMITLINT_FROM}" 73 | --to "${COMMITLINT_TO}" 74 | --verbose' 75 | 76 | pre-commit: 77 | stage: *stage_lint 78 | image: *image_precommit 79 | # https://pre-commit.com/#gitlab-ci-example 80 | variables: 81 | PRE_COMMIT_HOME: '${CI_PROJECT_DIR}/.cache/pre-commit' 82 | cache: 83 | key: '${CI_JOB_NAME}' 84 | paths: 85 | - '${PRE_COMMIT_HOME}' 86 | script: 87 | - 'pre-commit run --all-files --color always --verbose' 88 | 89 | # Use a separate job for `rubocop` other than the one potentially run by `pre-commit` 90 | # - The `pre-commit` check will only be available for formulas that pass the default 91 | # `rubocop` check -- and must continue to do so 92 | # - This job is allowed to fail, so can be used for all formulas 93 | # - Furthermore, this job uses all of the latest `rubocop` features & cops, 94 | # which will help when upgrading the `rubocop` linter used in `pre-commit` 95 | rubocop: 96 | allow_failure: true 97 | stage: *stage_lint 98 | image: *image_rubocop 99 | script: 100 | - 'rubocop -d -P -S --enable-pending-cops' 101 | 102 | ############################################################################### 103 | # Define `test` template 104 | ############################################################################### 105 | .test_instance: &test_instance 106 | stage: *stage_test 107 | image: *image_dindruby 108 | services: *services_docker_dind 109 | variables: *variables_bundler 110 | cache: *cache_bundler 111 | before_script: 112 | # TODO: This should work from the env vars above automatically 113 | - 'bundle config set path "${BUNDLE_CACHE_PATH}"' 114 | - 'bundle config set without "${BUNDLE_WITHOUT}"' 115 | - 'bundle install' 116 | script: 117 | # Alternative value to consider: `${CI_JOB_NAME}` 118 | - 'bin/kitchen verify "${DOCKER_ENV_CI_JOB_NAME}"' 119 | 120 | ############################################################################### 121 | # Define `test` template (`allow_failure: true`) 122 | ############################################################################### 123 | .test_instance_failure_permitted: 124 | <<: *test_instance 125 | allow_failure: true 126 | 127 | ############################################################################### 128 | # `test` stage: each instance below uses the `test` template above 129 | ############################################################################### 130 | ## Define the rest of the matrix based on Kitchen testing 131 | # Make sure the instances listed below match up with 132 | # the `platforms` defined in `kitchen.yml` 133 | # yamllint disable rule:line-length 134 | # default-debian-11-tiamat-py3: {extends: '.test_instance'} 135 | # default-debian-10-tiamat-py3: {extends: '.test_instance'} 136 | # default-debian-9-tiamat-py3: {extends: '.test_instance'} 137 | # default-ubuntu-2204-tiamat-py3: {extends: '.test_instance_failure_permitted'} 138 | # default-ubuntu-2004-tiamat-py3: {extends: '.test_instance'} 139 | # default-ubuntu-1804-tiamat-py3: {extends: '.test_instance'} 140 | # default-centos-stream8-tiamat-py3: {extends: '.test_instance_failure_permitted'} 141 | # default-centos-7-tiamat-py3: {extends: '.test_instance'} 142 | # default-amazonlinux-2-tiamat-py3: {extends: '.test_instance'} 143 | # default-oraclelinux-8-tiamat-py3: {extends: '.test_instance'} 144 | # default-oraclelinux-7-tiamat-py3: {extends: '.test_instance'} 145 | # default-almalinux-8-tiamat-py3: {extends: '.test_instance'} 146 | # default-rockylinux-8-tiamat-py3: {extends: '.test_instance'} 147 | default-debian-11-master-py3: {extends: '.test_instance'} 148 | default-debian-10-master-py3: {extends: '.test_instance'} 149 | default-debian-9-master-py3: {extends: '.test_instance'} 150 | default-ubuntu-2204-master-py3: {extends: '.test_instance_failure_permitted'} 151 | default-ubuntu-2004-master-py3: {extends: '.test_instance'} 152 | default-ubuntu-1804-master-py3: {extends: '.test_instance'} 153 | default-centos-stream8-master-py3: {extends: '.test_instance_failure_permitted'} 154 | default-centos-7-master-py3: {extends: '.test_instance'} 155 | default-fedora-36-master-py3: {extends: '.test_instance_failure_permitted'} 156 | default-fedora-35-master-py3: {extends: '.test_instance'} 157 | default-opensuse-leap-153-master-py3: {extends: '.test_instance'} 158 | default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance_failure_permitted'} 159 | # default-amazonlinux-2-master-py3: {extends: '.test_instance'} 160 | default-oraclelinux-8-master-py3: {extends: '.test_instance'} 161 | default-oraclelinux-7-master-py3: {extends: '.test_instance'} 162 | # default-arch-base-latest-master-py3: {extends: '.test_instance'} 163 | # default-gentoo-stage3-latest-master-py3: {extends: '.test_instance'} 164 | # default-gentoo-stage3-systemd-master-py3: {extends: '.test_instance'} 165 | default-almalinux-8-master-py3: {extends: '.test_instance'} 166 | default-rockylinux-8-master-py3: {extends: '.test_instance'} 167 | # default-debian-11-3004-1-py3: {extends: '.test_instance'} 168 | # default-debian-10-3004-1-py3: {extends: '.test_instance'} 169 | # default-debian-9-3004-1-py3: {extends: '.test_instance'} 170 | # default-ubuntu-2204-3004-1-py3: {extends: '.test_instance_failure_permitted'} 171 | # default-ubuntu-2004-3004-1-py3: {extends: '.test_instance'} 172 | # default-ubuntu-1804-3004-1-py3: {extends: '.test_instance'} 173 | # default-centos-stream8-3004-1-py3: {extends: '.test_instance_failure_permitted'} 174 | # default-centos-7-3004-1-py3: {extends: '.test_instance'} 175 | # default-fedora-36-3004-1-py3: {extends: '.test_instance_failure_permitted'} 176 | # default-fedora-35-3004-1-py3: {extends: '.test_instance'} 177 | # default-amazonlinux-2-3004-1-py3: {extends: '.test_instance'} 178 | # default-oraclelinux-8-3004-1-py3: {extends: '.test_instance'} 179 | # default-oraclelinux-7-3004-1-py3: {extends: '.test_instance'} 180 | # default-arch-base-latest-3004-1-py3: {extends: '.test_instance'} 181 | # default-gentoo-stage3-latest-3004-1-py3: {extends: '.test_instance'} 182 | # default-gentoo-stage3-systemd-3004-1-py3: {extends: '.test_instance'} 183 | # default-almalinux-8-3004-1-py3: {extends: '.test_instance'} 184 | # default-rockylinux-8-3004-1-py3: {extends: '.test_instance'} 185 | # default-opensuse-leap-153-3004-0-py3: {extends: '.test_instance'} 186 | # default-opensuse-tmbl-latest-3004-0-py3: {extends: '.test_instance_failure_permitted'} 187 | # default-debian-10-3003-4-py3: {extends: '.test_instance'} 188 | # default-debian-9-3003-4-py3: {extends: '.test_instance'} 189 | # default-ubuntu-2004-3003-4-py3: {extends: '.test_instance'} 190 | # default-ubuntu-1804-3003-4-py3: {extends: '.test_instance'} 191 | # default-centos-stream8-3003-4-py3: {extends: '.test_instance_failure_permitted'} 192 | # default-centos-7-3003-4-py3: {extends: '.test_instance'} 193 | # default-amazonlinux-2-3003-4-py3: {extends: '.test_instance'} 194 | # default-oraclelinux-8-3003-4-py3: {extends: '.test_instance'} 195 | # default-oraclelinux-7-3003-4-py3: {extends: '.test_instance'} 196 | # default-almalinux-8-3003-4-py3: {extends: '.test_instance'} 197 | # yamllint enable rule:line-length 198 | 199 | ############################################################################### 200 | # `release` stage: `semantic-release` 201 | ############################################################################### 202 | semantic-release: 203 | only: *only_branch_master_parent_repo 204 | stage: *stage_release 205 | image: *image_semanticrelease 206 | variables: 207 | MAINTAINER_TOKEN: '${GH_TOKEN}' 208 | script: 209 | # Update `AUTHORS.md` 210 | - '${HOME}/go/bin/maintainer contributor' 211 | # Run `semantic-release` 212 | - 'semantic-release' 213 | -------------------------------------------------------------------------------- /docs/AUTHORS.rst: -------------------------------------------------------------------------------- 1 | .. role:: raw-html-m2r(raw) 2 | :format: html 3 | 4 | 5 | Authors 6 | ======= 7 | 8 | This list is sorted by the number of commits per contributor in *descending* order. 9 | 10 | .. list-table:: 11 | :header-rows: 1 12 | 13 | * - Avatar 14 | - Contributor 15 | - Contributions 16 | * - :raw-html-m2r:`@myii` 17 | - `@myii `_ 18 | - 146 19 | * - :raw-html-m2r:`@fintanmm` 20 | - `@fintanmm `_ 21 | - 38 22 | * - :raw-html-m2r:`@nmadhok` 23 | - `@nmadhok `_ 24 | - 26 25 | * - :raw-html-m2r:`@wwentland` 26 | - `@wwentland `_ 27 | - 22 28 | * - :raw-html-m2r:`@genuss` 29 | - `@genuss `_ 30 | - 22 31 | * - :raw-html-m2r:`@daks` 32 | - `@daks `_ 33 | - 14 34 | * - :raw-html-m2r:`@puneetk` 35 | - `@puneetk `_ 36 | - 12 37 | * - :raw-html-m2r:`@gravyboat` 38 | - `@gravyboat `_ 39 | - 12 40 | * - :raw-html-m2r:`@n-rodriguez` 41 | - `@n-rodriguez `_ 42 | - 10 43 | * - :raw-html-m2r:`@aboe76` 44 | - `@aboe76 `_ 45 | - 9 46 | * - :raw-html-m2r:`@tomasfejfar` 47 | - `@tomasfejfar `_ 48 | - 8 49 | * - :raw-html-m2r:`@kpostrup` 50 | - `@kpostrup `_ 51 | - 6 52 | * - :raw-html-m2r:`@johnkeates` 53 | - `@johnkeates `_ 54 | - 5 55 | * - :raw-html-m2r:`@iggy` 56 | - `@iggy `_ 57 | - 4 58 | * - :raw-html-m2r:`@evvers` 59 | - `@evvers `_ 60 | - 4 61 | * - :raw-html-m2r:`@junovitch` 62 | - `@junovitch `_ 63 | - 4 64 | * - :raw-html-m2r:`@whiteinge` 65 | - `@whiteinge `_ 66 | - 4 67 | * - :raw-html-m2r:`@grumpydude` 68 | - `@grumpydude `_ 69 | - 4 70 | * - :raw-html-m2r:`@bogdanr` 71 | - `@bogdanr `_ 72 | - 4 73 | * - :raw-html-m2r:`@bdols` 74 | - `@bdols `_ 75 | - 3 76 | * - :raw-html-m2r:`@dafyddj` 77 | - `@dafyddj `_ 78 | - 3 79 | * - :raw-html-m2r:`@dosercz` 80 | - `@dosercz `_ 81 | - 3 82 | * - :raw-html-m2r:`@multani` 83 | - `@multani `_ 84 | - 3 85 | * - :raw-html-m2r:`@puckel` 86 | - `@puckel `_ 87 | - 3 88 | * - :raw-html-m2r:`@hexedpackets` 89 | - `@hexedpackets `_ 90 | - 3 91 | * - :raw-html-m2r:`@aanriot` 92 | - `@aanriot `_ 93 | - 2 94 | * - :raw-html-m2r:`@colekowalski` 95 | - `@colekowalski `_ 96 | - 2 97 | * - :raw-html-m2r:`@javierbertoli` 98 | - `@javierbertoli `_ 99 | - 2 100 | * - :raw-html-m2r:`@sawasy` 101 | - `@sawasy `_ 102 | - 2 103 | * - :raw-html-m2r:`@jettero` 104 | - `@jettero `_ 105 | - 2 106 | * - :raw-html-m2r:`@roedie` 107 | - `@roedie `_ 108 | - 2 109 | * - :raw-html-m2r:`@badele` 110 | - `@badele `_ 111 | - 2 112 | * - :raw-html-m2r:`@kaidokert` 113 | - `@kaidokert `_ 114 | - 2 115 | * - :raw-html-m2r:`@dsala-it` 116 | - `@dsala-it `_ 117 | - 1 118 | * - :raw-html-m2r:`@andreaspe` 119 | - `@andreaspe `_ 120 | - 1 121 | * - :raw-html-m2r:`@Jokipii` 122 | - `@Jokipii `_ 123 | - 1 124 | * - :raw-html-m2r:`@cmclaughlin` 125 | - `@cmclaughlin `_ 126 | - 1 127 | * - :raw-html-m2r:`@ciprianc` 128 | - `@ciprianc `_ 129 | - 1 130 | * - :raw-html-m2r:`@baby-gnu` 131 | - `@baby-gnu `_ 132 | - 1 133 | * - :raw-html-m2r:`@filipposc5` 134 | - `@filipposc5 `_ 135 | - 1 136 | * - :raw-html-m2r:`@kluzas` 137 | - `@kluzas `_ 138 | - 1 139 | * - :raw-html-m2r:`@duk3luk3` 140 | - `@duk3luk3 `_ 141 | - 1 142 | * - :raw-html-m2r:`@magenbrot` 143 | - `@magenbrot `_ 144 | - 1 145 | * - :raw-html-m2r:`@sroegner` 146 | - `@sroegner `_ 147 | - 1 148 | * - :raw-html-m2r:`@SJern` 149 | - `@SJern `_ 150 | - 1 151 | * - :raw-html-m2r:`@sielaq` 152 | - `@sielaq `_ 153 | - 1 154 | * - :raw-html-m2r:`@hwhesselink` 155 | - `@hwhesselink `_ 156 | - 1 157 | * - :raw-html-m2r:`@mattLLVW` 158 | - `@mattLLVW `_ 159 | - 1 160 | * - :raw-html-m2r:`@noelmcloughlin` 161 | - `@noelmcloughlin `_ 162 | - 1 163 | 164 | 165 | ---- 166 | 167 | Auto-generated by a `forked version `_ of `gaocegege/maintainer `_ on 2022-10-10. 168 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.2.1](https://github.com/saltstack-formulas/collectd-formula/compare/v1.2.0...v1.2.1) (2022-10-10) 4 | 5 | 6 | ### Continuous Integration 7 | 8 | * update `pre-commit` configuration inc. for pre-commit.ci [skip ci] ([ef5dbf6](https://github.com/saltstack-formulas/collectd-formula/commit/ef5dbf60fdca9ac827667c2d51ac02dc3a3c9700)) 9 | 10 | 11 | ### Documentation 12 | 13 | * add collectd.rabbitmq to README ([dac2c30](https://github.com/saltstack-formulas/collectd-formula/commit/dac2c3014d91acd58c9cb2d4a96c6aed405a47f7)) 14 | 15 | # [1.2.0](https://github.com/saltstack-formulas/collectd-formula/compare/v1.1.4...v1.2.0) (2022-05-24) 16 | 17 | 18 | ### Bug Fixes 19 | 20 | * **pre-commit:** run end-of-file-fixer & trailing-whitespace [skip ci] ([31fa9fe](https://github.com/saltstack-formulas/collectd-formula/commit/31fa9fe67adfc1353ef949f1fa2513256723729b)) 21 | 22 | 23 | ### Continuous Integration 24 | 25 | * **kitchen+gitlab:** update for new pre-salted images [skip ci] ([58d674a](https://github.com/saltstack-formulas/collectd-formula/commit/58d674a6eb8053edfb3df462d4e364599d6f6b27)) 26 | * update linters to latest versions [skip ci] ([8a38847](https://github.com/saltstack-formulas/collectd-formula/commit/8a38847c19019dd7c6b0e217c6cc45b01d402647)) 27 | * **3003.1:** update inc. AlmaLinux, Rocky & `rst-lint` [skip ci] ([8faa695](https://github.com/saltstack-formulas/collectd-formula/commit/8faa6950d68c3e13bd163f464972eb58efa84cd7)) 28 | * **commitlint:** ensure `upstream/master` uses main repo URL [skip ci] ([5a197ba](https://github.com/saltstack-formulas/collectd-formula/commit/5a197ba2e7705c146999511d269d50d4b537123c)) 29 | * **gemfile:** allow rubygems proxy to be provided as an env var [skip ci] ([aaede7c](https://github.com/saltstack-formulas/collectd-formula/commit/aaede7cfebbcde05ba9d6b6bb1d2b658f7b6a1a7)) 30 | * **gemfile+lock:** use `ssf` customised `inspec` repo [skip ci] ([046e462](https://github.com/saltstack-formulas/collectd-formula/commit/046e462ad3369cef39b58e04c8f8540240b77627)) 31 | * **gemfile+lock:** use `ssf` customised `kitchen-docker` repo [skip ci] ([eb78490](https://github.com/saltstack-formulas/collectd-formula/commit/eb78490abf1f5d41b789cd7c78a58114b7bf159b)) 32 | * **gitlab-ci:** add `rubocop` linter (with `allow_failure`) [skip ci] ([0779ef2](https://github.com/saltstack-formulas/collectd-formula/commit/0779ef284723b52f8d3ecc613fdec4fa8511bbe5)) 33 | * **kitchen:** move `provisioner` block & update `run_command` [skip ci] ([21c60b6](https://github.com/saltstack-formulas/collectd-formula/commit/21c60b6154597d8b35920ad1c54790fde984b8aa)) 34 | * **kitchen+ci:** update with `3004` pre-salted images/boxes [skip ci] ([d1de343](https://github.com/saltstack-formulas/collectd-formula/commit/d1de3430bb3292826fcd1f6971f7ee8b2a36a5dc)) 35 | * **kitchen+ci:** update with latest `3003.2` pre-salted images [skip ci] ([1cdfb69](https://github.com/saltstack-formulas/collectd-formula/commit/1cdfb695812b9290cbdef2ac82e0dbaba39fc9f2)) 36 | * **kitchen+ci:** update with latest CVE pre-salted images [skip ci] ([103319f](https://github.com/saltstack-formulas/collectd-formula/commit/103319f9e2119826de0638b1d5d577977ef43f06)) 37 | * **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] ([b248172](https://github.com/saltstack-formulas/collectd-formula/commit/b2481722ac58aa4c3547b3663000aa65ac5061e3)) 38 | * **kitchen+gitlab:** update for new pre-salted images [skip ci] ([68eb22b](https://github.com/saltstack-formulas/collectd-formula/commit/68eb22b5605ea35bcdb9f85a8f8f19dee8b1cce4)) 39 | * add Debian 11 Bullseye & update `yamllint` configuration [skip ci] ([7ff9ab3](https://github.com/saltstack-formulas/collectd-formula/commit/7ff9ab373186293be38bbbc92f8722e32d7f479f)) 40 | * **kitchen+gitlab:** remove Ubuntu 16.04 & Fedora 32 (EOL) [skip ci] ([981d59f](https://github.com/saltstack-formulas/collectd-formula/commit/981d59f3a77537d55624d1701fa27673becc4bd1)) 41 | * add `arch-master` to matrix and update `.travis.yml` [skip ci] ([fc87b11](https://github.com/saltstack-formulas/collectd-formula/commit/fc87b114c44b9f1f71610e3d7608fd3597d3ca7c)) 42 | * **kitchen+gitlab:** adjust matrix to add `3003` [skip ci] ([3033960](https://github.com/saltstack-formulas/collectd-formula/commit/3033960b701910863570da7921fe1ae7814d528b)) 43 | * **kitchen+gitlab-ci:** use latest pre-salted images [skip ci] ([f3947ed](https://github.com/saltstack-formulas/collectd-formula/commit/f3947edc74b22802b27b8948c1b2a7b8deea742e)) 44 | * **pre-commit:** update hook for `rubocop` [skip ci] ([ce9ad2d](https://github.com/saltstack-formulas/collectd-formula/commit/ce9ad2d34e8e2045a77418a3bc01a4af28f7f082)) 45 | 46 | 47 | ### Documentation 48 | 49 | * **readme:** fix `rstcheck` violation [skip ci] ([90f356c](https://github.com/saltstack-formulas/collectd-formula/commit/90f356c34e2ac61bc7282bbfbc7c34ef59fde857)) 50 | * **readme:** fix `rstcheck` violations [skip ci] ([6e42eec](https://github.com/saltstack-formulas/collectd-formula/commit/6e42eece74b0e115eb3e110a37d281f2478088c9)) 51 | * **readme:** fix headings [skip ci] ([637557a](https://github.com/saltstack-formulas/collectd-formula/commit/637557af5a65cf0bc03849b3aefe22060c6eb8a5)) 52 | 53 | 54 | ### Features 55 | 56 | * **collectd:** add missing parameters for PostgreSQL plugin ([82d7104](https://github.com/saltstack-formulas/collectd-formula/commit/82d71045e753bd18586b4a8e60a4750444874ba7)) 57 | 58 | 59 | ### Tests 60 | 61 | * **alma+rocky:** add platforms (based on CentOS 8) [skip ci] ([961ab46](https://github.com/saltstack-formulas/collectd-formula/commit/961ab466f89f199ff720daa58d69ac63e3aa84d8)) 62 | * **install+config:** fix for Oracle Linux ([703ada2](https://github.com/saltstack-formulas/collectd-formula/commit/703ada2b046c4208da8bd3895cf8331a02e4eead)) 63 | * **system:** add `build_platform_codename` [skip ci] ([052f212](https://github.com/saltstack-formulas/collectd-formula/commit/052f21275c86eb7df52645328695b306255bedce)) 64 | * **system.rb:** add support for `mac_os_x` [skip ci] ([6061cc3](https://github.com/saltstack-formulas/collectd-formula/commit/6061cc3b9b2d0b344bce1170ee8ccb04c2d265f2)) 65 | * standardise use of `share` suite & `_mapdata` state [skip ci] ([f461b84](https://github.com/saltstack-formulas/collectd-formula/commit/f461b84ce748224850a66ee1179fe49ab791ae2d)) 66 | 67 | ## [1.1.4](https://github.com/saltstack-formulas/collectd-formula/compare/v1.1.3...v1.1.4) (2020-12-16) 68 | 69 | 70 | ### Bug Fixes 71 | 72 | * **release.config.js:** use full commit hash in commit link [skip ci] ([8b108b5](https://github.com/saltstack-formulas/collectd-formula/commit/8b108b5e8dd8de88a98d342493820bd04f5c4e84)) 73 | 74 | 75 | ### Continuous Integration 76 | 77 | * **gemfile:** restrict `train` gem version until upstream fix [skip ci] ([18b26ab](https://github.com/saltstack-formulas/collectd-formula/commit/18b26ab21d946703f4cf06b248a3468932293054)) 78 | * **gemfile.lock:** add to repo with updated `Gemfile` [skip ci] ([ab3add7](https://github.com/saltstack-formulas/collectd-formula/commit/ab3add7671fc7ce707eaaa3aa3ca1ef3d546140c)) 79 | * **gitlab-ci:** use GitLab CI as Travis CI replacement ([572e73c](https://github.com/saltstack-formulas/collectd-formula/commit/572e73c12142c0df85f1f6dcf9e6886f2bb5b468)) 80 | * **kitchen:** avoid using bootstrap for `master` instances [skip ci] ([bca1b99](https://github.com/saltstack-formulas/collectd-formula/commit/bca1b99c3371f00e81901ddc514db86fbeb60d46)) 81 | * **kitchen:** use `debian-10-master-py3` instead of `develop` [skip ci] ([7ed2701](https://github.com/saltstack-formulas/collectd-formula/commit/7ed27017c6c28c7b64540c86c3bab721825a03e6)) 82 | * **kitchen:** use `develop` image until `master` is ready (`amazonlinux`) [skip ci] ([c36843c](https://github.com/saltstack-formulas/collectd-formula/commit/c36843c1b4efec35646b0d08aaebc41c02a5ed38)) 83 | * **kitchen:** use `saltimages` Docker Hub where available [skip ci] ([071343b](https://github.com/saltstack-formulas/collectd-formula/commit/071343b57c752fb2f5f7026f55a4a70bafd9b36a)) 84 | * **kitchen+travis:** remove `master-py2-arch-base-latest` [skip ci] ([9814be5](https://github.com/saltstack-formulas/collectd-formula/commit/9814be5d2bc7c68adbd9967261bfab64425ac041)) 85 | * **kitchen+travis:** upgrade matrix after `2019.2.2` release [skip ci] ([a147c9d](https://github.com/saltstack-formulas/collectd-formula/commit/a147c9de11f40248134b41aed25938be9f6e0394)) 86 | * **pre-commit:** add to formula [skip ci] ([5f80569](https://github.com/saltstack-formulas/collectd-formula/commit/5f80569c71ee2ee543e57bf70c2557e59e005ca3)) 87 | * **pre-commit:** enable/disable `rstcheck` as relevant [skip ci] ([88ed018](https://github.com/saltstack-formulas/collectd-formula/commit/88ed018f99c1d185f8d642db8ffc6c4420cbbd42)) 88 | * **pre-commit:** finalise `rstcheck` configuration [skip ci] ([938b8ed](https://github.com/saltstack-formulas/collectd-formula/commit/938b8ed04fc21712470b7f756d99e9d1d27c2dea)) 89 | * **travis:** add notifications => zulip [skip ci] ([3558a40](https://github.com/saltstack-formulas/collectd-formula/commit/3558a403e96186f5e0df8a36f1c762c6f2b32a67)) 90 | * **travis:** apply changes from build config validation [skip ci] ([2cb2751](https://github.com/saltstack-formulas/collectd-formula/commit/2cb275198b7e5040db442e3173f54868cf44779f)) 91 | * **travis:** opt-in to `dpl v2` to complete build config validation [skip ci] ([17ccf35](https://github.com/saltstack-formulas/collectd-formula/commit/17ccf35c40e6f4039d3f320403832ee56c1f12fa)) 92 | * **travis:** quote pathspecs used with `git ls-files` [skip ci] ([2c9ef3e](https://github.com/saltstack-formulas/collectd-formula/commit/2c9ef3ebb351606d90e89419b3eb0a59658c07e3)) 93 | * **travis:** run `shellcheck` during lint job [skip ci] ([310c19f](https://github.com/saltstack-formulas/collectd-formula/commit/310c19fd41213496816db47af7c1c16257d5f938)) 94 | * **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([a351fd3](https://github.com/saltstack-formulas/collectd-formula/commit/a351fd3f32f12524cb6c6e318adcac5d71a1879a)) 95 | * **travis:** use `major.minor` for `semantic-release` version [skip ci] ([32b8c33](https://github.com/saltstack-formulas/collectd-formula/commit/32b8c3302c94f7755d5df8457f88308ea101feda)) 96 | * **travis:** use build config validation (beta) [skip ci] ([e55fc61](https://github.com/saltstack-formulas/collectd-formula/commit/e55fc616a255636b7e9531d4fc2e87ec7af599b7)) 97 | * **workflows/commitlint:** add to repo [skip ci] ([c71e7b3](https://github.com/saltstack-formulas/collectd-formula/commit/c71e7b364d979be8ef4734441b372d0e9b2dd9fd)) 98 | 99 | 100 | ### Documentation 101 | 102 | * **contributing:** remove to use org-level file instead [skip ci] ([3ce31da](https://github.com/saltstack-formulas/collectd-formula/commit/3ce31da191632c63686db4d8ee2e669e672b10aa)) 103 | * **readme:** update link to `CONTRIBUTING` [skip ci] ([f23ed24](https://github.com/saltstack-formulas/collectd-formula/commit/f23ed2431d69d1049ee9527f8511bd0d9f6f2c1d)) 104 | 105 | 106 | ### Performance Improvements 107 | 108 | * **travis:** improve `salt-lint` invocation [skip ci] ([c583ff4](https://github.com/saltstack-formulas/collectd-formula/commit/c583ff47c48a1daa330393867f56f51dfe084205)) 109 | 110 | ## [1.1.3](https://github.com/saltstack-formulas/collectd-formula/compare/v1.1.2...v1.1.3) (2019-10-11) 111 | 112 | 113 | ### Bug Fixes 114 | 115 | * **rubocop:** add fixes using `rubocop --safe-auto-correct` ([](https://github.com/saltstack-formulas/collectd-formula/commit/9eba083)) 116 | 117 | 118 | ### Continuous Integration 119 | 120 | * merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/collectd-formula/commit/f8e5542)) 121 | * **travis:** merge `rubocop` linter into main `lint` job ([](https://github.com/saltstack-formulas/collectd-formula/commit/a95ec51)) 122 | 123 | ## [1.1.2](https://github.com/saltstack-formulas/collectd-formula/compare/v1.1.1...v1.1.2) (2019-10-09) 124 | 125 | 126 | ### Bug Fixes 127 | 128 | * **map.jinja:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/collectd-formula/commit/29f03c5)) 129 | * **network.sls:** fix `salt-lint` errors ([](https://github.com/saltstack-formulas/collectd-formula/commit/bdd244b)) 130 | 131 | 132 | ### Continuous Integration 133 | 134 | * **kitchen:** change `log_level` to `debug` instead of `info` ([](https://github.com/saltstack-formulas/collectd-formula/commit/3d0009a)) 135 | * **kitchen:** install required packages to bootstrapped `opensuse` [skip ci] ([](https://github.com/saltstack-formulas/collectd-formula/commit/c1ae589)) 136 | * **kitchen:** use bootstrapped `opensuse` images until `2019.2.2` [skip ci] ([](https://github.com/saltstack-formulas/collectd-formula/commit/aed6fff)) 137 | * **kitchen+travis:** replace EOL pre-salted images ([](https://github.com/saltstack-formulas/collectd-formula/commit/9f67565)) 138 | * **platform:** add `arch-base-latest` (commented out for now) [skip ci] ([](https://github.com/saltstack-formulas/collectd-formula/commit/5923a2e)) 139 | * **yamllint:** add rule `empty-values` & use new `yaml-files` setting ([](https://github.com/saltstack-formulas/collectd-formula/commit/768a78e)) 140 | * merge travis matrix, add `salt-lint` & `rubocop` to `lint` job ([](https://github.com/saltstack-formulas/collectd-formula/commit/0e2bd15)) 141 | * use `dist: bionic` & apply `opensuse-leap-15` SCP error workaround ([](https://github.com/saltstack-formulas/collectd-formula/commit/505054d)) 142 | 143 | ## [1.1.1](https://github.com/saltstack-formulas/collectd-formula/compare/v1.1.0...v1.1.1) (2019-08-23) 144 | 145 | 146 | ### Bug Fixes 147 | 148 | * change iteritems to items to be Py3 compatible ([e7cc023](https://github.com/saltstack-formulas/collectd-formula/commit/e7cc023)) 149 | 150 | # [1.1.0](https://github.com/saltstack-formulas/collectd-formula/compare/v1.0.1...v1.1.0) (2019-08-10) 151 | 152 | 153 | ### Continuous Integration 154 | 155 | * **kitchen+travis:** modify matrix to include `develop` platform ([793b952](https://github.com/saltstack-formulas/collectd-formula/commit/793b952)) 156 | 157 | 158 | ### Features 159 | 160 | * **yamllint:** include for this repo and apply rules throughout ([31883ff](https://github.com/saltstack-formulas/collectd-formula/commit/31883ff)) 161 | 162 | ## [1.0.1](https://github.com/saltstack-formulas/collectd-formula/compare/v1.0.0...v1.0.1) (2019-04-24) 163 | 164 | 165 | ### Documentation 166 | 167 | * **semantic-release:** implement an automated changelog ([54618f7](https://github.com/saltstack-formulas/collectd-formula/commit/54618f7)) 168 | --------------------------------------------------------------------------------