Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10158

Template JMX Generic : increase timeout for nodata and fix ProcessCpuLoad

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.0beta2
    • 2.4.7
    • Templates (T)

      I suggest two fixes for JMX Generic template relating to two issues:

      1.ProcessCPULoad issue

      jmx["java.lang:type=OperatingSystem",ProcessCpuLoad].last(0)>0.7
      

      ProcessCpuLoad of JMX is a value between 0 and 1. But in this JMX template it is multiplied by 100 and have units of %. It trigger is however trying to fire
      for all values higher than 0.7 which is 0.7 % and not 70%.
      Again it is giving alarms where shouldn't be any as ProcessCPULoad is only 0.7% and not 70%.

      fixing by changing trigger to:

      jmx["java.lang:type=OperatingSystem",ProcessCpuLoad].last(0)>70
      

      2.Timeout issue

      jmx["java.lang:type=Runtime",Uptime].nodata(1m)=1
      

      is too unforgivable to the system as nodata with 1m and polling interval of once a 60 seconds. This combo gives too many false positives and event that last only few seconds but happen almost every time.


      I suggest changing it to

      jmx["java.lang:type=Runtime",Uptime].nodata(3m)=1
      

      Diff patches for xml of template (version 2.4.7) are attached.

      1.

      Date: Fri, 11 Dec 2015 15:34:35 +0300
      Subject: [PATCH] - Fixed ProcessCpuLoad trigger. Description: Originally
       ProcessCpuLoad of JMX is between 0 and 1. In This JMX template it is
       multiplied by 100 and have units of %. It trigger is however trying to fire
       for all values higher than 0.7 which is 0.7 % and not 70%.
      
      ---
       JMX/Template_JMX_Generic.xml | 4 ++--
       1 file changed, 2 insertions(+), 2 deletions(-)
      
      diff --git a/JMX/Template_JMX_Generic.xml b/JMX/Template_JMX_Generic.xml
      index 8087cf8..ff814a6 100644
      --- a/JMX/Template_JMX_Generic.xml
      +++ b/JMX/Template_JMX_Generic.xml
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <zabbix_export>
           <version>2.0</version>
      -    <date>2015-12-11T12:15:53Z</date>
      +    <date>2015-12-11T12:30:23Z</date>
           <groups>
               <group>
                   <name>Templates</name>
      @@ -2518,7 +2518,7 @@
                   <dependencies/>
               </trigger>
               <trigger>
      -            <expression>{Template JMX Generic:jmx[&quot;java.lang:type=OperatingSystem&quot;,ProcessCpuLoad].last(0)}&gt;0.7</expression>
      +            <expression>{Template JMX Generic:jmx[&quot;java.lang:type=OperatingSystem&quot;,ProcessCpuLoad].last(0)}&gt;70</expression>
                   <name>70% os Process CPU Load on {HOST.NAME}</name>
                   <url/>
                   <status>0</status>
      -- 
      1.9.5.msysgit.0
      
      
      

      2.

      Date: Fri, 11 Dec 2015 15:18:09 +0300
      Subject: [PATCH] Increased JMX timeout to 3m (Insane to have it 1minute if you
       poll once a minute :) )
       https://team-ts.slack.com/files/vzhuravlev/F0GDGE0RZ/pasted_image_at_2015_12_11_15_10.png
      
      ---
       JMX/Template_JMX_Generic.xml | 4 ++--
       1 file changed, 2 insertions(+), 2 deletions(-)
      
      diff --git a/JMX/Template_JMX_Generic.xml b/JMX/Template_JMX_Generic.xml
      index f19e209..8087cf8 100644
      --- a/JMX/Template_JMX_Generic.xml
      +++ b/JMX/Template_JMX_Generic.xml
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <zabbix_export>
           <version>2.0</version>
      -    <date>2015-12-08T11:39:08Z</date>
      +    <date>2015-12-11T12:15:53Z</date>
           <groups>
               <group>
                   <name>Templates</name>
      @@ -2648,7 +2648,7 @@
                   <dependencies/>
               </trigger>
               <trigger>
      -            <expression>{Template JMX Generic:jmx[&quot;java.lang:type=Runtime&quot;,Uptime].nodata(1m)}=1</expression>
      +            <expression>{Template JMX Generic:jmx[&quot;java.lang:type=Runtime&quot;,Uptime].nodata(3m)}=1</expression>
                   <name>{HOST.NAME} is not reachable</name>
                   <url/>
                   <status>0</status>
      -- 
      1.9.5.msysgit.0
      

        1. jmx_timeout.PNG
          jmx_timeout.PNG
          15 kB
        2. jmx_timeout2.PNG
          jmx_timeout2.PNG
          77 kB
        3. patch_JMX_ProcessLoad.diff
          1 kB
        4. patch_JMX_timeout.diff
          1 kB

            Unassigned Unassigned
            vzhuravlev Vitaly Zhuravlev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: