Simplify Plex promtail/loki config (#342)

* simplify plex promtail config

* bump plex version

* fix linting issue
This commit is contained in:
Devin Buhl 2020-08-28 11:08:48 -04:00 committed by GitHub
parent 83d76d5abe
commit c940ad648c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 30 deletions

View File

@ -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/

View File

@ -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 }}

View File

@ -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: