mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-17 20:09:21 +00:00
[plex-exporter] Update to common, add loglevel argument (#48)
* [plex-exporter] Update to common, add loglevel argument * Fix empty lines * Clean linting * Add missing repo to ct
This commit is contained in:
1
.github/ct.yaml
vendored
1
.github/ct.yaml
vendored
@@ -8,3 +8,4 @@ chart-repos:
|
|||||||
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
|
- k8s-at-home-libraries=https://library-charts.k8s-at-home.com
|
||||||
- k8s-at-home=https://k8s-at-home.com/charts
|
- k8s-at-home=https://k8s-at-home.com/charts
|
||||||
- jetstack=https://charts.jetstack.io
|
- jetstack=https://charts.jetstack.io
|
||||||
|
- nikdoof=https://nikdoof.github.io/helm-charts/
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
appVersion: 0.2.2
|
appVersion: 0.2.3
|
||||||
description: A prometheus exporter for Plex Media Server
|
description: A prometheus exporter for Plex Media Server
|
||||||
name: plex-exporter
|
name: plex-exporter
|
||||||
version: 0.1.2
|
version: 0.1.3
|
||||||
kubeVersion: ">=1.16.0-0"
|
kubeVersion: ">=1.16.0-0"
|
||||||
keywords:
|
keywords:
|
||||||
- plex-exporter
|
- plex-exporter
|
||||||
@@ -16,5 +16,4 @@ maintainers:
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: common
|
- name: common
|
||||||
repository: https://nikdoof.github.io/helm-charts/
|
repository: https://nikdoof.github.io/helm-charts/
|
||||||
version: 4.5.2
|
version: 4.5.3
|
||||||
|
|
||||||
|
|||||||
5
charts/plex-exporter/ci/loglevel.yml
Normal file
5
charts/plex-exporter/ci/loglevel.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
plex:
|
||||||
|
autodiscover: true
|
||||||
|
token: a0a0a0a0a0
|
||||||
|
loglevel: debug
|
||||||
@@ -14,6 +14,10 @@ args:
|
|||||||
- "--token"
|
- "--token"
|
||||||
- "{{ .Values.plex.token }}"
|
- "{{ .Values.plex.token }}"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if .Values.plex.loglevel }}
|
||||||
|
- "--log-level"
|
||||||
|
- "{{ .Values.plex.loglevel }}"
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $_ := mergeOverwrite .Values (include "plex-exporter.harcodedValues" . | fromYaml) -}}
|
{{- $_ := mergeOverwrite .Values (include "plex-exporter.harcodedValues" . | fromYaml) -}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
|
|
||||||
{{- include "common.values.setup" . -}}
|
|
||||||
apiVersion: monitoring.coreos.com/v1
|
|
||||||
kind: PrometheusRule
|
|
||||||
metadata:
|
|
||||||
name: {{ include "common.names.fullname" . }}
|
|
||||||
labels:
|
|
||||||
{{- include "common.labels" . | nindent 4 }}
|
|
||||||
{{- with .Values.metrics.prometheusRule.labels }}
|
|
||||||
{{- toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
groups:
|
|
||||||
- name: {{ include "common.names.fullname" . }}
|
|
||||||
rules:
|
|
||||||
- alert: PlexExporterAbsent
|
|
||||||
annotations:
|
|
||||||
description: Plex Exporter has disappeared from Prometheus service discovery.
|
|
||||||
summary: Plex Exporter is down.
|
|
||||||
expr: |
|
|
||||||
absent(up{job=~".*{{ include "common.names.fullname" . }}.*"} == 1)
|
|
||||||
for: 5m
|
|
||||||
labels:
|
|
||||||
severity: critical
|
|
||||||
{{- with .Values.metrics.prometheusRule.rules }}
|
|
||||||
{{- toYaml . | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
{{- if .Values.metrics.enabled }}
|
|
||||||
{{- include "common.values.setup" . -}}
|
|
||||||
apiVersion: monitoring.coreos.com/v1
|
|
||||||
kind: ServiceMonitor
|
|
||||||
metadata:
|
|
||||||
name: {{ include "common.names.fullname" . }}
|
|
||||||
labels:
|
|
||||||
{{- include "common.labels" . | nindent 4 }}
|
|
||||||
{{- with .Values.metrics.serviceMonitor.labels }}
|
|
||||||
{{- toYaml . | nindent 4 }}
|
|
||||||
{{- end }}
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "common.labels.selectorLabels" . | nindent 6 }}
|
|
||||||
endpoints:
|
|
||||||
- port: metrics
|
|
||||||
{{- with .Values.metrics.serviceMonitor.interval }}
|
|
||||||
interval: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Values.metrics.serviceMonitor.scrapeTimeout }}
|
|
||||||
scrapeTimeout: {{ . }}
|
|
||||||
{{- end }}
|
|
||||||
path: /metrics
|
|
||||||
{{- end }}
|
|
||||||
@@ -9,7 +9,7 @@ image:
|
|||||||
# -- image repository
|
# -- image repository
|
||||||
repository: granra/plex_exporter
|
repository: granra/plex_exporter
|
||||||
# -- image tag
|
# -- image tag
|
||||||
tag: v0.2.2
|
tag: v0.2.3
|
||||||
# -- image pull policy
|
# -- image pull policy
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
@@ -42,6 +42,8 @@ plex:
|
|||||||
token:
|
token:
|
||||||
# -- Enable autodiscover using plex.tv
|
# -- Enable autodiscover using plex.tv
|
||||||
autodiscover: true
|
autodiscover: true
|
||||||
|
# -- Logging level
|
||||||
|
# loglevel: info
|
||||||
|
|
||||||
metrics:
|
metrics:
|
||||||
# -- Enable and configure a Prometheus serviceMonitor for the chart under this key.
|
# -- Enable and configure a Prometheus serviceMonitor for the chart under this key.
|
||||||
@@ -58,13 +60,13 @@ metrics:
|
|||||||
labels: {}
|
labels: {}
|
||||||
# -- Configure additionial rules for the chart under this key.
|
# -- Configure additionial rules for the chart under this key.
|
||||||
# @default -- See prometheusrules.yaml
|
# @default -- See prometheusrules.yaml
|
||||||
rules: []
|
rules:
|
||||||
# - alert: plexExporterAbsent
|
- alert: PlexExporterAbsent
|
||||||
# annotations:
|
annotations:
|
||||||
# description: plex Exporter has disappeared from Prometheus service discovery.
|
description: Plex Exporter has disappeared from Prometheus service discovery.
|
||||||
# summary: plex Exporter is down.
|
summary: Plex Exporter is down.
|
||||||
# expr: |
|
expr: |
|
||||||
# absent(up{job=~".*plexexporter.*"} == 1)
|
absent(up{job=~".*{{ include "common.names.fullname" . }}.*"} == 1)
|
||||||
# for: 5m
|
for: 5m
|
||||||
# labels:
|
labels:
|
||||||
# severity: critical
|
severity: critical
|
||||||
|
|||||||
Reference in New Issue
Block a user