Announcement

Collapse
No announcement yet.

Zabbix Trigger Dashboard

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Zabbix Trigger Dashboard

    @sersad: Yes. how to get trigger from a template and its last value?


    Originally posted by sersad View Post
    find a trigger from a template?

    Comment


      #32
      Hi,

      Got this working in 2.4 however I cannot see where I can specify a particular hostgroup as currently it gets all of them!

      Please help!

      Cheers

      Comment


        #33
        Zabbix Trigger Dashboard

        @stav13: give the particular hostgroup id in hostgroup.get. You will get the specific host.

        Originally posted by stav13 View Post
        Hi,

        Got this working in 2.4 however I cannot see where I can specify a particular hostgroup as currently it gets all of them!

        Please help!

        Cheers

        Comment


          #34
          Perfect, will give that a go tomorrow!

          Is there also another way to adapt this so only groups will show and not hosts to give a very high level overlook incase you have lots of groups and hosts?

          Thanks

          Comment


            #35
            Originally posted by Diwahar View Post
            @stav13: give the particular hostgroup id in hostgroup.get. You will get the specific host.
            Hi,

            I have attempted to no avail, sorry for sounding dumb but if my hostgroup id is 22 what should the syntax look like and what line number should be changed?

            Many Thanks

            Comment


              #36
              Zabbix Trigger Dashboard

              @stav13: use the below one
              $groups = $api->hostgroupGet(array(
              'output' => array('name'),
              'selectHosts' => array(
              'flags',
              'hostid',
              'name',
              'maintenance_status'),
              'real_hosts ' => 1,
              'groupids' => 22,
              'with_monitored_triggers' => 1,
              'sortfield' => 'name'
              ));


              Originally posted by stav13 View Post
              Hi,

              I have attempted to no avail, sorry for sounding dumb but if my hostgroup id is 22 what should the syntax look like and what line number should be changed?

              Many Thanks

              Comment


                #37
                Really sweet looking dashboard.

                "select distinct g.name, hg.groupid from groups g join hosts_groups hg on hg.groupid = g.groupid" returns list of Host Groups to Group ID's.

                I'll have a crack at adding a drop down list box on the top right which than loads the dashboard based on groupid (Host Group) selection.

                Comment


                  #38
                  Zabbix Trigger Dashboard

                  @sersad:

                  When i try this and click on the items that are triggered, it directs me to the wrong graphs.

                  Its not getting the exact itemid of each item and displays the graph.



                  Originally posted by sersad View Post
                  Diwahar
                  https://www.zabbix.com/documentation...ce/trigger/get
                  In Request add "selectFunctions": "extend"
                  The reply will contain an array "functions":"itemid"

                  /history.php?action=showgraph&itemids[]="itemid"

                  Comment


                    #39
                    Show only enabled hosts

                    Hi,

                    How show only enabled hosts? In my environment (zbx 2.4) the disabled hosts are also being displayed.

                    My "Gets":
                    PHP Code:
                    $groups $api->hostgroupGet(array(
                           
                    'output' => array('name'),
                           
                    'selectHosts' => array(
                                   
                    'flags',
                                   
                    'hostid',
                                   
                    'name',
                                   
                    'maintenance_status'),
                           
                    'real_hosts ' => 1,
                           
                    'with_monitored_triggers' => 1,
                           
                    'sortfield' => 'name'
                        
                    ));

                           foreach(
                    $groups as $group) {
                                   
                    $groupIds[] = $group->groupid;
                           }
                           
                    $triggers $api->triggerGet(array(
                                   
                    'output' => array(
                                           
                    'priority',
                                           
                    'description'),
                                   
                    'selectHosts' => array('hostid'),
                                   
                    'groupids' => $groupIds,
                                   
                    'expandDescription' => 1,
                                   
                    'only_true' => 1,
                                   
                    'monitored' => 1,
                                   
                    'withLastEventUnacknowledged' => 1,
                                   
                    'sortfield' => 'hostname',
                                   
                    'active' => 1,
                                   
                    'sortorder' => 'DESC',
                                   
                    'skipDependent' => 1,
                            
                    'filter' => array('value' => 1)
                           ));

                           foreach(
                    $triggers as $trigger) {
                                   foreach(
                    $trigger->hosts as $host) {
                                           
                    $hostTriggers[$host->hostid][] = $trigger;
                                   }
                           } 
                    Tks

                    Comment


                      #40
                      After replacing the "flags" option from "selectHosts" parameter to "status" option I got the hosts status and show only the actives.

                      Comment


                        #41
                        Because I don't have triggers in active state my apache errorlog is growing faster with this errors (2 errors per host):

                        PHP Notice: Undefined variable: hostTriggers in /usr/share/zabbix/triggers/index.php on line 107
                        PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /usr/share/zabbix/triggers/index.php on line 107

                        Changing "if (array_key_exists($hostid, $hostTriggers))" to "if (isset($hostTriggers[$hostid]))" resolved.

                        http://php.net/manual/en/function.array-key-exists.php:
                        "isset() does not return TRUE for array keys that correspond to a NULL value, while array_key_exists() does."

                        Comment


                          #42
                          Installation Document Please

                          Installation Document Please

                          Comment


                            #43
                            Will this work with 3.0.1?

                            Comment


                              #44
                              Zabbix Trigger Dashboard

                              Hi, I have tested and working perfect with latest zabbix 3.0.1.
                              Thanks for the developer

                              Comment


                                #45
                                Documenation

                                Originally posted by selvakumaran View Post
                                Hi, I have tested and working perfect with latest zabbix 3.0.1.
                                Thanks for the developer
                                Hello,

                                Did you get the documentation?

                                Thanks in advance for your answer.

                                Best Regards.

                                Comment

                                Working...
                                X