Ad Widget

Collapse

broken map - no trigger with triggerid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrea.consadori
    Member
    • Apr 2013
    • 94

    #1

    broken map - no trigger with triggerid

    hi all,
    today i found that some of my maps stop to works and i've this error
    "no trigger with trigger id 100100000013578"

    on editor side i can see this error on the map

    reset() expects parameter 1 to be array, null given [sysmap.php:229]
    Undefined index: description [sysmap.php:231]

    i also try to read the code of sysmap.php +229
    foreach ($sysmap['links'] as &$link) {
    foreach ($link['linktriggers'] as $lnum => $linktrigger) {
    $dbTrigger = API::Trigger()->get(array(
    'triggerids' => $linktrigger['triggerid'],
    'output' => array('description', 'expression'),
    'selectHosts' => API_OUTPUT_EXTEND,
    'preservekeys' => true,
    'expandDescription' => true
    ));
    $dbTrigger = reset($dbTrigger);
    $host = reset($dbTrigger['hosts']);

    $link['linktriggers'][$lnum]['desc_exp'] = $host['name'].':'.$dbTrigger['description'];
    }
    order_result($link['linktriggers'], 'desc_exp');
    and

    +231

    $link['linktriggers'][$lnum]['desc_exp'] = $host['name'].':'.$dbTrigger['description'];


    it seems to be a linkdb issue, any idea on how to fix?

    what's happen... how can i fix it??
    Last edited by andrea.consadori; 02-05-2013, 20:15. Reason: update
  • Heilig
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2013
    • 366

    #2
    Which version?
    sysmap.php not customized?
    Try to copy frontend files from Zabbix source.

    Comment

    • andrea.consadori
      Member
      • Apr 2013
      • 94

      #3
      it's a 2.0.6 rpm version,
      i never customized any files.

      i start to have various trigger issue after standalone to node upgrade but i see this after several days so my backup still have trigger issue.

      can be a broken trigger?

      Comment

      • Heilig
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2013
        • 366

        #4
        Interesting what happened with trigger 10010000001357. Maybe someone has manualy removed it from database?
        Try remove the spoiled maps and create them again (after creating the desired triggers, if there are none). Not sure this is the right way, but I think that the working variant.

        Update: try to create a trigger with the same name and expression or experiment with the export/import of problem maps (and manual editing of XML if necessary).
        Last edited by Heilig; 03-05-2013, 10:50.

        Comment

        • andrea.consadori
          Member
          • Apr 2013
          • 94

          #5
          i make a research in mysql.

          mysql> use zabbix;
          Reading table information for completion of table and column names
          You can turn off this feature to get a quicker startup with -A

          Database changed
          mysql> SELECT TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE column_name LIKE 'triggerid';
          +-----------------------+-------------+
          | TABLE_NAME | COLUMN_NAME |
          +-----------------------+-------------+
          | escalations | triggerid |
          | functions | triggerid |
          | services | triggerid |
          | sysmaps_link_triggers | triggerid |
          | trigger_discovery | triggerid |
          | triggers | triggerid |
          +-----------------------+-------------+


          mysql> SELECT * from functions WHERE triggerid=100100000013770;
          +-----------------+-----------------+-----------------+----------+-----------+
          | functionid | itemid | triggerid | function | parameter |
          +-----------------+-----------------+-----------------+----------+-----------+
          | 100100000019353 | 100100000025786 | 100100000013770 | change | 0 |
          +-----------------+-----------------+-----------------+----------+-----------+

          mysql> SELECT * from sysmaps_link_triggers WHERE triggerid=100100000013770;
          +-----------------+-----------------+-----------------+----------+--------+
          | linktriggerid | linkid | triggerid | drawtype | color |
          +-----------------+-----------------+-----------------+----------+--------+
          | 100100000000032 | 100100000000046 | 100100000013770 | 0 | DD0000 |
          +-----------------+-----------------+-----------------+----------+--------+

          so the trigger id exist...

          mysql> SELECT * from trigger_discovery WHERE triggerid=100100000013770;
          +--------------------+-----------------+------------------+----------------------------------------------------------------------+
          | triggerdiscoveryid | triggerid | parent_triggerid | name |
          +--------------------+-----------------+------------------+----------------------------------------------------------------------+
          | 219 | 100100000013770 | 100100000013736 | Operational status was changed on {HOST.NAME} interface {#SNMPVALUE} |
          +--------------------+-----------------+------------------+----------------------------------------------------------------------+


          what is the map xml path?
          Last edited by andrea.consadori; 03-05-2013, 11:03. Reason: update

          Comment

          • Heilig
            Senior Member
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Mar 2013
            • 366

            #6
            How to export map to XML.

            Try execute for triggers table and with triggerid from 1-st post:
            mysql> SELECT * from triggers WHERE triggerid=100100000013578;

            Comment

            • andrea.consadori
              Member
              • Apr 2013
              • 94

              #7
              it's a typo error, the id is 13758 and exist in trigger_discovery but not in triggers

              mysql> SELECT * from trigger_discovery WHERE triggerid=100100000013758;
              +--------------------+-----------------+------------------+----------------------------------------------------------------------+
              | triggerdiscoveryid | triggerid | parent_triggerid | name |
              +--------------------+-----------------+------------------+----------------------------------------------------------------------+
              | 207 | 100100000013758 | 100100000013736 | Operational status was changed on {HOST.NAME} interface {#SNMPVALUE} |
              +--------------------+-----------------+------------------+----------------------------------------------------------------------+
              1 row in set (0.00 sec)

              mysql> SELECT * from triggers WHERE triggerid=100100000013758;
              Empty set (0.00 sec)

              and i cannot export map,
              exported file content is:

              [error] Undefined index: 100100000013758 [include/classes/export/CConfigurationExport.php:897]
              [error] Undefined index: 100100000013770 [include/classes/export/CConfigurationExport.php:897]
              Last edited by andrea.consadori; 03-05-2013, 11:27. Reason: update on maps

              Comment

              • Heilig
                Senior Member
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Mar 2013
                • 366

                #8
                Your problem - the lack of a triggers 100100000013758 and 100100000013770 in a triggers table.
                If you do not have a database backup/settings with this trigger, the easiest way to solve the problem is recreate the triggers and maps OR if you believe that the reason for the disappearance triggers it's a zabbix bug (I personally doubt that this is so), you can create a ticket in support...
                Well, it is desirable to further revise the policy to back up the database and configuration of zabbix.

                Comment

                • andrea.consadori
                  Member
                  • Apr 2013
                  • 94

                  #9
                  [fixed]

                  thanks for usefoul hints:

                  creating manually the missing trigger fix my map

                  Comment

                  Working...