Ad Widget

Collapse

Zabbix Dynamic PDF Report Generation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • martinm_76
    Member
    • Mar 2015
    • 57

    #271
    PDF report array debugging script (mostly for 1.8.x installations)

    Originally posted by waardd
    My PHP has the same values (except for up and download size, its higher then yours.
    I tried the direct URL and got the same result on multiple browsers.

    =====
    HostID: 10348
    Report Type: host
    Time Period: 3600
    Temp image path: /appl/mcv/html/zabbix/frontends/php/report/tmp/zabbix_report_u5HpkO

    (id
    jk-8009 worker threads(id:372)
    http-8080 worker threads(id:373)
    http-8443 worker threads(id:374)
    sessions /(id:375)
    3150-cpu(id:387)
    3150-load(id:391)
    3148-cpu(id:392)
    3148-load(id:393)
    Space in Queue(id:437)
    Space in Queue(id:438)
    Space in Queue(id:439)
    and so on
    =====

    The selection list for Hosts is filled but with blanks.
    The selectioon list for HostGroups is filled and readable but has the same effect when creating a report:

    ====
    GroupID: 53
    Report Type: hostgroup
    Time Period: 3600
    Temp image path: /appl/mcv/html/zabbix/frontends/php/report/tmp/zabbix_report_qqbyT7

    (id
    jk-8009 worker threads(id:372)
    http-8080 worker threads(id:373)
    http-8443 worker threads(id:374)
    sessions /(id:375)
    3150-cpu(id:387)
    3150-load(id:391)
    3148-cpu(id:392)
    3148-load(id:393)
    Space in Queue(id:437)
    Space in Queue(id:438)
    Space in Queue(id:439)
    MySQL Threads(id:470)
    MySQL Questions(id:471)
    MySQL slow queries(id:472)
    and so on
    ====
    Waardd, could you make a file called chooser.debug.php with this contents:
    Code:
    <?php
    ///////////
    //
    // DEBUG VERSON OF CHOOSER. ONLY SHOWS HOST AND
    // HOST GROUPS ARRAYS, THEN EXITS.
    // YOU MAY NEED TO COMMENT THE LOGOUT PART ON Zabbix 1.8.x
    //
    ///////////
    
    include("config.inc.php");
    
    if ( $user_login == 1 ) {
    session_start();
    //print_r($_SESSION);
    $z_user=$_SESSION['username'];
    $z_pass=$_SESSION['password'];
    
    if ( $z_user == "" ) {
      header("Location: index.php");
    }
    
    $z_login_data	= "name=" .$z_user ."&password=" .$z_pass ."&autologin=1&enter=Sign+in";
    }
    
    global $z_user, $z_pass, $z_login_data;
    
    require_once("inc/ZabbixAPI.class.php");
    include("inc/index.functions.php");
    
    header( 'Content-type: text/html; charset=utf-8' );
    ?>
    <!DOCTYPE html>
    <html>
    <head>
    	<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    	<title>Zabbix Dynamic PDF Report</title>
    	<meta charset="utf-8" />
    </head>
    <body>
    <?php
    // ERROR REPORTING
    error_reporting(E_ALL);
    set_time_limit(60);
    
    echo "<pre>\n";
    // ZabbixAPI Connection
    ZabbixAPI::debugEnabled(TRUE);
    ZabbixAPI::login($z_server,$z_user,$z_pass)
    	or die('Unable to login: '.print_r(ZabbixAPI::getLastError(),true));
    //fetch graph data host
    $hosts       = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','name','host'),'sortfield'=>'host','with_graphs'=>'1'))
    	or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
    
    echo "Hosts array:\n";
    print_r($hosts);
    
    $host_groups = ZabbixAPI::fetch_array('hostgroup','get', array('output'=>array('groupid','name'),'real_hosts'=>'1','with_graphs'=>'1','sortfield'=>'name') )
    	or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
    
    echo "Host Groups Array:\n";
    print_r($host_groups);
    
    ZabbixAPI::logout($z_server,$z_user,$z_pass)
    	or die('Unable to logout: '.print_r(ZabbixAPI::getLastError(),true));
    
    //var_dump($hosts);
    //var_dump($host_group);
    ?>
    </pre>
    </html></body>
    Then, after you have validated your credentials, or if $user_login is zero, point to chooser.debug.php in stead of chooser.php and see what results you get. If you don't see the hosts here, then the API must be incompatible in some way.

    I am thinking you'll get a value in the 'host' column, but a blank in the 'name' column. If so, you need to alter the occurences of 'name' to be 'host' wherever calls to the host method is made. Host groups have only 'name' so be carefull not to alter 'name' there.

    That ought to do it, or at least get you further.
    The easy solution, though (easy for me to say), is to upgrade Zabbix to at least 2.0

    Regards,

    /Martin.

    Comment

    • waardd
      Member
      • Aug 2014
      • 82

      #272
      Hosts array:
      Array
      (
      [0] =>
      )
      Host Groups Array:
      Array
      (
      [0] => Array
      (
      [groupid] => 53
      [name] => ABLI
      )

      [1] => Array
      (
      [groupid] => 30
      [name] => ABPM
      )

      [2] => Array
      (
      [groupid] => 32
      [name] => ABPX
      )

      [3] => Array
      (
      [groupid] => 91
      [name] => ABPX_PA
      )

      [4] => Array
      (
      [groupid] => 26
      [name] => ACPT
      )

      [5] => Array
      (
      [groupid] => 61
      [name] => AFOV
      )

      [6] => Array
      (
      [groupid] => 59
      [name] => ASO
      )

      [7] => Array
      (
      [groupid] => 73
      [name] => ASPR
      )

      [8] => Array
      (
      [groupid] => 16
      [name] => BasisHostGroup MCV
      )

      [9] => Array
      (
      [groupid] => 100
      [name] => BEHEER
      )

      [10] => Array
      (
      [groupid] => 18
      [name] => BEST Prod
      )

      [11] => Array
      (
      [groupid] => 19
      [name] => Boxtel Prod
      )

      [12] => Array
      (
      [groupid] => 84
      [name] => CCLC
      )

      [13] => Array
      (
      [groupid] => 104
      [name] => CDII
      )

      [14] => Array
      (
      [groupid] => 81
      [name] => CIV
      )

      [15] => Array
      (
      [groupid] => 8
      [name] => CIV Acpt
      )

      [16] => Array
      (
      [groupid] => 102
      [name] => CIV Perf
      )

      [17] => Array
      (
      [groupid] => 9
      [name] => CIV Prod
      )

      [18] => Array
      (
      [groupid] => 72
      [name] => COAC
      )

      [19] => Array
      (
      [groupid] => 48
      [name] => CPAD
      )

      [20] => Array
      (
      [groupid] => 77
      [name] => CPAD-A
      )

      [21] => Array
      (
      [groupid] => 47
      [name] => CPAD-GBRE Prod W85
      )

      [22] => Array
      (
      [groupid] => 70
      [name] => CPAS
      )

      [23] => Array
      (
      [groupid] => 69
      [name] => CPC1
      )

      [24] => Array
      (
      [groupid] => 76
      [name] => CPC2
      )

      [25] => Array
      (
      [groupid] => 67
      [name] => CPCS
      )

      [26] => Array
      (
      [groupid] => 85
      [name] => CPDS
      )

      [27] => Array
      (
      [groupid] => 71
      [name] => CPR1
      )

      [28] => Array
      (
      [groupid] => 94
      [name] => CRMI_Dummy
      )

      [29] => Array
      (
      [groupid] => 68
      [name] => CSDD
      )

      [30] => Array
      (
      [groupid] => 51
      [name] => CTTS
      )

      [31] => Array
      (
      [groupid] => 86
      [name] => CWHC
      )

      [32] => Array
      (
      [groupid] => 105
      [name] => CZDI
      )

      [33] => Array
      (
      [groupid] => 87
      [name] => DGBR
      )

      [34] => Array
      (
      [groupid] => 5
      [name] => Discovered hosts
      )

      [35] => Array
      (
      [groupid] => 78
      [name] => DPAD
      )

      [36] => Array
      (
      [groupid] => 99
      [name] => DVOA
      )

      [37] => Array
      (
      [groupid] => 56
      [name] => DVTV
      )

      [38] => Array
      (
      [groupid] => 50
      [name] => EVPS
      )

      [39] => Array
      (
      [groupid] => 52
      [name] => FTMS
      )

      [40] => Array
      (
      [groupid] => 75
      [name] => GBRE
      )

      [41] => Array
      (
      [groupid] => 62
      [name] => ILV
      )

      [42] => Array
      (
      [groupid] => 103
      [name] => ILV-A
      )

      [43] => Array
      (
      [groupid] => 6
      [name] => KAD Acpt
      )

      [44] => Array
      (
      [groupid] => 27
      [name] => KAD Autorisatie Service Prod
      )

      [45] => Array
      (
      [groupid] => 29
      [name] => KAD AV Prod
      )

      [46] => Array
      (
      [groupid] => 10
      [name] => KAD Calculator ACPT
      )

      [47] => Array
      (
      [groupid] => 17
      [name] => KAD Calculator PROD
      )

      [48] => Array
      (
      [groupid] => 7
      [name] => KAD Prod
      )

      [49] => Array
      (
      [groupid] => 28
      [name] => KAD Viewer Prod
      )

      [50] => Array
      (
      [groupid] => 96
      [name] => KAUTH
      )

      [51] => Array
      (
      [groupid] => 42
      [name] => KCALC
      )

      [52] => Array
      (
      [groupid] => 97
      [name] => KVIEW
      )

      [53] => Array
      (
      [groupid] => 2
      [name] => Linux servers
      )

      [54] => Array
      (
      [groupid] => 88
      [name] => LOPR
      )

      [55] => Array
      (
      [groupid] => 60
      [name] => OAD
      )

      [56] => Array
      (
      [groupid] => 95
      [name] => OBPM_Dummy
      )

      [57] => Array
      (
      [groupid] => 45
      [name] => ONTW
      )

      [58] => Array
      (
      [groupid] => 46
      [name] => ONTWIKKEL
      )

      [59] => Array
      (
      [groupid] => 64
      [name] => ORCO
      )

      [60] => Array
      (
      [groupid] => 44
      [name] => ORCO PROD
      )

      [61] => Array
      (
      [groupid] => 23
      [name] => ORCO-RTND-PJJS-IVO-SRVn Prod
      )

      [62] => Array
      (
      [groupid] => 80
      [name] => ORV
      )

      [63] => Array
      (
      [groupid] => 65
      [name] => PJJS
      )

      [64] => Array
      (
      [groupid] => 43
      [name] => PJJS PROD
      )

      [65] => Array
      (
      [groupid] => 15
      [name] => PROD
      )

      [66] => Array
      (
      [groupid] => 49
      [name] => RCHK
      )

      [67] => Array
      (
      [groupid] => 92
      [name] => RCHK_PA
      )

      [68] => Array
      (
      [groupid] => 41
      [name] => RECO
      )

      [69] => Array
      (
      [groupid] => 40
      [name] => RTND
      )

      [70] => Array
      (
      [groupid] => 89
      [name] => RVBS
      )

      [71] => Array
      (
      [groupid] => 106
      [name] => Siebel
      )

      [72] => Array
      (
      [groupid] => 107
      [name] => Siebel_AOM
      )

      [73] => Array
      (
      [groupid] => 37
      [name] => SRVA
      )

      [74] => Array
      (
      [groupid] => 38
      [name] => SRVC
      )

      [75] => Array
      (
      [groupid] => 39
      [name] => SRVR
      )

      [76] => Array
      (
      [groupid] => 90
      [name] => VITO
      )

      [77] => Array
      (
      [groupid] => 54
      [name] => VOOV
      )

      [78] => Array
      (
      [groupid] => 3
      [name] => Windows servers
      )

      [79] => Array
      (
      [groupid] => 4
      [name] => Zabbix servers
      )

      )
      Unable to logout: Array
      (
      [code] => -32400
      [message] => System error.
      [data] => JSON-rpc error generation failed. No such error:
      )

      chooser.php is in version 0.8
      I'm using 0.5 i believe so index determines my arrays and stuff and then it starts createpdf.php

      Comment

      • martinm_76
        Member
        • Mar 2015
        • 57

        #273
        Ah. waardd, could you try removing 'name' from the selection in the hosts array so we only choose hostid and host? If that doesn't produce a working host array, I am not sure I can figure out what will (other than upgrading Zabbix).

        Comment

        • waardd
          Member
          • Aug 2014
          • 82

          #274
          Originally posted by martinm_76
          Ah. waardd, could you try removing 'name' from the selection in the hosts array so we only choose hostid and host? If that doesn't produce a working host array, I am not sure I can figure out what will (other than upgrading Zabbix).
          Did that and now i get a listing:

          Hosts array:
          Array
          (
          [0] => Array
          (
          [hostid] => 10348
          [host] => Aggr_ABPM
          )

          [1] => Array
          (
          [hostid] => 10248
          [host] => Aggr_ABPX
          )

          [2] => Array
          (
          [hostid] => 10161
          [host] => Aggr_CIV
          )

          [3] => Array
          (
          [hostid] => 10211
          [host] => Aggr_ERR_APPLOG
          )

          [4] => Array
          (
          [hostid] => 10162
          [host] => Aggr_LOGFREE
          )

          [5] => Array
          (
          [hostid] => 10296
          [host] => Aggr_ORCO
          ---> and so on

          But still a error at the end

          Unable to logout: Array
          (
          [code] => -32400
          [message] => System error.
          [data] => JSON-rpc error generation failed. No such error:
          )

          The $hosts fetch line in chooser.debug.php is the same as th line in my index.php. So the blanks are created after this....
          And again one step closer (i think)

          Whtas the next move?

          Comment

          • martinm_76
            Member
            • Mar 2015
            • 57

            #275
            Well, if you're lucky, then changing these occurences to use 'host' in stead of 'name' will give you the graphs you're looking for:

            Code:
            [### report.org]# grep -r '$hosts' * | grep ZabbixAPI
            createpdf.php:	$hosts  = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','name'),'with_graphs'=>'true','hostids'=>$hostid))
            createpdf.php:	$hosts  = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','name'),'with_graphs'=>'true','groupids'=>$groupid))
            index.php:$hosts       = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','name'),'sortfield'=>'host','with_graphs'=>'1','sortfield'=>'name'))
            So, both in the array and the sortfield, replace 'name' with 'host'.

            Comment

            • waardd
              Member
              • Aug 2014
              • 82

              #276
              Code:
              createpdf.php:  $hosts  = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'with_graphs'=>'true','hostids'=>$hostid))
              createpdf.php:          or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
              createpdf.php:  //var_dump($hosts);
              createpdf.php:  $name = $hosts[0]['name'];
              createpdf.php:  CreatePDF($hosts);
              createpdf.php:  $hosts  = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'with_graphs'=>'true','groupids'=>$groupid))
              createpdf.php:          or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
              createpdf.php:  //var_dump($hosts);
              createpdf.php:  CreatePDF($hosts);
              index.php://$hosts       = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'sortfield'=>'host','with_graphs'=>'1','sortfield'=>'host') )
              index.php://$hosts       = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'sortfield'=>'host','with_graphs'=>'1') )
              index.php://$hosts       = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'sortfield'=>'name','with_graphs'=>'1'))
              index.php://    or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
              index.php:$hosts       = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'with_graphs'=>'1','sortfield'=>'host'))
              index.php:      or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
              index.php:$host_groups = ZabbixAPI::fetch_array('hostgroup','get', array('output'=>array('groupid','host'),'real_hosts'=>'1','with_graphs'=>'1','sortfield'=>'name') )
              index.php:      or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
              index.php://var_dump($hosts);
              index.php:ReadArray($hosts);
              This is what i have now.

              Reports seem to be made OK but i still dont see the hosts in the pulldown menu.
              They are all white (blank)

              Hostgroups are shown good.

              On the report i sometimes miss the graphs while they are present in zabbix. I just get a grey titlebar with the title of the graph where the graph should appear on the pdf document.

              Extra info

              =============
              Foutdetails webpagina

              Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; Tablet PC 2.0)
              Tijdstempel: Tue, 26 May 2015 07:03:20 UTC


              Bericht: Deze eigenschap of methode wordt niet ondersteund door dit object
              Regel: 2
              Teken: 29694
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/js/jquery-2.1.1.min.js


              Bericht: 'jQuery' is niet gedefinieerd
              Regel: 6
              Teken: 1
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/js/jquery.datetimepicker.js


              Bericht: 'jQuery' is niet gedefinieerd
              Regel: 4
              Teken: 14
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/js/jquery.validate.min.js


              Bericht: 'jQuery' is niet gedefinieerd
              Regel: 2
              Teken: 1
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/js/jquery.tablesorter.min.js


              Bericht: 'jQuery' is niet gedefinieerd
              Regel: 21
              Teken: 1
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/js/select2.min.js


              Bericht: Object wordt verwacht
              Regel: 20
              Teken: 3
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/


              Bericht: Object wordt verwacht
              Regel: 353
              Teken: 1
              Code: 0
              URI: http://<zabbix_server>/zabbix/frontends/php/report/

              =================
              Last edited by waardd; 26-05-2015, 09:09.

              Comment

              • martinm_76
                Member
                • Mar 2015
                • 57

                #277
                Hmm.. I wonder why you have jQuery errors, but this ought to fix the hostnames not showing:

                Change
                Code:
                createpdf.php:  $name = $hosts[0]['name'];
                to:
                Code:
                createpdf.php:  $name = $hosts[0]['host'];
                I can't help you about the graphs. It may be an incompatibility in the API.

                Comment

                • waardd
                  Member
                  • Aug 2014
                  • 82

                  #278
                  Originally posted by martinm_76
                  Hmm.. I wonder why you have jQuery errors, but this ought to fix the hostnames not showing:

                  Change
                  Code:
                  createpdf.php:  $name = $hosts[0]['name'];
                  to:
                  Code:
                  createpdf.php:  $name = $hosts[0]['host'];
                  I can't help you about the graphs. It may be an incompatibility in the API.
                  This doesnt do the trick. It also creates a file called .pdf instead of <hostname>.pdf

                  Comment

                  • martinm_76
                    Member
                    • Mar 2015
                    • 57

                    #279
                    ... Do you have this in createpdf.php? If not, try it.

                    Code:
                    if ($reporttype == 'host') {
                            if (!is_numeric($hostid)) { echo "ERROR: Need hostid for host report!</br>\n"; exit; }
                            $hosts  = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'with_graphs'=>'true','hostids'=>$hostid))
                                    or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
                            //var_dump($hosts);
                            // Get name to be used in PLACEHOLDER-part of filename
                            $name = $hosts[0]['host'];
                            $reportname=str_replace(" ", "_",$name);
                            CreatePDF($hosts);
                    }

                    Comment

                    • 701054
                      Member
                      • Mar 2015
                      • 37

                      #280
                      How to make Cyrilic fonts readable instead
                      КолР̧чÐμѕво отпÐμчатков Ð ̧ тонÐμра
                      ?

                      Comment

                      • waardd
                        Member
                        • Aug 2014
                        • 82

                        #281
                        Originally posted by martinm_76
                        ... Do you have this in createpdf.php? If not, try it.

                        Code:
                        if ($reporttype == 'host') {
                                if (!is_numeric($hostid)) { echo "ERROR: Need hostid for host report!</br>\n"; exit; }
                                $hosts  = ZabbixAPI::fetch_array('host','get',array('output'=>array('hostid','host'),'with_graphs'=>'true','hostids'=>$hostid))
                                        or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
                                //var_dump($hosts);
                                // Get name to be used in PLACEHOLDER-part of filename
                                $name = $hosts[0]['host'];
                                $reportname=str_replace(" ", "_",$name);
                                CreatePDF($hosts);
                        }
                        =====================================
                        In my createpdf.php
                        =====================================

                        if ($reporttype == 'host') {
                        if (!is_numeric($hostid)) { echo "ERROR: Need hostid for host report!</br>\n"; exit; }
                        $hosts = ZabbixAPI::fetch_array('host','get',array('output' =>array('hostid','host'),'with_graphs'=>'true','ho stids'=>$hostid))
                        or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
                        //var_dump($hosts);
                        // Get name to be used in PLACEHOLDER-part of filename
                        $name = $hosts[0]['name'];
                        $reportname=str_replace(" ", "_",$name);
                        CreatePDF($hosts);
                        }
                        =====================================
                        from your message
                        =====================================

                        if ($reporttype == 'host') {
                        if (!is_numeric($hostid)) { echo "ERROR: Need hostid for host report!</br>\n"; exit; }
                        $hosts = ZabbixAPI::fetch_array('host','get',array('output' =>array('hostid','host'),'with_graphs'=>'true','ho stids'=>$hostid))
                        or die('Unable to get hosts: '.print_r(ZabbixAPI::getLastError(),true));
                        //var_dump($hosts);
                        // Get name to be used in PLACEHOLDER-part of filename
                        $name = $hosts[0]['host'];
                        $reportname=str_replace(" ", "_",$name);
                        CreatePDF($hosts);
                        }
                        =====================================
                        Difference:
                        =====================================

                        mine: $name = $hosts[0]['name'];
                        yours: $name = $hosts[0]['host'];

                        But when i change it my report is called .pdf instead of <host>.pdf

                        And still i cant see my hosts in the index.php dropdown menu.

                        Comment

                        • martinm_76
                          Member
                          • Mar 2015
                          • 57

                          #282
                          So, waardd, are you saying that in both cases you get a report called '.pdf'?
                          It seems like that is what you are saying.

                          And apparently you have 'name' somewhere else still if your host list is blank...

                          Okay, in inc/index.functions.php, you need to change ReadArray as well:

                          Code:
                          function ReadArray($array) {
                                  foreach($array as $key=>$value) {
                                          $name = $array[$key]['name'];
                          /* Added for 1.8.x - MMO */
                                          if ( $name == "" ) {
                                              $name = $array[$key]['host'];
                                          }
                          /* End Add */
                                          if (isset($array[$key]['hostid'])) {
                                                  $id   = $array[$key]['hostid'];
                                          }
                                          elseif (isset($array[$key]['groupid'])) {
                                                  $id   = $array[$key]['groupid'];
                                          }
                                          else {
                                                  $id   = $name;
                                          }
                                          echo "<option value=\"$id\">$name</option>\n";
                                  }
                          }
                          If your report is still saved as .pdf after this, you have to do some debugging yourself, such as parsing over createpdf.php and do some extra echos of things that include 'host' to see where you loose it. You should probably use the 'if ($debug) ' wrapper like seen elsewhere, otherwise the PDF output will get garbled (when not choosing the debug option).

                          Comment

                          • waardd
                            Member
                            • Aug 2014
                            • 82

                            #283
                            @martinm_76

                            First of i want to thank you for all the help so far

                            Oke i'm at the point where for HOSTS
                            • hosts are visible in dropdown
                            • host report has host.pdf filename
                            • on the host report the hostname is in the title
                            • host repoprt seems to work good


                            And for HOSTGROUPS
                            • hostgroups are visible in dropdown
                            • host report DOES NOT have hostgroup.pdf filename but just .pdf
                            • on the host report the hostgroupname is in NOT the title
                            • hostgroup report seems to work almost good


                            So it seems to be juyst a small step to perfection

                            Comment

                            • logix88
                              Junior Member
                              • May 2015
                              • 7

                              #284
                              Availability Report

                              Has anyone managed to get IT Services SLA figures included as part of this?

                              We measure Availability by measuring how long agent (in extension the server) was offline during any given period, days/hours, etc. and this is visible in the IT services GUI and worked out for each platform , i.e. Availability of Linux servers was 99% for Last 30 days, etc.

                              Can someone suggest a way we could go around doing this or if you have already done it?

                              Thanks in advance...
                              Last edited by logix88; 29-05-2015, 14:08.

                              Comment

                              • sheh1000
                                Junior Member
                                • May 2015
                                • 3

                                #285
                                Originally posted by logix88
                                Has anyone managed to get IT Services SLA figures included as part of this?
                                The only way I found is to use Zabbix API

                                Comment

                                Working...