Ad Widget

Collapse

MoZBX - A Mobile Zabbix Client

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zaniwoop
    Senior Member
    • Jan 2010
    • 232

    #16
    I had this exact same problem. Try adding:

    php_value short_open_tag 1

    to your web server config or .htaccess in this dir. Short tags have been deprecated in later php version.
    Thanx, this solved the problem!

    The fact that your test and production environments differ is not encouraging. How do you know what you're testing will work if the environments aren't as identical as possible?
    I test a lot of different systems on my test server and it is not always feasible to re-prep the server to match 100% every time I need to test something.

    But then it is good to find issues where it works in one scenario and not another to iron out all the bugs, so that you know you can comfortably deploy the software without having to worry about it only working in a clinical environment.

    In this case, I have learned something new.

    Comment

    • Mojah
      Member
      • Apr 2010
      • 60

      #17
      Originally posted by Axilla
      Any plans to add support for distributed monitoring?
      I'll look into it, but have limited experience with DM myself. I doubt I'll be adding it soon though, but feel free to contribute yourself.

      Comment

      • RohrbaGe
        Senior Member
        • Aug 2005
        • 167

        #18
        Mojah,

        something like that I have been looking for a while.
        I have tested it in my home environment, works
        fine.

        As I'm not a php programmer, I wasn't able to create such a good
        basic concept like you did.

        I'm quite sure that this idea will be picked up by a lots of zabbix users,
        that do not have deep php knowledge.
        For me that looks like that individual wishes are not too difficult
        to realize.

        congratulation

        I'm one of the rare guys having a windows mobile phone.....

        Comment

        • Zaniwoop
          Senior Member
          • Jan 2010
          • 232

          #19
          I have both a Windows Mobile and an iPhone. It dowsn't work as well on the WM; both with Internet Explorer and with Opera.
          Looks good on Android phones too.

          Comment

          • GArmao
            Zabbix Certified Specialist
            Zabbix Certified Trainer
            Zabbix Certified Specialist
            • Mar 2010
            • 135

            #20
            I'm having the same problem as Axilla, my server is setup as distributed monitoring, I can see only host group from the master server, I correctly see the number of hosts inside every host groups, however whenever I click on a hostgroup, I get a blank page with just the webpage header and mozbx background instead of a list of all the hosts inside the selected host group.
            Forgot to mention, I tried with both a hosted mozbx on my server and through your app portal, same result.
            keep up this great work, I'll contribute with an Android client "installation" guide as soon as I get this working correctly!

            Comment

            • GArmao
              Zabbix Certified Specialist
              Zabbix Certified Trainer
              Zabbix Certified Specialist
              • Mar 2010
              • 135

              #21
              ok it seems I fixed the issue, you're casting hostgroupid, hostid, graphid etc to (int) but in case of distributed monitor, the id is too big to be contained by an integer, to fix I just removed all the (int) casts from: hosts.php, hosts.php, graph.php and graph_image.php

              Comment

              • kofeyh
                Junior Member
                • Jun 2010
                • 17

                #22
                I'm having some fun trying to set this up.

                When I try to log in, it seems the form refreshes, however I'm prompted to log in again. Using mySQL authentication, with 1.8.3.

                There doesn't appear to be any errors in the apache logs, however no cookies are written out either.

                edit: figured it out; using mysql authentication results in needing to add user/ pass to zabbix URI.
                Last edited by kofeyh; 18-10-2010, 07:30.

                Comment

                • Mojah
                  Member
                  • Apr 2010
                  • 60

                  #23
                  Originally posted by GArmao
                  ok it seems I fixed the issue, you're casting hostgroupid, hostid, graphid etc to (int) but in case of distributed monitor, the id is too big to be contained by an integer, to fix I just removed all the (int) casts from: hosts.php, hosts.php, graph.php and graph_image.php
                  I'll see how I can fix this permanently, by adding some more input validation (the int-cast was the easiest way to ensure valid data).

                  Any idea what the maximum size of those IDs is?

                  Comment

                  • GArmao
                    Zabbix Certified Specialist
                    Zabbix Certified Trainer
                    Zabbix Certified Specialist
                    • Mar 2010
                    • 135

                    #24
                    well zabbix supports up to 1000 nodes and the way it does it, from what I understand, is by prefixing the itemid with the node it belongs, so this is an example of itemid on a distributed monitoring environment:
                    100100000010103 where: 1001 is the nodeid, it supports up to 1000 nodes, so I guess it can reach 1999 at most, and the remaining part 00000010103 is the itemid on that node, so my guess is the biggest number would be something like: 199.999.999.999.999
                    I'm not a developer and haven't really looked into the web interface or server code though so I'm just assuming.
                    There's still the problem that only the master node's hosts are visible, so having a way to choose which node to visualize would be great!

                    Comment

                    • lgc78
                      Member
                      • Aug 2010
                      • 35

                      #25
                      I'm running zabbix 1.8.3 with php 5.3.3

                      I have successfully installed mobile zbx on my iphone 3gs - everything works as expected except that my graphs do not load. Ideas?

                      Comment

                      • Mojah
                        Member
                        • Apr 2010
                        • 60

                        #26
                        Originally posted by lgc78
                        I'm running zabbix 1.8.3 with php 5.3.3

                        I have successfully installed mobile zbx on my iphone 3gs - everything works as expected except that my graphs do not load. Ideas?
                        Anything in particular in the error logs of the Apache service? We recently changed from wget's via exec() to built-in PHP curl calls, which might not be enabled on your server?

                        Comment

                        • lgc78
                          Member
                          • Aug 2010
                          • 35

                          #27
                          There isn't anything showing up in the error log. The access log shows successful connections:

                          [20/Oct/2010:18:06:50 -0400] "POST /zabbix/api_jsonrpc.php HTTP/1.1" 200 375

                          I used this script i found to confirm php curl is enabled:

                          <?php
                          function Visit($url)
                          {
                          $agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";$ch=curl_init();
                          curl_setopt ($ch, CURLOPT_URL,$url );
                          curl_setopt($ch, CURLOPT_USERAGENT, $agent);
                          curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
                          curl_setopt ($ch,CURLOPT_VERBOSE,false);
                          curl_setopt($ch, CURLOPT_TIMEOUT, 5);
                          $page=curl_exec($ch);
                          //echo curl_error($ch);
                          $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                          curl_close($ch);
                          if($httpcode>=200 && $httpcode<300) return true;
                          else return false;
                          }
                          if(Visit("http://www.google.com"))
                          echo "Website OK"."n";
                          /*if site down*/
                          else
                          echo "Website DOWN";
                          ?>

                          When i try and view a graph via mobile zbx i just get an image of a question mark.

                          Comment

                          • GArmao
                            Zabbix Certified Specialist
                            Zabbix Certified Trainer
                            Zabbix Certified Specialist
                            • Mar 2010
                            • 135

                            #28
                            are you by any chance using https for your zabbix page? I had the same issue and found out that it was because my zabbix frontend used https but the certificate was self signed so curl was spitting out a warning and not getting the graph. What I had to do is to add a parameter in the original curl call to tell curl to ignore self-signed certificates:
                            File: class_zabbix.php I added this parameter: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

                            Mojah, you should consider adding it just for more compatibility

                            Comment

                            • lgc78
                              Member
                              • Aug 2010
                              • 35

                              #29
                              Thanks GArmao, the self-signed cert was my problem. All is good now.

                              Comment

                              • Mojah
                                Member
                                • Apr 2010
                                • 60

                                #30
                                I've modified it, now allowing self-signed certificates. If you notice any more problems, feel free to add them to the issue list on Github: https://github.com/mattiasgeniar/MoZBX/issues

                                Comment

                                Working...