From c940ad648c4fde2815a674438fb104ae49039347 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 28 Aug 2020 11:08:48 -0400 Subject: [PATCH] Simplify Plex promtail/loki config (#342) * simplify plex promtail config * bump plex version * fix linting issue --- charts/plex/Chart.yaml | 2 +- charts/plex/templates/promtail-configmap.yaml | 26 +++++++++++++++--- charts/plex/values.yaml | 27 ++----------------- 3 files changed, 25 insertions(+), 30 deletions(-) diff --git a/charts/plex/Chart.yaml b/charts/plex/Chart.yaml index f521d59f..64611f4e 100644 --- a/charts/plex/Chart.yaml +++ b/charts/plex/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 1.19.5.3112-b23ab3896 description: Plex Media Server name: plex -version: 1.8.0 +version: 1.8.1 keywords: - plex home: https://plex.tv/ diff --git a/charts/plex/templates/promtail-configmap.yaml b/charts/plex/templates/promtail-configmap.yaml index 2fc83ce5..e79fea48 100644 --- a/charts/plex/templates/promtail-configmap.yaml +++ b/charts/plex/templates/promtail-configmap.yaml @@ -10,9 +10,27 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} data: -{{- if .Values.logging.promtail.config }} -{{ $root := . }} promtail.yaml: | -{{ tpl (toYaml .Values.logging.promtail.config | indent 4) $root }} -{{- end }} + server: + http_listen_port: 9080 + grpc_listen_port: 0 + positions: + filename: /tmp/positions.yaml + clients: + - url: {{ .Values.logging.promtail.loki.url }} + scrape_configs: + - job_name: plex-logs + static_configs: + - targets: + - localhost + labels: + job: plex-logs + __path__: "/plex-logs/*.log" + - job_name: plex-plugin-logs + static_configs: + - targets: + - localhost + labels: + job: plex-plugin-logs + __path__: "/plex-logs/PMS Plugin Logs/*.log" {{- end }} diff --git a/charts/plex/values.yaml b/charts/plex/values.yaml index 97593375..5be63e65 100644 --- a/charts/plex/values.yaml +++ b/charts/plex/values.yaml @@ -292,9 +292,6 @@ certificate: mountPath: /etc/plex-certs # Logging configuration -# Standard Plex log paths: -# - /config/Library/Application\ Support/Plex\ Media\ Server/Logs/*.log -# - /config/Library/Application\ Support/Plex\ Media\ Server/Logs/PMS Plugin Logs/*.log logging: promtail: enabled: false @@ -302,28 +299,8 @@ logging: repository: grafana/promtail tag: 1.6.0 pullPolicy: IfNotPresent - config: - server: - disable: true - positions: - filename: /tmp/positions.yaml - clients: - - url: http://loki.logs.svc.cluster.local:3100/loki/api/v1/push - scrape_configs: - - job_name: plex-logs - static_configs: - - targets: - - localhost - labels: - job: plex-logs - __path__: "/plex-logs/*.log" - - job_name: plex-plugin-logs - static_configs: - - targets: - - localhost - labels: - job: plex-plugin-logs - __path__: "/plex-logs/PMS Plugin Logs/*.log" + loki: + url: http://loki.logs.svc.cluster.local:3100/loki/api/v1/push # Probes configuration probes: