Update service monitor for telegraf

This commit is contained in:
2020-06-26 23:23:23 +10:00
parent 0998d52889
commit 20f24ed41f
3 changed files with 22 additions and 22 deletions
+1
View File
@@ -1,5 +1,6 @@
prometheus:
prometheusSpec:
serviceMonitorSelectorNilUsesHelmValues: false
storageSpec:
volumeClaimTemplate:
spec:
+15 -14
View File
@@ -4,6 +4,7 @@ metadata:
name: telegraf
labels:
app: telegraf
release: prometheus # this can make the service monitor be discovered by prometheus
spec:
namespaceSelector:
matchNames:
@@ -15,18 +16,18 @@ spec:
endpoints:
- port: prometheus-client
interval: 30s
---
# ---
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
spec:
serviceAccountName: prometheus
serviceMonitorSelector:
matchLabels:
app: telegraf
resources:
requests:
memory: 100Mi
enableAdminAPI: false
# apiVersion: monitoring.coreos.com/v1
# kind: Prometheus
# metadata:
# name: telegraf
# spec:
# serviceAccountName: prometheus
# serviceMonitorSelector:
# matchLabels:
# app: telegraf
# resources:
# requests:
# memory: 100Mi
# enableAdminAPI: false
+6 -8
View File
@@ -1,5 +1,4 @@
replicaCount: 1
image:
repo: "telegraf"
tag: "1.14-alpine"
@@ -50,7 +49,7 @@ config:
precision: ""
debug: true
quiet: false
logfile: "/var/log/telegraf/client.log"
logfile: ""
hostname: "$HOSTNAME"
omit_hostname: false
processors:
@@ -66,9 +65,8 @@ config:
- prometheus_client:
listen: ":9126"
path: /metrics
expiration_interval: 300s
expiration_interval: 1000s
string_as_label: true
metric_version: 2
inputs:
- github:
repositories:
@@ -79,11 +77,10 @@ config:
access_token: 6bc9a1aa2d8a13da59127d4184167acc84e7bbfa
http_timeout: 10s
- http:
interval: "1800s"
interval: "900s"
urls:
- https://hub.docker.com/v2/repositories/wahyd4/
method: GET
# headers: {"User-Agent"= "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"}
insecure_skip_verify: true
timeout: 5s
data_format: json
@@ -94,7 +91,7 @@ config:
json_string_fields:
- name
- http:
interval: "1800s"
interval: "900s"
urls:
- https://api.waqi.info/feed/chengdu/us-consulate/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200
- https://api.waqi.info/feed/chengdu/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200
@@ -103,7 +100,8 @@ config:
- https://api.waqi.info/feed/neijiang/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200
- https://api.waqi.info/feed/melbourne/?token=97578eb58bcfb3ddb7280af6c6cb75df9add8200
method: GET
# headers: {"User-Agent"= "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"}
# headers: |
# {"User-Agent"= "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36"}
insecure_skip_verify: true
timeout: 10s
data_format: json