summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-10-08 15:20:22 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-10-08 15:20:22 -0400
commit1c68cdd2a5429f944f69d0fa4ed95df32fee57d3 (patch)
tree3886efd73c089302c6a30e8e9ffe0a8ce45a39fc /roles
parent3ffde7a596721b65ec82628b36fb53a69715a031 (diff)
parente5f0b4944a434a51ae9b460d60a0e00a626158e6 (diff)
downloadopenshift-1c68cdd2a5429f944f69d0fa4ed95df32fee57d3.tar.gz
openshift-1c68cdd2a5429f944f69d0fa4ed95df32fee57d3.tar.bz2
openshift-1c68cdd2a5429f944f69d0fa4ed95df32fee57d3.tar.xz
openshift-1c68cdd2a5429f944f69d0fa4ed95df32fee57d3.zip
Merge pull request #674 from kwoodson/zabagent
Adding zabbix agent template to config management
Diffstat (limited to 'roles')
-rw-r--r--roles/lib_zabbix/library/zbx_item.py2
-rw-r--r--roles/os_zabbix/tasks/main.yml9
-rw-r--r--roles/os_zabbix/vars/template_app_zabbix_agent.yml23
3 files changed, 34 insertions, 0 deletions
diff --git a/roles/lib_zabbix/library/zbx_item.py b/roles/lib_zabbix/library/zbx_item.py
index 2ccc21292..6faa82dfc 100644
--- a/roles/lib_zabbix/library/zbx_item.py
+++ b/roles/lib_zabbix/library/zbx_item.py
@@ -53,6 +53,8 @@ def get_value_type(value_type):
vtype = 0
if 'int' in value_type:
vtype = 3
+ elif 'log' in value_type:
+ vtype = 2
elif 'char' in value_type:
vtype = 1
elif 'str' in value_type:
diff --git a/roles/os_zabbix/tasks/main.yml b/roles/os_zabbix/tasks/main.yml
index e083296c0..a503b24d7 100644
--- a/roles/os_zabbix/tasks/main.yml
+++ b/roles/os_zabbix/tasks/main.yml
@@ -14,6 +14,7 @@
- include_vars: template_openshift_node.yml
- include_vars: template_ops_tools.yml
- include_vars: template_app_zabbix_server.yml
+- include_vars: template_app_zabbix_agent.yml
- name: Include Template Heartbeat
include: ../../lib_zabbix/tasks/create_template.yml
@@ -70,3 +71,11 @@
server: "{{ ozb_server }}"
user: "{{ ozb_user }}"
password: "{{ ozb_password }}"
+
+- name: Include Template App Zabbix Agent
+ include: ../../lib_zabbix/tasks/create_template.yml
+ vars:
+ template: "{{ g_template_app_zabbix_agent }}"
+ server: "{{ ozb_server }}"
+ user: "{{ ozb_user }}"
+ password: "{{ ozb_password }}"
diff --git a/roles/os_zabbix/vars/template_app_zabbix_agent.yml b/roles/os_zabbix/vars/template_app_zabbix_agent.yml
new file mode 100644
index 000000000..06c4eda8b
--- /dev/null
+++ b/roles/os_zabbix/vars/template_app_zabbix_agent.yml
@@ -0,0 +1,23 @@
+---
+g_template_app_zabbix_agent:
+ name: Template App Zabbix Agent
+ zitems:
+ - key: agent.hostname
+ applications:
+ - Zabbix agent
+ value_type: character
+ zabbix_type: '0'
+
+ - key: agent.ping
+ applications:
+ - Zabbix agent
+ description: The agent always returns 1 for this item. It could be used in combination with nodata() for availability check.
+ value_type: int
+ zabbix_type: '0'
+
+ ztriggers:
+ - name: '[Reboot] Zabbix agent on {HOST.NAME} is unreachable for 15 minutes'
+ description: Zabbix agent is unreachable for 15 minutes.
+ expression: '{Template App Zabbix Agent:agent.ping.nodata(15m)}=1'
+ priority: high
+ url: https://github.com/openshift/ops-sop/blob/master/Alerts/check_ping.asciidoc