Rheinwerk.update_rs_collector_ng_config
rs-collector-ng
How to Use It
- hosts: servers
var:
RSCOLLECTORNG:
...
roles:
- { role: update_rs_collector_ng_config, tags: [ 'rscollectorng' ], _rs_collector_ng: "{{ RSCOLLECTORNG }}" }
Collectors
The basic setup will automatically enable the collectors postfix
and rscollector
. You can add more collectors by using the _rs_collector_ng
variable.
JVM
_rs_collector_ng:
jvm: # list of JVM collectors
- command: tomcat # looks for `jps` output
tags: # extra tags for this JVM
jvm_name: tomcat # keep the old behavior of rs-collector by adding `jvm_name` tag
MongoDB
_rs_collector_ng:
mongo: # list of MongoDB collectors
# see https://www.mongodb.com/docs/v3.6/reference/connection-string/
# NOTE: Use it with a direct connection, 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: # list of Galera collectors
- user: username
password: password
# specify socket...
socket: /var/path/to/socket
# ...or use 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: # list of SSH certificate collectors
- path: /etc/ssh/example-cert.pub
name: my_cert # optional, name is guessed from file name (example-cert)
Disable Default Collectors
_rs_collector_ng:
# Default setting enables postfix
# >>> postfix: [{}]
# to disable it, set it to an empty list
postfix: []
# same for rscollector
rscollector: []
The basic setup will also enable the bosun
emitter using _scollector
values.
_scollector:
auth:
user: USERNAME
password: PASSWORD
server:
ip: IP_OR_HOST
port: PORT_NUMBER
Emitter
To configure Bosun, use the key _rs_collector_ng.bosun
. If you don’t specify this, the default values from the configuration for scollector will be used. You provide those values through the _scollector
key.
- { role: update_rs_collector_ng_config, tags: [ 'rscollectorng' ], _scollector: "{{ SCOLLECTOR }}" }
If you provide _rs_collector_ng.bosun
or its subkeys, then the defaults are ignored. You'll need to specify the values like this:
_rs_collector_ng:
# Bosun emitter
bosun:
host: "https://user:[email protected]:8070/"
tags: # tags are optional and can be skipped
key: value
Installa
ansible-galaxy install Rheinwerk.update_rs_collector_ng_config
Licenza
gpl-3.0
Download
4k
Proprietario