moving to kustomize
This commit is contained in:
Executable
+3
@@ -0,0 +1,3 @@
|
||||
modules:
|
||||
pulsar: no
|
||||
prometheus: yes
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
update_every: 1
|
||||
autodetection_retry: 0
|
||||
jobs:
|
||||
- name: local
|
||||
url: http://127.0.0.1:10255/metrics
|
||||
- name: local
|
||||
url: https://localhost:10250/metrics
|
||||
tls_skip_verify: yes
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
update_every: 1
|
||||
autodetection_retry: 0
|
||||
jobs:
|
||||
- name: local
|
||||
url: http://127.0.0.1:10249/metrics
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
[db]
|
||||
mode = ram
|
||||
[web]
|
||||
bind to = localhost:19999
|
||||
[health]
|
||||
enabled = no
|
||||
[ml]
|
||||
enabled = no
|
||||
[plugins]
|
||||
otel = yes
|
||||
[plugin:otel]
|
||||
command options = --otel-endpoint 0.0.0.0:4317 --otel-logs-journal-dir /var/log/netdata/otel/v1
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
# OpenTelemetry Plugin Configuration
|
||||
# To customize, run: edit-config otel.yaml
|
||||
# Only include the fields you want to change — missing fields keep their defaults.
|
||||
|
||||
endpoint:
|
||||
path: "127.0.0.1:4317"
|
||||
tls_cert_path: null
|
||||
tls_key_path: null
|
||||
tls_ca_cert_path: null
|
||||
|
||||
metrics:
|
||||
chart_configs_dir: /etc/netdata/otel.d/v1/metrics
|
||||
interval_secs: 10
|
||||
grace_period_secs: 60
|
||||
expiry_duration_secs: 900
|
||||
max_new_charts_per_request: 100
|
||||
|
||||
base_dir: /var/log/netdata/otel/v2
|
||||
|
||||
remote_storage:
|
||||
enabled: false
|
||||
uri: "fs:///var/log/netdata/otel/v2/remote"
|
||||
read_cache_max_size: "1GB"
|
||||
|
||||
auth:
|
||||
enabled: false
|
||||
|
||||
logs:
|
||||
rotation:
|
||||
default:
|
||||
max_file_size: "25MB"
|
||||
max_entries: 50000
|
||||
retention:
|
||||
default:
|
||||
max_files: 100000
|
||||
max_total_size: "1GB"
|
||||
max_age: "7 days"
|
||||
Executable
+242
@@ -0,0 +1,242 @@
|
||||
disabled: no
|
||||
|
||||
name: 'kubernetes'
|
||||
|
||||
discover:
|
||||
- discoverer: k8s
|
||||
k8s:
|
||||
- tags: unknown
|
||||
role: pod
|
||||
pod:
|
||||
local_mode: yes
|
||||
classify:
|
||||
- name: "Control-Plane"
|
||||
selector: unknown
|
||||
tags: -unknown control_plane
|
||||
match:
|
||||
- tags: kube_scheduler
|
||||
expr: '{{ glob .Image "k8s.gcr.io/kube-scheduler:*" }}'
|
||||
- tags: kube_controller_manager
|
||||
expr: '{{ glob .Image "k8s.gcr.io/kube-controller-manager:*" }}'
|
||||
- name: "Applications"
|
||||
selector: unknown
|
||||
tags: -unknown applications
|
||||
match:
|
||||
- tags: activemq
|
||||
expr: '{{ and (eq .Port "8161") (glob .Image "*/activemq*") }}'
|
||||
- tags: apache
|
||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "httpd*" "*/httpd*") }}'
|
||||
- tags: bind
|
||||
expr: '{{ and (eq .Port "8653") (glob .Image "*/bind*") }}'
|
||||
- tags: cockroachdb
|
||||
expr: '{{ and (eq .Port "8080") (glob .Image "*/cockroach*") }}'
|
||||
- tags: consul
|
||||
expr: '{{ and (eq .Port "8500") (glob .Image "consul*" "*/consul*") }}'
|
||||
- tags: coredns
|
||||
expr: '{{ and (eq .Port "9153") (glob .Image "*/coredns*") }}'
|
||||
- tags: elasticsearch
|
||||
expr: '{{ and (eq .Port "9200") (glob .Image "elasticsearch:*" "*/elasticsearch:*") }}'
|
||||
- tags: fluentd
|
||||
expr: '{{ and (eq .Port "24220") (glob .Image "fluentd*" "*/fluentd*") }}'
|
||||
- tags: freeradius
|
||||
expr: '{{ and (eq .Port "18121") (glob .Image "*/freeradius*") }}'
|
||||
- tags: hdfs
|
||||
expr: '{{ and (eq .Port "50070") (glob .Image "*/hdfs*") }}'
|
||||
- tags: lighttpd
|
||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "*/lighttpd*") }}'
|
||||
- tags: logstash
|
||||
expr: '{{ and (eq .Port "9600") (glob .Image "logstash*" "*/logstash*") }}'
|
||||
- tags: mysql
|
||||
expr: '{{ and (eq .Port "3306") (glob .Image "mysql*" "*/mysql*" "mariadb*" "*/mariadb*") }}'
|
||||
- tags: nginx
|
||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "nginx*" "*/nginx*") }}'
|
||||
- tags: openvpn
|
||||
expr: '{{ and (eq .Port "7505") (glob .Image "*/openvpn") }}'
|
||||
- tags: phpfpm
|
||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "*/phpfpm*" "*/php-fpm*") }}'
|
||||
- tags: rabbitmq
|
||||
expr: '{{ and (eq .Port "15672") (glob .Image "rabbitmq*" "*/rabbitmq*") }}'
|
||||
- tags: solr
|
||||
expr: '{{ and (eq .Port "8983") (glob .Image "solr*" "*/solr*") }}'
|
||||
- tags: tengine
|
||||
expr: '{{ and (eq .Port "80" "8080") (glob .Image "*/tengine*") }}'
|
||||
- tags: unbound
|
||||
expr: '{{ and (eq .Port "8953") (glob .Image "*/unbound*") }}'
|
||||
- tags: vernemq
|
||||
expr: '{{ and (eq .Port "8888") (glob .Image "*/vernemq*") }}'
|
||||
- tags: zookeeper
|
||||
expr: '{{ and (eq .Port "2181") (glob .Image "zookeeper*" "*/zookeeper*") }}'
|
||||
- tags: consul_envoy
|
||||
expr: |
|
||||
{{ $imageOK := glob .Image "*/consul-dataplane*" -}}
|
||||
{{ $scrapeOK := eq (get .Annotations "prometheus.io/scrape") "true" -}}
|
||||
{{ $promPort := get .Annotations "prometheus.io/port" -}}
|
||||
{{ $portOK1 := and (eq .Port $promPort) (not (empty .Port)) -}}
|
||||
{{ $portOK2 := and (empty .Port) (not (empty $promPort)) -}}
|
||||
{{ and $imageOK $scrapeOK (or $portOK1 $portOK2) }}
|
||||
- name: "Prometheus Generic Applications"
|
||||
selector: unknown
|
||||
tags: -unknown prometheus_generic
|
||||
match:
|
||||
- tags: prometheus_generic
|
||||
expr: |
|
||||
{{ $scrapeOK := eq (get .Annotations "prometheus.io/scrape") "true" -}}
|
||||
{{ $portOK := eq (default .Port (get .Annotations "prometheus.io/port")) .Port -}}
|
||||
{{ $imageOK := not (glob .Image "netdata/netdata*" "*pulsar*" "*telegraf*") -}}
|
||||
{{ and $scrapeOK $portOK $imageOK }}
|
||||
compose:
|
||||
- name: "Control-Plane"
|
||||
selector: '!unknown control_plane'
|
||||
config:
|
||||
- selector: kube_scheduler
|
||||
template: |
|
||||
- module: prometheus
|
||||
name: prometheus-{{.TUID}}
|
||||
url: http://{{.PodIP}}:{{default "10251" .Port}}/metrics
|
||||
app: '{{.ContName}}'
|
||||
update_every: 10
|
||||
max_time_series: 1000
|
||||
- selector: kube_controller_manager
|
||||
template: |
|
||||
- module: prometheus
|
||||
name: prometheus-{{.TUID}}
|
||||
url: http://{{.PodIP}}:{{default "10252" .Port}}/metrics
|
||||
app: '{{.ContName}}'
|
||||
update_every: 10
|
||||
max_time_series: 2000
|
||||
- name: "Prometheus Generic Applications"
|
||||
selector: '!unknown prometheus_generic'
|
||||
config:
|
||||
- selector: prometheus_generic
|
||||
template: |
|
||||
{{ $path := default "/metrics" (get .Annotations "prometheus.io/path") -}}
|
||||
- module: prometheus
|
||||
name: prometheus-{{.TUID}}
|
||||
url: http://{{.Address}}{{$path}}
|
||||
app: '{{.ContName}}'
|
||||
update_every: 10
|
||||
max_time_series: 4000
|
||||
- name: "Applications"
|
||||
selector: '!unknown applications'
|
||||
tags: file
|
||||
config:
|
||||
- selector: activemq
|
||||
template: |
|
||||
- module: activemq
|
||||
name: activemq-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: apache
|
||||
template: |
|
||||
- module: apache
|
||||
name: apache-{{.TUID}}
|
||||
url: http://{{.Address}}/server-status?auto
|
||||
- selector: bind
|
||||
template: |
|
||||
- module: bind
|
||||
name: bind-{{.TUID}}
|
||||
url: http://{{.Address}}/json/v1
|
||||
- selector: cockroachdb
|
||||
template: |
|
||||
- module: cockroachdb
|
||||
name: cockroachdb-{{.TUID}}
|
||||
url: http://{{.Address}}/_status/vars
|
||||
- selector: consul
|
||||
template: |
|
||||
- module: consul
|
||||
name: consul-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: coredns
|
||||
template: |
|
||||
- module: coredns
|
||||
name: coredns-{{.TUID}}
|
||||
url: http://{{.Address}}/metrics
|
||||
- selector: elasticsearch
|
||||
template: |
|
||||
- module: elasticsearch
|
||||
name: elasticsearch-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: consul_envoy
|
||||
template: |
|
||||
{{ $path := default "/metrics" (get .Annotations "prometheus.io/path") -}}
|
||||
{{ $promPort := get .Annotations "prometheus.io/port" -}}
|
||||
{{ $port := ternary .Port $promPort (not (empty .Port)) -}}
|
||||
- module: envoy
|
||||
name: {{.TUID}}
|
||||
url: http://{{ .PodIP }}:{{ $port }}{{ $path }}
|
||||
- selector: fluentd
|
||||
template: |
|
||||
- module: fluentd
|
||||
name: fluentd-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: freeradius
|
||||
template: |
|
||||
- module: freeradius
|
||||
name: freeradius-{{.TUID}}
|
||||
address: {{.PodIP}}
|
||||
port: {{.Port}}
|
||||
- selector: hdfs
|
||||
template: |
|
||||
- module: hdfs
|
||||
name: hdfs-{{.TUID}}
|
||||
url: http://{{.Address}}/jmx
|
||||
- selector: lighttpd
|
||||
template: |
|
||||
- module: lighttpd
|
||||
name: lighttpd-{{.TUID}}
|
||||
url: http://{{.Address}}/server-status?auto
|
||||
- selector: logstash
|
||||
template: |
|
||||
- module: logstash
|
||||
name: logstash-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: mysql
|
||||
template: |
|
||||
- module: mysql
|
||||
name: mysql-{{.TUID}}
|
||||
dsn: 'netdata@tcp({{.Address}})/'
|
||||
- selector: nginx
|
||||
template: |
|
||||
- module: nginx
|
||||
name: nginx-{{.TUID}}
|
||||
url: http://{{.Address}}/stub_status
|
||||
- selector: openvpn
|
||||
template: |
|
||||
- module: openvpn
|
||||
name: openvpn-{{.TUID}}
|
||||
address: {{.Address}}
|
||||
- selector: phpfpm
|
||||
template: |
|
||||
- module: phpfpm
|
||||
name: phpfpm-{{.TUID}}
|
||||
url: http://{{.Address}}/status?full&json
|
||||
- selector: rabbitmq
|
||||
template: |
|
||||
- module: rabbitmq
|
||||
name: rabbitmq-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: solr
|
||||
template: |
|
||||
- module: solr
|
||||
name: solr-{{.TUID}}
|
||||
url: http://{{.Address}}
|
||||
- selector: tengine
|
||||
template: |
|
||||
- module: tengine
|
||||
name: tengine-{{.TUID}}
|
||||
url: http://{{.Address}}/us
|
||||
- selector: unbound
|
||||
template: |
|
||||
- module: unbound
|
||||
name: unbound-{{.TUID}}
|
||||
address: {{.Address}}
|
||||
use_tls: false
|
||||
- selector: vernemq
|
||||
template: |
|
||||
- module: vernemq
|
||||
name: vernemq-{{.TUID}}
|
||||
url: http://{{.Address}}/metrics
|
||||
- selector: zookeeper
|
||||
template: |
|
||||
- module: zookeeper
|
||||
name: zookeeper-{{.TUID}}
|
||||
address: {{.Address}}
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
[stream]
|
||||
enabled = yes
|
||||
destination = netdata:19999
|
||||
api key = 11111111-2222-3333-4444-555555555555
|
||||
timeout seconds = 60
|
||||
buffer size bytes = 1048576
|
||||
reconnect delay seconds = 5
|
||||
initial clock resync iterations = 60
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
jobs:
|
||||
- name: django_testing
|
||||
path: /host/var/log/pods/django-testing_django-testing-7f89d9ffc5-mcm9g_ad5b3bbf-33ca-410f-aa0e-457664c6345b/django-testing/0.log
|
||||
log_type: auto
|
||||
- name: nginx
|
||||
path: /host/var/log/pods/reverse-proxy_reverse-proxy-67c767c86f-pxvdz_af6033a7-dfcb-4430-a67b-ee75ea424cf7/reverse-proxy/0.log
|
||||
log_type: auto
|
||||
Executable
+156
@@ -0,0 +1,156 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: netdata-child
|
||||
labels:
|
||||
app: netdata
|
||||
role: child
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: netdata
|
||||
role: child
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
container.apparmor.security.beta.kubernetes.io/netdata: unconfined
|
||||
labels:
|
||||
app: netdata
|
||||
role: child
|
||||
spec:
|
||||
serviceAccountName: netdata
|
||||
restartPolicy: Always
|
||||
hostPID: true
|
||||
hostIPC: true
|
||||
hostNetwork: true
|
||||
initContainers:
|
||||
- name: init-persistence
|
||||
image: "alpine:latest"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: persistencevarlibdir
|
||||
mountPath: "/persistencevarlibdir"
|
||||
command: ["/bin/sh"]
|
||||
args:
|
||||
- "-c"
|
||||
- "chmod 777 /persistencevarlibdir;"
|
||||
containers:
|
||||
- name: netdata
|
||||
image: "netdata/netdata:edge"
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: NETDATA_CLAIM_URL
|
||||
value: "https://api.netdata.cloud"
|
||||
- name: NETDATA_CLAIM_TOKEN
|
||||
value: "CIlCwV6GawNWIfhrqMVmPAJixo_BSaGvwVbHKFOCQCHbYG5J8Ac0FDxKrObJ727F1dndg8J-v6apUhzGho6RIOlkrqJ_F7DKodjLqbsSWb7Ta-GSHkkuHcTXidxKxEo5RK0jiqU"
|
||||
- name: NETDATA_CLAIM_ROOMS
|
||||
value: "e15a4f12-89d7-4d5b-b588-6658fa835473"
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: NETDATA_LISTENER_PORT
|
||||
value: '19999'
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 19999
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/usr/sbin/netdatacli", "ping"]
|
||||
initialDelaySeconds: 0
|
||||
failureThreshold: 3
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/usr/sbin/netdatacli", "ping"]
|
||||
initialDelaySeconds: 0
|
||||
failureThreshold: 3
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
volumeMounts:
|
||||
- name: proc
|
||||
readOnly: true
|
||||
mountPath: /host/proc
|
||||
- name: sys
|
||||
mountPath: /host/sys
|
||||
- name: os-release
|
||||
mountPath: /host/etc/os-release
|
||||
- name: varlog
|
||||
mountPath: /host/var/log
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/go.d.conf
|
||||
subPath: go.d
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/go.d/k8s_kubelet.conf
|
||||
subPath: kubelet
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/go.d/k8s_kubeproxy.conf
|
||||
subPath: kubeproxy
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/go.d/web_log.conf
|
||||
subPath: web_log
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/otel.yaml
|
||||
subPath: otel
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/netdata.conf
|
||||
subPath: netdata
|
||||
- name: configmap
|
||||
mountPath: /etc/netdata/stream.conf
|
||||
subPath: stream
|
||||
- name: persistencevarlibdir
|
||||
mountPath: /var/lib/netdata
|
||||
- name: sdconfigmap
|
||||
mountPath: "/etc/netdata/go.d/sd/k8s.conf"
|
||||
subPath: config.yml
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_PTRACE
|
||||
- SYS_ADMIN
|
||||
resources: {}
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- name: proc
|
||||
hostPath:
|
||||
path: /proc
|
||||
- name: sys
|
||||
hostPath:
|
||||
path: /sys
|
||||
- name: os-release
|
||||
hostPath:
|
||||
path: /etc/os-release
|
||||
- name: varlog
|
||||
hostPath:
|
||||
path: /var/log
|
||||
- name: configmap
|
||||
configMap:
|
||||
name: netdata-conf-child
|
||||
optional: true
|
||||
- name: persistencevarlibdir
|
||||
hostPath:
|
||||
path: /var/lib/netdata-k8s-child/var/lib/netdata
|
||||
type: DirectoryOrCreate
|
||||
- name: sdconfigmap
|
||||
configMap:
|
||||
name: netdata-child-sd-config-map
|
||||
optional: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
Reference in New Issue
Block a user