CTrigger::get() in the PHP frontend returns multiple triggerids

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Major
    • None
    • Affects Version/s: 1.9.0 (alpha)
    • Component/s: API (A)
    • None
    • Environment:
      Trunk version: 8225
      mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (x86_64) using readline 5.0
      Linux 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

      I'm calling CTrigger::get() from zabcon. I provide both hostid as well as pattern, but it seems that it's only the pattern that is applied and I therefore get the triggers associated with multiple hosts.

      "gettrigger()" below calls CTrigger::get():

      Got triggerid 13235 from gettrigger(

      {'hostid' => 10413, 'pattern' => Node down}

      )
      gettrigger result: {:class=>:trigger, :result=>{"13235"=>"13235", "13247"=>"13247", "13236"=>"13236", "13225"=>"13225", "13237"=>"13237"}}

      This is the same as:
      select triggerid from triggers where description='Node down';
      ->
      -----------

      triggerid

      -----------

      13225
      13235
      13236
      13237
      13247

      -----------

            Assignee:
            Unassigned
            Reporter:
            Daniel Petzen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: