diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-08-31 14:21:01 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-08-31 14:21:01 -0400 |
commit | 2f9e5e2f6f76192a9ea0ccc687fcc7b8b16706a6 (patch) | |
tree | 724cceae135c9e966ad32cf5443dad16fca5a778 /roles/lib_zabbix | |
parent | bac81adf9d7036e02db457eb78d5d91c3d630cd9 (diff) | |
parent | 1f52ea8c4e2f8cfce51e98cb3614c61f0d78ec3e (diff) | |
download | openshift-2f9e5e2f6f76192a9ea0ccc687fcc7b8b16706a6.tar.gz openshift-2f9e5e2f6f76192a9ea0ccc687fcc7b8b16706a6.tar.bz2 openshift-2f9e5e2f6f76192a9ea0ccc687fcc7b8b16706a6.tar.xz openshift-2f9e5e2f6f76192a9ea0ccc687fcc7b8b16706a6.zip |
Merge pull request #539 from twiest/pr
added docker zabbix template, removed unused / old templates so they don't confuse other people.
Diffstat (limited to 'roles/lib_zabbix')
-rw-r--r-- | roles/lib_zabbix/library/zbx_trigger.py | 4 | ||||
-rw-r--r-- | roles/lib_zabbix/tasks/create_template.yml | 36 |
2 files changed, 19 insertions, 21 deletions
diff --git a/roles/lib_zabbix/library/zbx_trigger.py b/roles/lib_zabbix/library/zbx_trigger.py index 43f3d2677..c707a2f64 100644 --- a/roles/lib_zabbix/library/zbx_trigger.py +++ b/roles/lib_zabbix/library/zbx_trigger.py @@ -65,7 +65,7 @@ def get_deps(zapi, deps): for desc in deps: content = zapi.get_content('trigger', 'get', - {'search': {'description': desc}, + {'filter': {'description': desc}, 'expandExpression': True, 'selectDependencies': 'triggerid', }) @@ -119,7 +119,7 @@ def main(): content = zapi.get_content(zbx_class_name, 'get', - {'search': {'description': description}, + {'filter': {'description': description}, 'expandExpression': True, 'selectDependencies': 'triggerid', }) diff --git a/roles/lib_zabbix/tasks/create_template.yml b/roles/lib_zabbix/tasks/create_template.yml index 022ca52f2..444fd0a14 100644 --- a/roles/lib_zabbix/tasks/create_template.yml +++ b/roles/lib_zabbix/tasks/create_template.yml @@ -16,18 +16,21 @@ - debug: var=lzbx_applications -- name: Create Application - zbx_application: - zbx_server: "{{ server }}" - zbx_user: "{{ user }}" - zbx_password: "{{ password }}" - name: "{{ item }}" - template_name: "{{ template.name }}" - with_items: lzbx_applications - register: created_application - when: template.zitems is defined - -- debug: var=created_application +# +# twiest: This is commented out because it doesn't work correctly +# +#- name: Create Application +# zbx_application: +# zbx_server: "{{ server }}" +# zbx_user: "{{ user }}" +# zbx_password: "{{ password }}" +# name: "{{ item }}" +# template_name: "{{ template.name }}" +# with_items: lzbx_applications +# register: created_application +# when: template.zitems is defined + +#- debug: var=created_application - name: Create Items zbx_item: @@ -38,24 +41,19 @@ name: "{{ item.name | default(item.key, true) }}" value_type: "{{ item.value_type | default('int') }}" template_name: "{{ template.name }}" - applications: "{{ item.applications }}" +# applications: "{{ item.applications }}" with_items: template.zitems register: created_items when: template.zitems is defined -#- debug: var=ctp_created_items - - name: Create Triggers zbx_trigger: zbx_server: "{{ server }}" zbx_user: "{{ user }}" zbx_password: "{{ password }}" description: "{{ item.description }}" + dependencies: "{{ item.dependencies | default([], true) }}" expression: "{{ item.expression }}" priority: "{{ item.priority }}" with_items: template.ztriggers when: template.ztriggers is defined - -#- debug: var=ctp_created_triggers - - |