update_rs_collector_ng_config

rs-collector-ng

Usage

- hosts: servers
  var:
    RSCOLLECTORNG:
      ...
  roles:
    - { role: update_rs_collector_ng_config, tags: [ 'rscollectorng' ], _rs_collector_ng: "{{ RSCOLLECTORNG }}" }

Collectors

The default template will enable the collectors postfix and rscollector. Additional collectors can be configured using the _rs_collector_ng variable.

JVM

_rs_collector_ng:
  jvm: # array of JVM collectors
    - command: tomcat # gets matched against `jps` output
      tags: # additional bosun tags, only for this jvm
        jvm_name: tomcat # add `jvm_name` tag to keep old rs-collector's behavior

Mongo

_rs_collector_ng:
  mongo: # array of MONGO collectors
    # c.f. https://www.mongodb.com/docs/v3.6/reference/connection-string/
    # NOTE: Intended to be used with a direct connection e.g. specify only one host
    - connection_string: "mongodb://user:password@hostname:27015/?tls=true&tlsCAFile=/etc/ssl/certs/ca-certificates.crt"

Galera

_rs_collector_ng:
  galera: # array of GALERA collectors
    - user: username
      password: password
      # specify socket...
      socket: /var/path/to/socket
      # ...or host & port...
      host: localhost
      port: 1337
      # ...but not both
      use_ssl: true
      ca_cert: /etc/path/to/ca.crt

Ssh Certificate

_rs_collector_ng:
  ssh_certificate: # array of GALERA collectors
    - path: /etc/ssh/example-cert.pub
      name: my_cert # optional, inferred from file stem (example-cert)

Disable default collectors

_rs_collector_ng:
    # Here's how postfix is enabled by the default value
    # >>> postfix: [{}]
    # so to disable just set it to an empty list
    postfix: []
    # also works for rscollector
    rscollector: []

The default template will enable the bosun emitter using _scollector values.

_scollector:
  auth:
    user: USERNAME
    password: PASSWORD
  server:
    ip: IP_OR_HOST
    port: PORT_NUMBER

Emitter

Bosun is configured on the key _rs_collector_ng.bosun. If omitted the default behavior is used: Values are taken from the configuration for scollector which have to be provided via the _scollector key.

- { role: update_rs_collector_ng_config, tags: [ 'rscollectorng' ], _scollector: "{{ SCOLLECTOR }}" }

If the key _rs_collector_ng.bosun or any children are provided then the default is not used. Instead one has to provide desired values like so:

_rs_collector_ng:
  # Bosun emitter
  bosun:
    host: "https://user:[email protected]:8070/"
    tags: # tags are optional and can be omitted
      key: value
About

Configures rs_collector_ng

Install
ansible-galaxy install Rheinwerk/ansible-role-update_rs_collector_ng_config
GitHub repository
License
gpl-3.0
Downloads
3943
Owner