Merge "Nagios: Add init container for generating hosts"
This commit is contained in:
commit
26ab03c56d
@ -96,6 +96,18 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
initContainers:
|
initContainers:
|
||||||
{{ tuple $envAll "nagios" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
{{ tuple $envAll "nagios" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||||
|
- name: define-nagios-hosts
|
||||||
|
{{ tuple $envAll "nagios" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.nagios | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
command:
|
||||||
|
- /usr/lib/nagios/plugins/define-nagios-hosts.py
|
||||||
|
- --object_file_loc
|
||||||
|
- /opt/nagios/etc/conf.d/nagios-hosts.cfg
|
||||||
|
volumeMounts:
|
||||||
|
- name: pod-tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
- name: nagios-confd
|
||||||
|
mountPath: /opt/nagios/etc/conf.d
|
||||||
containers:
|
containers:
|
||||||
- name: apache-proxy
|
- name: apache-proxy
|
||||||
{{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }}
|
{{ tuple $envAll "apache_proxy" | include "helm-toolkit.snippets.image" | indent 10 }}
|
||||||
@ -181,6 +193,8 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-tmp
|
- name: pod-tmp
|
||||||
mountPath: /tmp
|
mountPath: /tmp
|
||||||
|
- name: nagios-confd
|
||||||
|
mountPath: /opt/nagios/etc/conf.d
|
||||||
- name: nagios-etc
|
- name: nagios-etc
|
||||||
mountPath: /opt/nagios/etc/nagios.cfg
|
mountPath: /opt/nagios/etc/nagios.cfg
|
||||||
subPath: nagios.cfg
|
subPath: nagios.cfg
|
||||||
@ -210,6 +224,8 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-log
|
- name: pod-var-log
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: nagios-confd
|
||||||
|
emptyDir: {}
|
||||||
- name: nagios-etc
|
- name: nagios-etc
|
||||||
secret:
|
secret:
|
||||||
secretName: nagios-etc
|
secretName: nagios-etc
|
||||||
|
@ -586,11 +586,6 @@ conf:
|
|||||||
command_name check_ceph_health
|
command_name check_ceph_health
|
||||||
}
|
}
|
||||||
|
|
||||||
define command {
|
|
||||||
command_line $USER1$/define-nagios-hosts.py --object_file_loc /opt/nagios/etc/objects/prometheus_discovery_objects.cfg
|
|
||||||
command_name check_prometheus_hosts
|
|
||||||
}
|
|
||||||
|
|
||||||
define command {
|
define command {
|
||||||
command_line $USER1$/query_elasticsearch.py $USER9$ '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$' --simple_query '$ARG6$' --simple_query_fields '$ARG7$' --match '$ARG8$' --range '$ARG9$'
|
command_line $USER1$/query_elasticsearch.py $USER9$ '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$' --simple_query '$ARG6$' --simple_query_fields '$ARG7$' --match '$ARG8$' --range '$ARG9$'
|
||||||
command_name check_es_query
|
command_name check_es_query
|
||||||
@ -1178,14 +1173,6 @@ conf:
|
|||||||
use generic-service
|
use generic-service
|
||||||
}
|
}
|
||||||
|
|
||||||
define service {
|
|
||||||
check_command check_prometheus_hosts
|
|
||||||
check_interval 900
|
|
||||||
hostgroup_name prometheus-hosts
|
|
||||||
service_description Prometheus_hosts-update
|
|
||||||
use notifying_service
|
|
||||||
}
|
|
||||||
|
|
||||||
define service {
|
define service {
|
||||||
check_command check_prom_alert!pg_replication_fallen_behind!CRITICAL- Postgres Replication lag is over 2 minutes!OK- postgresql replication lag is nominal.
|
check_command check_prom_alert!pg_replication_fallen_behind!CRITICAL- Postgres Replication lag is over 2 minutes!OK- postgresql replication lag is nominal.
|
||||||
hostgroup_name prometheus-hosts
|
hostgroup_name prometheus-hosts
|
||||||
@ -1428,7 +1415,7 @@ conf:
|
|||||||
cfg_file=/opt/nagios/etc/objects/contacts.cfg
|
cfg_file=/opt/nagios/etc/objects/contacts.cfg
|
||||||
cfg_file=/opt/nagios/etc/objects/timeperiods.cfg
|
cfg_file=/opt/nagios/etc/objects/timeperiods.cfg
|
||||||
cfg_file=/opt/nagios/etc/objects/templates.cfg
|
cfg_file=/opt/nagios/etc/objects/templates.cfg
|
||||||
cfg_file=/opt/nagios/etc/objects/prometheus_discovery_objects.cfg
|
cfg_file=/opt/nagios/etc/conf.d/nagios-hosts.cfg
|
||||||
|
|
||||||
check_external_commands=1
|
check_external_commands=1
|
||||||
check_for_orphaned_hosts=1
|
check_for_orphaned_hosts=1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user