Przeglądaj źródła

Added zabbix item openshift.master.process.exist and trigger to watch it.

Thomas Wiest 9 lat temu
rodzic
commit
31035f3ee8

+ 9 - 0
roles/os_zabbix/tasks/main.yml

@@ -11,6 +11,7 @@
 - include_vars: template_os_linux.yml
 - include_vars: template_docker.yml
 - include_vars: template_openshift_master.yml
+- include_vars: template_openshift_node.yml
 
 - name: Include Template Heartbeat
   include: ../../lib_zabbix/tasks/create_template.yml
@@ -43,3 +44,11 @@
     server: "{{ ozb_server }}"
     user: "{{ ozb_user }}"
     password: "{{ ozb_password }}"
+
+- name: Include Template Openshift Node
+  include: ../../lib_zabbix/tasks/create_template.yml
+  vars:
+    template: "{{ g_template_openshift_node }}"
+    server: "{{ ozb_server }}"
+    user: "{{ ozb_user }}"
+    password: "{{ ozb_password }}"

+ 17 - 0
roles/os_zabbix/vars/template_openshift_master.yml

@@ -6,8 +6,25 @@ g_template_openshift_master:
     applications:
     - Openshift Master
     key: create_app
+
+  - key: openshift.master.process.count
+    description: Shows number of master processes running
+    type: int
+    applications:
+    - Openshift Master
+
   ztriggers:
   - name: 'Application creation has failed on {HOST.NAME}'
     expression: '{Template Openshift Master:create_app.last(#1)}=1 and {Template Openshift Master:create_app.last(#2)}=1'
     url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_create_app.asciidoc'
     priority: avg
+
+  - name: 'Openshift Master process not running on {HOST.NAME}'
+    expression: '{Template Openshift Master:openshift.master.process.count.max(#3)}<1'
+    url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+    priority: high
+
+  - name: 'Too many Openshift Master processes running on {HOST.NAME}'
+    expression: '{Template Openshift Master:openshift.master.process.count.min(#3)}>1'
+    url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_master.asciidoc'
+    priority: high

+ 20 - 0
roles/os_zabbix/vars/template_openshift_node.yml

@@ -0,0 +1,20 @@
+---
+g_template_openshift_node:
+  name: Template Openshift Node
+  zitems:
+  - key: openshift.node.process.count
+    description: Shows number of OpenShift Node processes running
+    type: int
+    applications:
+    - Openshift Node
+
+  ztriggers:
+  - name: 'Openshift Node process not running on {HOST.NAME}'
+    expression: '{Template Openshift Node:openshift.node.process.count.max(#3)}<1'
+    url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_node.asciidoc'
+    priority: high
+
+  - name: 'Too many Openshift Node processes running on {HOST.NAME}'
+    expression: '{Template Openshift Node:openshift.node.process.count.min(#3)}>1'
+    url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/openshift_node.asciidoc'
+    priority: high