Skip to content

Commit

Permalink
ci: 👷 move filebeat config for helm
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed Jul 22, 2023
1 parent 78ba440 commit 6e2cf0d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 141 deletions.
2 changes: 1 addition & 1 deletion docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ services:
- X_OVH_TOKEN
- API_OVH_TOKEN
volumes:
- $PWD/infra/filebeat.elastic.yml:/usr/share/filebeat/filebeat.yml:ro
- $PWD/infra/kube/helm/configs/filebeat.elastic.yml:/usr/share/filebeat/filebeat.yml:ro
- /var/log/basegun:/var/log/basegun
command: bash -c "sleep 30 && filebeat -e --strict.perms=false"
File renamed without changes.
141 changes: 1 addition & 140 deletions infra/kube/helm/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,143 +13,4 @@ metadata:
name: {{ include "basegun.name" . }}-filebeat-config
data:
filebeat.elastic.yml: |-
###################### Filebeat Configuration Example #########################
# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html
# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.
#=========================== Filebeat inputs =============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /tmp/log/basegun/log.json
# Exclude lines. A list of regular expressions to match. It drops the lines that are
# matching any regular expression from the list.
#exclude_lines: ['^DBG']
# Include lines. A list of regular expressions to match. It exports the lines that are
# matching any regular expression from the list.
#include_lines: ['^ERR', '^WARN']
# Exclude files. A list of regular expressions to match. Filebeat drops the files that
# are matching any regular expression from the list. By default, no files are dropped.
#exclude_files: ['.gz$']
# Optional additional fields. These fields can be freely picked
# to add additional information to the crawled log files for filtering
#fields:
# level: debug
# review: 1
### JSON configuration
# Decode JSON options. Enable this if your logs are structured in JSON.
# JSON key on which to apply the line filtering and multiline settings. This key
# must be top level and its value must be string, otherwise it is ignored. If
# no text key is defined, the line filtering and multiline features cannot be used.
#json.message_key:
# By default, the decoded JSON is placed under a "json" key in the output document.
# If you enable this setting, the keys are copied top level in the output document.
json.keys_under_root: true
# If keys_under_root and this setting are enabled, then the values from the decoded
# JSON object overwrite the fields that Filebeat normally adds (type, source, offset, etc.)
# in case of conflicts.
json.overwrite_keys: false
# If this setting is enabled, Filebeat adds a "json_error" key in case of JSON
# unmarshaling errors or when a text key is defined in the configuration but cannot
# be used.
json.add_error_key: true
json.expand_keys: true
#============================= Filebeat modules ===============================
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: false
# Period on which files under path should be checked for changes
#reload.period: 10s
#================================ General =====================================
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:
# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]
# Optional fields that you can specify to add additional information to the
# output.
fields_under_root: true
fields:
X-OVH-TOKEN: "${X_OVH_TOKEN}"
#================================ Outputs =====================================
# Configure what output to use when sending the data collected by the beat.
#================================ Processors =====================================
# Configure processors to enhance or manipulate events generated by the beat.
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
#==================== Elasticsearch template setting ==========================
setup.template.enabled: false
setup.ilm.enabled: false
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["gra1.logs.ovh.com:9200"]
# Protocol - either `http` (default) or `https`.
protocol: "https"
# Authentication credentials using API key
username: "${API_OVH_TOKEN}"
password: "token"
index: "ldp-logs"
#================================ Logging =====================================
# Sets log level. The default log level is info.
# Available log levels are: error, warning, info, debug
#logging.level: debug
# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]
{{ .Files.Get "configs/filebeat.elastic.yml" | nindent 4 }}

0 comments on commit 6e2cf0d

Please sign in to comment.