Ad Widget

Collapse

Item template change - active/disable problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AdrianS
    Junior Member
    • Mar 2007
    • 12

    #1

    Item template change - active/disable problem

    Hi

    I'm not sure if it's a bug or feature request - like for me it's a bug ... but

    Ok, when you change something in item of template, all changes are propagated
    to every linked host - that's ok But because "status" of every item can be
    set separately this value should not be propagated - should be left as is.

    It makes a lot of problems, since you can't do anything in template without destroying setting in every linked host.

    And to be clear - example:
    Linux_t -> Free space on /home
    if I change for example: "Update interval (in sec)", and by default this item status is set to "disabled" - all hosts using Linux_t template suddenly will stop monitoring free space on /home, since this item will be set to disabled.

    I think zabbix should only update values that were changed (best solution) - or update everyting except "status".

    Regards
    --
    Adrian
  • AdrianS
    Junior Member
    • Mar 2007
    • 12

    #2
    I'v changed zabbix before to act like I wanted (described in post before). Then I'v upgrade to new version on I had to change it once again - so here it is - small change in PHP which will stop propagate changes of "status" from template to linked with it hosts/items.

    Code:
    --- items.inc.php       2008-07-23 16:57:46.000000000 +0200
    +++ /tmp/items.inc.php  2008-07-23 16:58:17.000000000 +0200
    @@ -393,13 +393,13 @@
                    }
    
                     // first update child items
    -               $db_tmp_items = DBselect("select itemid, hostid, status from items where templateid=$itemid");
    +               $db_tmp_items = DBselect("select itemid, hostid from items where templateid=$itemid");
                    while($db_tmp_item = DBfetch($db_tmp_items))
                    {
                    // recursion
                            $result = update_item(
                                    $db_tmp_item["itemid"], $description, $key, $db_tmp_item["hostid"],
    -                               $delay, $history, $db_tmp_item["status"], $type, $snmp_community, $snmp_oid,
    +                               $delay, $history, $status, $type, $snmp_community, $snmp_oid,
                                    $value_type, $trapper_hosts, $snmp_port, $units, $multiplier,
                                    $delta, $snmpv3_securityname, $snmpv3_securitylevel,
                                    $snmpv3_authpassphrase, $snmpv3_privpassphrase, $formula,

    Comment

    • skullone
      Member
      • Mar 2007
      • 46

      #3
      In 1.6, I do not see that changes are propagating correctly to linked hosts.
      Items change correctly, but the status seems to not in 1.6.
      I wish it was a selection box really, to send the change in status to all hosts or not, because sometimes I want it.

      Comment

      • data7
        Junior Member
        • May 2008
        • 18

        #4
        Checkbox problem

        I also have a similar issue in 1.6.

        When I enable some triggers throughout the checkboxes they just aren't updated correctly!

        Here's the situation:

        - I have a Windows template linked to all my Win hosts
        - By default, I set all filesystems checks disabled except for "C:". I do this cause I don't like seeing a lot of Unknown states. In other words, I set itens and the trigger related to it by default.
        - Then, after all is set, I start to check which filesystems exist on every host and enable the itens and THEN the triggers related to it. But when I start to select multiple triggers to activate, it simply doesn't work! So i'm obligated to enable them by clicking on every status link...

        On 1.4.5 I didn't had the same issue. Is this a known bug?

        Thanks.

        Comment

        Working...