Ad Widget

Collapse

Zabbix Trigger Dashboard

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Diwahar
    Junior Member
    • Sep 2014
    • 15

    #31
    Zabbix Trigger Dashboard

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


    Originally posted by sersad
    find a trigger from a template?

    Comment

    • stav13
      Member
      • Oct 2013
      • 66

      #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

      • Diwahar
        Junior Member
        • Sep 2014
        • 15

        #33
        Zabbix Trigger Dashboard

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

        Originally posted by stav13
        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

        • stav13
          Member
          • Oct 2013
          • 66

          #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

          • stav13
            Member
            • Oct 2013
            • 66

            #35
            Originally posted by Diwahar
            @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

            • Diwahar
              Junior Member
              • Sep 2014
              • 15

              #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
              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

              • syndeysider
                Senior Member
                • Oct 2013
                • 115

                #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

                • Diwahar
                  Junior Member
                  • Sep 2014
                  • 15

                  #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
                  Diwahar

                  In Request add "selectFunctions": "extend"
                  The reply will contain an array "functions":"itemid"

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

                  Comment

                  • victorhugopa
                    Member
                    Zabbix Certified Specialist
                    • Apr 2010
                    • 66

                    #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

                    • victorhugopa
                      Member
                      Zabbix Certified Specialist
                      • Apr 2010
                      • 66

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

                      Comment

                      • victorhugopa
                        Member
                        Zabbix Certified Specialist
                        • Apr 2010
                        • 66

                        #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.

                        PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.

                        "isset() does not return TRUE for array keys that correspond to a NULL value, while array_key_exists() does."

                        Comment

                        • selvakumaran
                          Junior Member
                          • Dec 2014
                          • 22

                          #42
                          Installation Document Please

                          Installation Document Please

                          Comment

                          • jgshier
                            Junior Member
                            • Mar 2016
                            • 13

                            #43
                            Will this work with 3.0.1?

                            Comment

                            • selvakumaran
                              Junior Member
                              • Dec 2014
                              • 22

                              #44
                              Zabbix Trigger Dashboard

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

                              Comment

                              • colloque
                                Member
                                • Feb 2010
                                • 72

                                #45
                                Documenation

                                Originally posted by selvakumaran
                                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...