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

Can't update template where triggers have the same name

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Component/s: API (A), Frontend (F)
    • Labels:
      None

      Description

      I'm unable to re-import/update a template where triggers for different severities have the same name but chaged status
      For example this was imported as a new template and passed

          <triggers>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>5</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.disaster&quot;, &quot;description&quot;: &quot;call onduty&quot;}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>4</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.high&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>3</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.average&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>2</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.warning&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>0</status>
                  <priority>1</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.information&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
          </triggers>
      

      then we changed the status in the last trigger

          <triggers>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>5</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.disaster&quot;, &quot;description&quot;: &quot;call onduty&quot;}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>4</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.high&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>3</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.average&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>2</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.warning&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
              <trigger>
                  <expression>{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].max(#3)}=0 |{OS.Linux.Listening.port__759__1668:net.tcp.listen[8080].nodata(3600)}=1</expression>
                  <name>Port 8080 is not listening or no data</name>
                  <url>https://wiki.allegrogroup.com/display/ITO/Port+%7B%24TCP_LISTENING_PORT_1%7D+is+not+listening</url>
                  <status>1</status>
                  <priority>1</priority>
                  <description>{&quot;name&quot;: &quot;net.tcp.listen.information&quot;, &quot;description&quot;: null}</description>
                  <type>0</type>
                  <dependencies/>
              </trigger>
          </triggers>
      

      Zabbix reports:

      Updated: Item "TCP listening on 8080" on "OS.Linux.Listening.port_759_1668".
      Trigger "Port 8080 is not listening or no data" already exists on "OS.Linux.Listening.port_759_1668".

      Of course creating a trigger manually with the same name works.

      Tested on 2.2.4 and 2.4.2 both via UI and API

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              deejay1 Łukasz Jernaś
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: