From 68b2e2a1e11b777ff9f59ffba8dc67008a846442 Mon Sep 17 00:00:00 2001 From: Ardiea Date: Fri, 18 Feb 2022 11:55:54 -0500 Subject: [PATCH 1/2] Initial refactor of the vector configuration management code to support extra configuration files and global sink definitions. Adding vault lookups for the loki configuration. Initial commit of odlvideo vector monitoring configuration file. Fixing data structure layout of odlvideo vector configs. Initial commit of reddit vector monitoring configuration file. Further development Finished validation of monitoring configuration for all phase one apps. --- pillar/vector/cas.sls | 145 +++++++++++++++++++++++++++++++ pillar/vector/init.sls | 80 ++++++++++++----- pillar/vector/odlvideo.sls | 140 ++++++++++++++++++++++++++++++ pillar/vector/rabbitmq.sls | 51 +++++++++++ pillar/vector/reddit.sls | 165 ++++++++++++++++++++++++++++++++++++ pillar/vector/xqwatcher.sls | 115 +++++++++++++++++++++++++ salt/vector/configure.sls | 17 +++- 7 files changed, 689 insertions(+), 24 deletions(-) create mode 100644 pillar/vector/cas.sls create mode 100644 pillar/vector/odlvideo.sls create mode 100644 pillar/vector/rabbitmq.sls create mode 100644 pillar/vector/reddit.sls create mode 100644 pillar/vector/xqwatcher.sls diff --git a/pillar/vector/cas.sls b/pillar/vector/cas.sls new file mode 100644 index 000000000..1e06b7576 --- /dev/null +++ b/pillar/vector/cas.sls @@ -0,0 +1,145 @@ +vector: + extra_configurations: + - name: cas_logs + content: + log_schema: + timestamp_key: vector_timestamp + host_key: log_host + sources: + collect_cas_nginx_access_logs: + type: file + read_from: end + file_key: log_file + include: + - /var/log/nginx/access.log + collect_cas_nginx_error_logs: + type: file + read_from: end + file_key: log_file + include: + - /var/log/nginx/error.log + collect_cas_application_logs: + type: file + read_from: end + file_key: log_file + include: + - /opt/log/django.log + multiline: + start_pattern: '^\[' + condition_pattern: '^\[' + mode: 'halt_before' + timeout_ms: 5000 + collect_auth_logs: + {{ salt.pillar.get('vector:base_auth_log_collection')|yaml(False)|indent(8) }} + transforms: + # Transforms for NGINX logs + parse_cas_nginx_access_logs: + type: remap + inputs: + - 'collect_cas_nginx_access_logs' + source: | + parsed, err = parse_regex(.message, r'^time=(?P