summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Bourdon <obourdon@mirantis.com>2017-04-14 08:34:52 +0200
committerOlivier Bourdon <obourdon@mirantis.com>2017-04-20 11:52:55 +0200
commit5854acda6e287481b67fb03a7afdb727a00c517c (patch)
tree64f58c641722ec540642aebb700ad8cf700ff241
parentd7b53e07a5022ce972b7470da58eddb23b871ca4 (diff)
Fix Zabbix 2.2 triggers expressions
Notes
Notes (review): Code-Review+1: Fuel TPI CI <pi-ci@mirantis.com> Code-Review+2: Olivier Bourdon <obourdon@mirantis.com> Workflow+1: Olivier Bourdon <obourdon@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 12 May 2017 08:37:41 +0000 Reviewed-on: https://review.openstack.org/457002 Project: openstack/fuel-plugin-external-zabbix Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp2
-rw-r--r--deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp12
-rw-r--r--deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb (renamed from deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_MySQL.xml)4
-rw-r--r--deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb (renamed from deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_Cluster.xml)2
4 files changed, 17 insertions, 3 deletions
diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp
index 99fd90c..e2bee73 100644
--- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp
+++ b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp
@@ -29,8 +29,10 @@ class plugin_zabbix::params {
29 29
30 if versioncmp($zabbix_version, '2.4') < 0 { 30 if versioncmp($zabbix_version, '2.4') < 0 {
31 $zabbix_includes = $zabbix_extra_conf_dir 31 $zabbix_includes = $zabbix_extra_conf_dir
32 $zabbix_trigger_exp_not_equal = '#'
32 } else { 33 } else {
33 $zabbix_includes = "${zabbix_extra_conf_dir}/*.conf" 34 $zabbix_includes = "${zabbix_extra_conf_dir}/*.conf"
35 $zabbix_trigger_exp_not_equal = '&lt;&gt;'
34 } 36 }
35 37
36 $zabbix_ports = { 38 $zabbix_ports = {
diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp
index 53adf0e..9bd55ec 100644
--- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp
+++ b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp
@@ -34,6 +34,18 @@ class plugin_zabbix::server::config {
34 source => 'puppet:///modules/plugin_zabbix/import' 34 source => 'puppet:///modules/plugin_zabbix/import'
35 } 35 }
36 36
37 file { '/etc/zabbix/import/Template_App_MySQL.xml':
38 ensure => present,
39 require => File['/etc/zabbix/import'],
40 content => template('plugin_zabbix/Template_App_MySQL.xml.erb'),
41 }
42
43 file { '/etc/zabbix/import/Template_App_OpenStack_Ceph_Cluster.xml':
44 ensure => present,
45 require => File['/etc/zabbix/import'],
46 content => template('plugin_zabbix/Template_App_OpenStack_Ceph_Cluster.xml.erb'),
47 }
48
37 Plugin_zabbix_configuration_import { 49 Plugin_zabbix_configuration_import {
38 require => File['/etc/zabbix/import'], 50 require => File['/etc/zabbix/import'],
39 } 51 }
diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_MySQL.xml b/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb
index c2900da..ff6213c 100644
--- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_MySQL.xml
+++ b/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb
@@ -762,7 +762,7 @@ It requires user parameter mysql.status[*], which is defined in userparameter_my
762 <dependencies/> 762 <dependencies/>
763 </trigger> 763 </trigger>
764 <trigger> 764 <trigger>
765 <expression>{Template App MySQL:db.wsrep.connected.query.last(0)}&lt;&gt;1</expression> 765 <expression>{Template App MySQL:db.wsrep.connected.query.last(0)}<%= scope.lookupvar('plugin_zabbix::params::zabbix_trigger_exp_not_equal') %>1</expression>
766 <name>MySQL is not connected to the cluster</name> 766 <name>MySQL is not connected to the cluster</name>
767 <url/> 767 <url/>
768 <status>0</status> 768 <status>0</status>
@@ -772,7 +772,7 @@ It requires user parameter mysql.status[*], which is defined in userparameter_my
772 <dependencies/> 772 <dependencies/>
773 </trigger> 773 </trigger>
774 <trigger> 774 <trigger>
775 <expression>{Template App MySQL:db.wsrep.ready.query.last(0)}&lt;&gt;1</expression> 775 <expression>{Template App MySQL:db.wsrep.ready.query.last(0)}<%= scope.lookupvar('plugin_zabbix::params::zabbix_trigger_exp_not_equal') %>1</expression>
776 <name>MySQL is not ready to rejoin cluster</name> 776 <name>MySQL is not ready to rejoin cluster</name>
777 <url/> 777 <url/>
778 <status>0</status> 778 <status>0</status>
diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_Cluster.xml b/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb
index c286400..11f368d 100644
--- a/deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_Cluster.xml
+++ b/deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb
@@ -1719,7 +1719,7 @@
1719 <dependencies/> 1719 <dependencies/>
1720 </trigger> 1720 </trigger>
1721 <trigger> 1721 <trigger>
1722 <expression>{Template App OpenStack Ceph Cluster:probe.ceph.last()}&lt;&gt;0</expression> 1722 <expression>{Template App OpenStack Ceph Cluster:probe.ceph.last()}<%= scope.lookupvar('plugin_zabbix::params::zabbix_trigger_exp_not_equal') %>0</expression>
1723 <name>Cannot retrieve Ceph metrics form {HOST.NAME1} node</name> 1723 <name>Cannot retrieve Ceph metrics form {HOST.NAME1} node</name>
1724 <url/> 1724 <url/>
1725 <status>0</status> 1725 <status>0</status>