Browse Source

Fix Zabbix 2.2 triggers expressions

Change-Id: I95b0b47daff5dc6189ef7502cfb2cb3c408d6e07
tags/2.5.4-rc1
Olivier Bourdon 2 years ago
parent
commit
5854acda6e

+ 2
- 0
deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp View File

@@ -29,8 +29,10 @@ class plugin_zabbix::params {
29 29
 
30 30
   if versioncmp($zabbix_version, '2.4') < 0 {
31 31
     $zabbix_includes = $zabbix_extra_conf_dir
32
+    $zabbix_trigger_exp_not_equal = '#'
32 33
   } else {
33 34
     $zabbix_includes = "${zabbix_extra_conf_dir}/*.conf"
35
+    $zabbix_trigger_exp_not_equal = '&lt;&gt;'
34 36
   }
35 37
 
36 38
   $zabbix_ports = {

+ 12
- 0
deployment_scripts/puppet/modules/plugin_zabbix/manifests/server/config.pp View File

@@ -34,6 +34,18 @@ class plugin_zabbix::server::config {
34 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 49
   Plugin_zabbix_configuration_import {
38 50
     require => File['/etc/zabbix/import'],
39 51
   }

deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_MySQL.xml → deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_MySQL.xml.erb View File

@@ -762,7 +762,7 @@ It requires user parameter mysql.status[*], which is defined in userparameter_my
762 762
             <dependencies/>
763 763
         </trigger>
764 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 766
             <name>MySQL is not connected to the cluster</name>
767 767
             <url/>
768 768
             <status>0</status>
@@ -772,7 +772,7 @@ It requires user parameter mysql.status[*], which is defined in userparameter_my
772 772
             <dependencies/>
773 773
         </trigger>
774 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 776
             <name>MySQL is not ready to rejoin cluster</name>
777 777
             <url/>
778 778
             <status>0</status>

deployment_scripts/puppet/modules/plugin_zabbix/files/import/Template_App_OpenStack_Ceph_Cluster.xml → deployment_scripts/puppet/modules/plugin_zabbix/templates/Template_App_OpenStack_Ceph_Cluster.xml.erb View File

@@ -1719,7 +1719,7 @@
1719 1719
             <dependencies/>
1720 1720
         </trigger>
1721 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 1723
             <name>Cannot retrieve Ceph metrics form {HOST.NAME1} node</name>
1724 1724
             <url/>
1725 1725
             <status>0</status>

Loading…
Cancel
Save