Merge "Add Nagios Elasticsearch Query Command"
This commit is contained in:
commit
b591e0754a
@ -34,6 +34,7 @@ type: Opaque
|
|||||||
data:
|
data:
|
||||||
cgi.cfg: {{ include "nagios.utils.to_nagios_conf" .Values.conf.nagios.cgi | b64enc }}
|
cgi.cfg: {{ include "nagios.utils.to_nagios_conf" .Values.conf.nagios.cgi | b64enc }}
|
||||||
nagios.cfg: {{ include "nagios.utils.to_nagios_conf" .Values.conf.nagios.nagios | b64enc }}
|
nagios.cfg: {{ include "nagios.utils.to_nagios_conf" .Values.conf.nagios.nagios | b64enc }}
|
||||||
|
query_es_clauses.json: {{ .Values.conf.nagios.query_es_clauses | toJson | b64enc }}
|
||||||
nagios_objects.cfg: {{ include "configmap_etc._nagios_objects" $ | b64enc }}
|
nagios_objects.cfg: {{ include "configmap_etc._nagios_objects" $ | b64enc }}
|
||||||
#NOTE(portdirect): this must be last, to work round helm ~2.7 bug.
|
#NOTE(portdirect): this must be last, to work round helm ~2.7 bug.
|
||||||
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.httpd "key" "httpd.conf" "format" "Secret") | indent 2 }}
|
{{- include "helm-toolkit.snippets.values_template_renderer" (dict "envAll" $envAll "template" .Values.conf.httpd "key" "httpd.conf" "format" "Secret") | indent 2 }}
|
||||||
|
@ -190,6 +190,12 @@ spec:
|
|||||||
mountPath: /opt/nagios/etc/nagios_objects.cfg
|
mountPath: /opt/nagios/etc/nagios_objects.cfg
|
||||||
subPath: nagios_objects.cfg
|
subPath: nagios_objects.cfg
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
{{- if .Values.conf.es_query_clauses }}
|
||||||
|
- name: nagios-etc
|
||||||
|
mountPath: /opt/nagios/etc/objects/query_es_clauses.json
|
||||||
|
subPath: query_es_clauses.json
|
||||||
|
readOnly: true
|
||||||
|
{{ end }}
|
||||||
- name: pod-var-log
|
- name: pod-var-log
|
||||||
mountPath: /opt/nagios/var/log
|
mountPath: /opt/nagios/var/log
|
||||||
readOnly: false
|
readOnly: false
|
||||||
|
@ -401,9 +401,6 @@ conf:
|
|||||||
- check_prom_alert:
|
- check_prom_alert:
|
||||||
command_name: check_prom_alert
|
command_name: check_prom_alert
|
||||||
command_line: "$USER1$/query_prometheus_alerts.py --prometheus_api $USER2$ --alertname '$ARG1$' --msg_format '$ARG2$' --ok_message '$ARG3$'"
|
command_line: "$USER1$/query_prometheus_alerts.py --prometheus_api $USER2$ --alertname '$ARG1$' --msg_format '$ARG2$' --ok_message '$ARG3$'"
|
||||||
- check_es_alert:
|
|
||||||
command_name: check_es_alert
|
|
||||||
command_line: "$USER1$/check_elasticsearch_query.py --es_url $USER9$ --logger '$ARG1$' --range_mins '$ARG2$' --alert_level '$ARG3$' --critical '$ARG4$' --es_type '$ARG5$'"
|
|
||||||
- check_filespace_mounts-usage-rate-fullin4hrs:
|
- check_filespace_mounts-usage-rate-fullin4hrs:
|
||||||
command_name: check_filespace_mounts-usage-rate-fullin4hrs
|
command_name: check_filespace_mounts-usage-rate-fullin4hrs
|
||||||
command_line: $USER1$/query_prometheus_alerts.py --prometheus_api $USER2$ --alertname 'node_filesystem_full_in_4h' --labels_csv 'instance=~"$HOSTADDRESS$.*"' --msg_format 'CRITICAL- Mountpoint {mountpoint} will be full in four hours' --ok_message 'OK- All mountpoints usage rate is normal'
|
command_line: $USER1$/query_prometheus_alerts.py --prometheus_api $USER2$ --alertname 'node_filesystem_full_in_4h' --labels_csv 'instance=~"$HOSTADDRESS$.*"' --msg_format 'CRITICAL- Mountpoint {mountpoint} will be full in four hours' --ok_message 'OK- All mountpoints usage rate is normal'
|
||||||
@ -470,6 +467,12 @@ conf:
|
|||||||
- check_prometheus_hosts:
|
- check_prometheus_hosts:
|
||||||
command_name: check_prometheus_hosts
|
command_name: check_prometheus_hosts
|
||||||
command_line: $USER1$/check_update_prometheus_hosts.py --prometheus_api $USER2$ --object_file_loc /opt/nagios/etc/objects/prometheus_discovery_objects.cfg
|
command_line: $USER1$/check_update_prometheus_hosts.py --prometheus_api $USER2$ --object_file_loc /opt/nagios/etc/objects/prometheus_discovery_objects.cfg
|
||||||
|
- check_es_query:
|
||||||
|
command_name: check_es_query
|
||||||
|
command_line: $USER1$/query_elasticsearch.py $USER9$ '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$' --simple_query '$ARG6$' --simple_query_fields '$ARG7$' --match '$ARG8$' --range '$ARG9$'
|
||||||
|
- check_es_query_w_file:
|
||||||
|
command_name: check_es_query_w_file
|
||||||
|
command_line: $USER1$/query_elasticsearch.py $USER9$ '$ARG1$' '$ARG2$' '$ARG3$' '$ARG4$' '$ARG5$' --simple_query '$ARG6$' --simple_query_fields '$ARG7$' --query_file '/opt/nagios/etc/objects/query_es_clauses.json' --query_clause '$ARG8$' --match '$ARG9$' --range '$ARG10$'
|
||||||
services:
|
services:
|
||||||
- notifying_service:
|
- notifying_service:
|
||||||
name: notifying_service
|
name: notifying_service
|
||||||
@ -1187,3 +1190,4 @@ conf:
|
|||||||
http:
|
http:
|
||||||
primary_target: 127.0.0.1:3904/events
|
primary_target: 127.0.0.1:3904/events
|
||||||
secondary_target: 127.0.0.1:3904/events
|
secondary_target: 127.0.0.1:3904/events
|
||||||
|
query_es_clauses: "null"
|
||||||
|
Loading…
Reference in New Issue
Block a user