Ad Widget

Collapse

Cannot add Trigger with array in key | 1.8.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Littlelink
    Junior Member
    • Sep 2010
    • 5

    #1

    Cannot add Trigger with array in key | 1.8.3

    Hello,

    in 1.8.2 it was possible to add a Trigger with an array without any problems. I have configured some of them and they are running fine.

    Since we upgraded to 1.8.3 we are neither able to change this Triggers or add new ones like this.

    A sample:

    {XXXXX:zimbra[[antispam,antivirus,convertd,ldap,logger,mailbox,mt a,snmp,spell,stats]].last(0)}#0

    Error:

    Überflüssige Symbole gefunden: Prüfen Sie die Expression beginnend bei ' ].last(0)}#0 '

    Host key does not exist. Prüfen Sie die Expression beginnend bei ' :zimbra[[antispam,antivirus,convertd,ldap,logger,mailbox,mt a,snmp,spell,stats]].last(0)}#0 '

    As said, in 1.8.2 there was no Problem with Triggers like this. If i remove the second ] of the key, the first message disappears, but as it should, then it doesn't match the Host key any longer.

    Any suggestions?

    Thanks in advance.
  • Littlelink
    Junior Member
    • Sep 2010
    • 5

    #2
    Nobody any Idea?

    Comment

    • Littlelink
      Junior Member
      • Sep 2010
      • 5

      #3
      So, after some research i found the code where it goes wrong. When the expression is going parsed, there are no triggerExpressionRules Value for the array symbols ( [] ).

      Array
      (
      [levelType] => independent
      [indexes] => Array
      (
      [server] => Array
      (
      [0_9] => Array
      (
      [levelType] => server
      [openSymbol] => {
      [openSymbolNum] => 0
      [closeSymbol] => :
      [closeSymbolNum] => 9
      )

      )

      [keyName] => Array
      (
      [9_16] => Array
      (
      [levelType] => keyName
      [openSymbol] => :
      [openSymbolNum] => 9
      [closeSymbol] => [
      [closeSymbolNum] => 16
      )

      )

      [keyParams] => Array
      (
      [16_86] => Array
      (
      [levelType] => keyParams
      [openSymbol] => [
      [openSymbolNum] => 16
      [parts] => Array
      (
      [16_26] => Array
      (
      [levelType] => keyParam
      [openSymbol] => [
      [openSymbolNum] => 16
      [closeSymbol] => ,
      [closeSymbolNum] => 26
      )

      [26_36] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 26
      [closeSymbol] => ,
      [closeSymbolNum] => 36
      )

      [36_45] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 36
      [closeSymbol] => ,
      [closeSymbolNum] => 45
      )

      [45_50] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 45
      [closeSymbol] => ,
      [closeSymbolNum] => 50
      )

      [50_57] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 50
      [closeSymbol] => ,
      [closeSymbolNum] => 57
      )

      [57_65] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 57
      [closeSymbol] => ,
      [closeSymbolNum] => 65
      )

      [65_69] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 65
      [closeSymbol] => ,
      [closeSymbolNum] => 69
      )

      [69_74] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 69
      [closeSymbol] => ,
      [closeSymbolNum] => 74
      )

      [74_80] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 74
      [closeSymbol] => ,
      [closeSymbolNum] => 80
      )

      [80_86] => Array
      (
      [levelType] => keyParam
      [openSymbol] => ,
      [openSymbolNum] => 80
      [closeSymbol] => ]
      [closeSymbolNum] => 86
      )

      )

      [closeSymbol] => ]
      [closeSymbolNum] => 86
      )

      )

      [keyFunctionName] => Array
      (
      [88_93] => Array

      So i tried to add a triggerExpressionRule like that for the two missing charakters ( as it can be seen he is counting 88 but ending at 86 because he is ignoring the opening [ and closing ] ):

      //################Rules for Array#################
      $triggerExpressionRules['keyArray'] = Array(
      'openSymbol' => Array('[' => 'default', ']' => 'default'),
      'closeSymbol' => Array('[' => 'default', ']' => 'default'),
      'parent' => 'keyParams');
      //################End of Rules for Array############
      But then he isn't going further then "keyName":

      Array
      (
      [levelType] => independent
      [indexes] => Array
      (
      [server] => Array
      (
      [0_9] => Array
      (
      [levelType] => server
      [openSymbol] => {
      [openSymbolNum] => 0
      [closeSymbol] => :
      [closeSymbolNum] => 9
      )

      )

      [keyName] => Array
      (
      [9_16] => Array
      (
      [levelType] => keyName
      [openSymbol] => :
      [openSymbolNum] => 9
      [closeSymbol] => [
      [closeSymbolNum] => 16
      )

      )

      )

      [openSymbolNum] => 0
      [closeSymbolNum] => 98
      [value] => {Venus-fo:zimbra[[antispam,antivirus,convertd,ldap,logger,mailbox,mt a,snmp,spell,stats]].last(0)}=0
      )
      I tried to compare with 1.8.2 but in last Versions the system was complete different.

      I don't know why the forum software is adding a space at the "mta" but there is no space...
      Last edited by Littlelink; 23-09-2010, 13:02.

      Comment

      • Littlelink
        Junior Member
        • Sep 2010
        • 5

        #4
        I tried to go through the code, but i am not a programmer.

        I will have to modify near 60 Triggers ( or better their Scripts, the Items and the Triggers ) because of this Bug, otherway i would have to change the monitoring software.

        It is hard to see that there was no reaction to this thread, because in my eyes it is a major bug.

        Comment

        Working...