From 164012d4885b81c87f4a4aebeb49fdca75fc1eec Mon Sep 17 00:00:00 2001 From: sumologic-sanyaku-apps Date: Fri, 30 Jun 2023 13:15:46 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20synced=20local=20'assets/conf.d/?= =?UTF-8?q?examples/'=20with=20remote=20'otelcol-examples/'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/conf.d/examples/kafka.yaml.example | 61 +++++++++++++++++++ .../conf.d/examples/linux_csma.yaml.example | 40 ++++++++++++ assets/conf.d/examples/nginx.yaml.example | 61 +++++++++++++++++++ .../pcicomplianceforlinux.yaml.example | 53 ++++++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 assets/conf.d/examples/kafka.yaml.example create mode 100644 assets/conf.d/examples/linux_csma.yaml.example create mode 100644 assets/conf.d/examples/nginx.yaml.example create mode 100644 assets/conf.d/examples/pcicomplianceforlinux.yaml.example diff --git a/assets/conf.d/examples/kafka.yaml.example b/assets/conf.d/examples/kafka.yaml.example new file mode 100644 index 00000000..3f59c5c3 --- /dev/null +++ b/assets/conf.d/examples/kafka.yaml.example @@ -0,0 +1,61 @@ +receivers: + kafka/localhost: + brokers: localhost:9092 + filelog/kafka/serverLogs/localhost: + include_file_name: false + include_file_path: true + operators: + - type: move + from: attributes["log.file.path"] + to: resource["log.file.path"] + include: + - /var/log/kafka/server*.log + filelog/kafka/controllerLogs/localhost: + multiline: + line_start_pattern: ^\[\S{3}\s\S{3}\s\d{1,2}\s[^\]]+\].* + include_file_name: false + include_file_path: true + operators: + - type: move + from: attributes["log.file.path"] + to: resource["log.file.path"] + include: + - /var/log/kafka/controllerr*.log +processors: + resource/kafka_resource_attributes/localhost: + attributes: + - key: messaging.system + value: kafka + action: insert + - key: sumo.datasource + value: kafka + action: insert + - key: messaging.node.name + action: insert + from_attribute: host.name + - key: messaging.cluster.name + value: kafka_cluster + action: insert +service: + pipelines: + metrics/kafka/localhost: + receivers: + - kafka/localhost + processors: + - memory_limiter + - resourcedetection/system + - resource/kafka_resource_attributes/localhost + - batch + exporters: + - sumologic + logs/kafka/localhost: + receivers: + - filelog/kafka/serverLogs/localhost + - filelog/kafka/controllerLogs/localhost + processors: + - memory_limiter + - resourcedetection/system + - resource/kafka_resource_attributes/localhost + - batch + exporters: + - sumologic diff --git a/assets/conf.d/examples/linux_csma.yaml.example b/assets/conf.d/examples/linux_csma.yaml.example new file mode 100644 index 00000000..03853ecb --- /dev/null +++ b/assets/conf.d/examples/linux_csma.yaml.example @@ -0,0 +1,40 @@ +receivers: + filelog/linux/logs/localhost: + include_file_name: false + include_file_path: true + operators: + - type: move + from: attributes["log.file.path"] + to: resource["log.file.path"] + include: + - /var/log/auth.log + - /var/log/syslog + - /var/log/daemon.log + - /var/log/dpkg.log + - /var/log/kern.log + - /var/log/audit/audit.log + - /var/log/secure + - /var/log/messages + - /var/log/yum.log + - /var/log/dnf.log +processors: + resource/linux_resource_attributes/localhost: + attributes: + - key: sumo.datasource + value: linux + action: insert + - key: _sourceCategory + value: otel/linux + action: insert +service: + pipelines: + logs/linux/localhost: + receivers: + - filelog/linux/logs/localhost + processors: + - memory_limiter + - resource/linux_resource_attributes/localhost + - resourcedetection/system + - batch + exporters: + - sumologic diff --git a/assets/conf.d/examples/nginx.yaml.example b/assets/conf.d/examples/nginx.yaml.example new file mode 100644 index 00000000..b750e95e --- /dev/null +++ b/assets/conf.d/examples/nginx.yaml.example @@ -0,0 +1,61 @@ +receivers: + nginx/localhost: + endpoint: http://localhost:80/status + filelog/nginx/accessLogs/localhost: + include_file_name: false + include_file_path: true + operators: + - type: move + from: attributes["log.file.path"] + to: resource["log.file.path"] + include: + - /var/log/nginx/access*.log + filelog/nginx/errorLogs/localhost: + multiline: + line_start_pattern: ^\[\S{3}\s\S{3}\s\d{1,2}\s[^\]]+\].* + include_file_name: false + include_file_path: true + operators: + - type: move + from: attributes["log.file.path"] + to: resource["log.file.path"] + include: + - /var/log/nginx/error*.log +processors: + resource/nginx_resource_attributes/localhost: + attributes: + - key: webengine.system + value: nginx + action: insert + - key: sumo.datasource + value: nginx + action: insert + - key: webengine.node.name + action: insert + from_attribute: host.name + - key: webengine.cluster.name + value: nginx_cluster + action: insert +service: + pipelines: + metrics/nginx/localhost: + receivers: + - nginx/localhost + processors: + - memory_limiter + - resourcedetection/system + - resource/nginx_resource_attributes/localhost + - batch + exporters: + - sumologic + logs/nginx/localhost: + receivers: + - filelog/nginx/accessLogs/localhost + - filelog/nginx/errorLogs/localhost + processors: + - memory_limiter + - resourcedetection/system + - resource/nginx_resource_attributes/localhost + - batch + exporters: + - sumologic diff --git a/assets/conf.d/examples/pcicomplianceforlinux.yaml.example b/assets/conf.d/examples/pcicomplianceforlinux.yaml.example new file mode 100644 index 00000000..74765476 --- /dev/null +++ b/assets/conf.d/examples/pcicomplianceforlinux.yaml.example @@ -0,0 +1,53 @@ +--- +## +# Template Syntax: +# Using handlebarsjs syntax +# see testingdata directory for more info on template validation +# Expected Common Template Variables +# pipeline_name -> Needed to support multiple databases +# user_attributes -> array of user defined key value attributes to add +# Expected App Specific Template Variables: +# linux_include_paths -> log file path array +receivers: + filelog/PCILinux/logs/localhost: + include_file_name: false + include_file_path: true + operators: + - type: move + from: attributes["log.file.path"] + to: resource["log.file.path"] + include: + - /var/log/auth.log + - /var/log/syslog + - /var/log/daemon.log + - /var/log/dpkg.log + - /var/log/kern.log + - /var/log/audit/audit.log + - /var/log/secure + - /var/log/messages + - /var/log/yum.log + - /var/log/dnf.log +processors: + resource/PCILinux_resource_attributes/localhost: + attributes: + # Required static valued resource attributes + - key: sumo.datasource + value: linux + action: insert + # user_attributes will hold requires attribute values provided by UI + # Required resource attributes fallback, that should be exposed as user inputs in UI and be in user_attributes json object + - key: _sourceCategory + value: otel/linux + action: insert +service: + pipelines: + logs/PCILinux/localhost: + receivers: + - filelog/PCILinux/logs/localhost + processors: + - memory_limiter + - resource/PCILinux_resource_attributes/localhost + - resourcedetection/system + - batch + exporters: + - sumologic