summaryrefslogtreecommitdiffstats
path: root/roles/os_zabbix/library/test.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-08-17 13:42:10 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-08-17 13:42:10 -0400
commit5cfae01c8cfdb58f654f9cf2b8b6d6ac7d1381e6 (patch)
tree0d5e53adc5e8730fe0349b95a7ac05784203cdd5 /roles/os_zabbix/library/test.yml
parent8382fa264d769021b9f37bc50f99ec5f69dbc751 (diff)
parent135398d40500972fea12ad14f4d5fcd921c9ee9b (diff)
downloadopenshift-5cfae01c8cfdb58f654f9cf2b8b6d6ac7d1381e6.tar.gz
openshift-5cfae01c8cfdb58f654f9cf2b8b6d6ac7d1381e6.tar.bz2
openshift-5cfae01c8cfdb58f654f9cf2b8b6d6ac7d1381e6.tar.xz
openshift-5cfae01c8cfdb58f654f9cf2b8b6d6ac7d1381e6.zip
Merge pull request #488 from kwoodson/zbxapi
Zabbix API updates
Diffstat (limited to 'roles/os_zabbix/library/test.yml')
-rw-r--r--roles/os_zabbix/library/test.yml49
1 files changed, 44 insertions, 5 deletions
diff --git a/roles/os_zabbix/library/test.yml b/roles/os_zabbix/library/test.yml
index f585bcbb2..cedace1a0 100644
--- a/roles/os_zabbix/library/test.yml
+++ b/roles/os_zabbix/library/test.yml
@@ -6,7 +6,7 @@
hosts: localhost
gather_facts: no
vars:
- zbx_server: http://localhost/zabbix/api_jsonrpc.php
+ zbx_server: http://localhost:8080/zabbix/api_jsonrpc.php
zbx_user: Admin
zbx_password: zabbix
@@ -21,6 +21,41 @@
- debug: var=template_output
+ - name: Create a discoveryrule
+ zbx_discoveryrule:
+ server: "{{ zbx_server }}"
+ user: "{{ zbx_user }}"
+ password: "{{ zbx_password }}"
+ name: test discoverule
+ key: test_listener
+ template_name: test template
+ lifetime: 14
+ register: discoveryrule
+
+ - debug: var=discoveryrule
+
+ - name: Create an itemprototype
+ zbx_itemprototype:
+ server: "{{ zbx_server }}"
+ user: "{{ zbx_user }}"
+ password: "{{ zbx_password }}"
+ name: 'Test itemprototype on {#TEST_LISTENER}'
+ key: 'test[{#TEST_LISTENER}]'
+ template_name: test template
+ discoveryrule_name: test discoverule
+ register: itemproto
+
+ - debug: var=itemproto
+
+ - name: Create an application
+ zbx_application:
+ server: "{{ zbx_server }}"
+ user: "{{ zbx_user }}"
+ password: "{{ zbx_password }}"
+ name: 'Test App'
+ template_name: "test template"
+ register: item_output
+
- name: Create an item
zbx_item:
server: "{{ zbx_server }}"
@@ -28,7 +63,9 @@
password: "{{ zbx_password }}"
name: 'test item'
key: 'kenny.item.1'
- template_name: "{{ template_output.results[0].host }}"
+ applications:
+ - 'Test App'
+ template_name: "test template"
register: item_output
- debug: var=item_output
@@ -39,7 +76,7 @@
user: "{{ zbx_user }}"
password: "{{ zbx_password }}"
expression: '{test template:kenny.item.1.last()}>2'
- desc: 'Kenny desc'
+ description: 'Kenny desc'
register: trigger_output
- debug: var=trigger_output
@@ -60,8 +97,10 @@
user: "{{ zbx_user }}"
password: "{{ zbx_password }}"
name: 'kenny host'
- hostgroups:
- - 'kenny hostgroup'
+ template_names:
+ - test template
+ hostgroup_names:
+ - kenny hostgroup
register: host_output
- debug: var=host_output