From aa7b9fd9c65de8ef30bfd63e23c7e47420aa8053 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 13 Nov 2023 23:32:19 +0100 Subject: [PATCH] Parse nagios.log and send notifications to clickhouse.h1 --- .../puppet/site/nagios.h1.int.pdp7.net.pp | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/personal_infra/puppet/site/nagios.h1.int.pdp7.net.pp b/personal_infra/puppet/site/nagios.h1.int.pdp7.net.pp index 262b802..4010d3c 100644 --- a/personal_infra/puppet/site/nagios.h1.int.pdp7.net.pp +++ b/personal_infra/puppet/site/nagios.h1.int.pdp7.net.pp @@ -17,4 +17,48 @@ node 'nagios.h1.int.pdp7.net' { } package {'nagios-plugins-pgsql':} + + class {'otel': + version => '0.88.0', + } + + # TODO: add otelcol-contrib user to nagios group + file {'/etc/otelcol-contrib/config.yaml': + content => @("EOT") + exporters: + otlp: + endpoint: clickhouse.h1.int.pdp7.net:4317 + tls: + insecure: true + + receivers: + filelog: + include: [ /var/log/nagios/nagios.log ] + operators: + - type: regex_parser + regex: '^\[(?P