Announcement

Collapse
No announcement yet.

New mapping module utilizing google maps api

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

  • New mapping module utilizing google maps api

    I'm finishing up work on a module i've written utilizing the google maps api to show service status.

    Overview:

    Addresses are added to each hostgroup through the modules configuration page.
    The blue arrow will convert the addresses into gps coordinates. The green icon will save the address and coordinates to the database.

    The module will place a dot on the map for each hostgroup in oreon at the previously specified gps coorindates. The dot will be green if all hosts are up or red if any service in that hostgroup is down.

    clicking on the dot will popup a callout with a dot for each host in that host group. The dot will be green if all services for that host are up or green if any are down.

    Clicking on the host dot will bring you to oreon's service page for that host.

    I've attached some screen shots to help illustrate the functionality. I look forward to hearing any comments or suggestions.

    This module should be available for release soon.

    -Justin
    Attached Files

  • #2
    woot !

    This module sounds very cool
    very good multi-localisation firms, I hope you will release the beta soon
    ..()_() .°("who | grep -i blonde | date; cd ~; unzip;")
    =(o_0)=
    *(() () Nicolas Verriest, France

    Comment


    • #3
      Great module.

      I hope a release soon

      Have Fun
      Jm0u

      OREONnien séduit et GLPIien séduit
      Tout pour faire un sysadmin séduit

      Comment


      • #4
        Definitely some great work. Greatly anticipating this release.

        Comment


        • #5
          I'm cleaning up the code some and hope to have module ready for release by the end of this week.

          Thanks,

          Justin

          Comment


          • #6
            The module is finally done. Please make backups of files and your DB before installing this module.

            -Installation-
            Unzip the file and drop the gmap folder into your $oreon$/www/modules directory.

            Next, Make sure your webserver has read permissions to the files.

            Goto options->modules and you see the gmap module listed. Click the install icon on the far right and the module will install.

            You should now have a new tab called "Google Map".

            When you click this tab you should get a warning with two links. The first link will take you to google's website where you can generate an api key for your domain name.

            After you generate this code proceed to options->general options->gmap options and paste the code in the key field.

            -Configuration-
            The last step will be to goto google maps->configuration and set an address and gps coordinates for each hostgroup.

            Entering an address and clicking the blue arrow will automatically generate gps coordinates for that address. The green button at the end of each row will save the results.

            Please note, faulty gps coordinates for any row will break the map. Also, english is my primary language, so my french translations might be way off.

            I look forward to hearing any question or comments.

            Thanks,

            Justin
            Attached Files

            Comment


            • #7
              thanks for this module
              It's goof job.

              Have Fun
              Jm0u

              OREONnien séduit et GLPIien séduit
              Tout pour faire un sysadmin séduit

              Comment


              • #8
                Small issue

                I'm running Nagios 2.5 and Oreon v1.4 and I ran into this small issue. Instead of seeing "Google Maps" I receive "#UNDEF#" as the tab's name. I will try out the rest of the functionality to see how it works otherwise. Thanks a lot for the plug-in!
                Glad to see the community backing this product!
                -P2

                ***Okay got my API plugged in and input a company address, hit the arrow to give the co-ordinates, when I went back to the map it didn't save. So I re-entered the info then hit the green arrow pointing down and now when I return to the map, the map doesn't draw. As soon as I clear out the address and hit the green arrow pointing down (i would imagine, "save changes") the map appears again...***


                ****I logged out and back in and everything seems to work fine****
                Attached Files

                Comment


                • #9
                  I've noticed the same #undef#. I believe the language definitions are only loaded when you login( maybe julio can confirm this) so a log-out and login are required.

                  You are correct in assuming the green arrow is the save button. Clicking the green button should display a circle to the right of the green button which indicates it's in the process of saving. Once this circle disappears you can assume it has been saved. I plan on implementing error trapping in the future.

                  Let me know if tou have any other issues. Also, I'm interested in the performance of the module as well. I'm mainly interested in how long in takes the load the map once several locations have been defined.

                  Thanks for your interest in the module,

                  -Justin


                  Originally posted by p2im0 View Post
                  I'm running Nagios 2.5 and Oreon v1.4 and I ran into this small issue. Instead of seeing "Google Maps" I receive "#UNDEF#" as the tab's name. I will try out the rest of the functionality to see how it works otherwise. Thanks a lot for the plug-in!
                  Glad to see the community backing this product!
                  -P2

                  ***Okay got my API plugged in and input a company address, hit the arrow to give the co-ordinates, when I went back to the map it didn't save. So I re-entered the info then hit the green arrow pointing down and now when I return to the map, the map doesn't draw. As soon as I clear out the address and hit the green arrow pointing down (i would imagine, "save changes") the map appears again...***


                  ****I logged out and back in and everything seems to work fine****

                  Comment


                  • #10
                    Okay so between myself and my co-workers giving this a try today we've really only found one issue, and it's related to my last post.

                    I've been playing with the module for a while now and the issue I had before with the Map not drawing correctly I believe we've narrowed down to a variable type issue.

                    I have about 80 Hostgroups 78 of which begin with "LAN - $LOCATION$" (or "WAN - $LOCATION$") and two of which are "Testgroup" and "Routers". I have no issues with Testgroup and Routers. As soon as I toss in coordinates for any of the other groups I get IE telling me I have an error on the page. In all occurrences its with the string defining the variable name for the hostgroup.

                    I assume the hostgroup variables are not taken in as strings and the white-space I have included in my host-group names is throwing an error and is causing the engine to expect a ";" to end the variable statement.

                    I'm not sure if this is part of your code or Google's, but as of now I'm changing all white-space to underscores as a work around. But it would be great to have this fixed in a future release.

                    Once again, thanks a lot for this module, absolutely excellent work.

                    Thanks,
                    -P2



                    **EDIT** I also found that it not only doesn't like white-space, it doesn't like "dashes" (-). I had a hostgroup titled Molsheim-TOIP, and I received an error where it hit the dash in the hostgroup name. I Hope that variable can accept strings in the near future!

                    **EDIT #2** I've noticed that after placing several hostgroups on the map they aren't positioned correctly from distant zoom levels. As much as 100-200 miles off of location, depending on the zoom level. It would be great to have them as close as possibly to their original locations as I have several sites relatively close together. In New-England, our south-western location should be located on the southern side of Rt 3, in Billerica MA.

                    Keep me updated, hope this feedback is more helpful rather than annoying !
                    Attached Files

                    Comment


                    • #11
                      First off, thanks for your feedback. Attached is a patch which should fix the whitespace and dash issues.

                      As far as the zoom out positioning being off, I will look into a solution to this.

                      Can you tell me roughly how many hostgroups, hosts, and services you are monitoring and how long it takes for the page with the map to load?

                      Thanks again for your feedback..

                      edit: I just fixed the zoom issue, and have updated theattached zip file.
                      Attached Files
                      Last edited by breakintheweb; 23 May 2007, 16:53.

                      Comment


                      • #12
                        Wow, I wasn't expecting such a prompt response. Thanks a lot, the patch fixed the problems.
                        We looked into the dot-rendering issue for about 2 hours last night, and we're extremely curious what the issue was, I didn't even think to look in the gmap directory, we looked into all the calls in the HTML and PHP code...until we finally realized it'd be easier just to ask :P

                        Some rendering statistics (It's hugely based on system specs):
                        --PIII - 933MHz (1GB mem)
                        ~3.5 seconds to render the page
                        ~3 seconds to render pop-up after a location is clicked

                        --Centrino 1.86GHz (1GB Mem)
                        ~.5 seconds to render the page
                        ~.2 seconds to render pop-up

                        --P4 2.7GHz (512MB Mem)
                        ~1 second to render the page
                        ~.5 seconds to render pop-up

                        If you need anything else let me know,
                        Thank you so much for this great module!

                        Comment


                        • #13
                          The issue with dot rendering was the anchor value being off. In the gmap API you set the anchor value in pixels to the point of the image ( in this case a green or red dot icon) you want to line up with the gps coordinates on the map.

                          I had used the default anchor value, which is used for a pushpin image. This was pushing the dot icons up and right of the real gps points.

                          As you zoomed out of the map, the issue got worse because the size of the map stays the same, while the pixel offset of the icon stays the same. 20 pixels north when you are zoomed all the way in might be a few feet, when you are zoomed all the way out, it might be in another country. :grin:

                          -Justin



                          Originally posted by p2im0 View Post
                          Wow, I wasn't expecting such a prompt response. Thanks a lot, the patch fixed the problems.
                          We looked into the dot-rendering issue for about 2 hours last night, and we're extremely curious what the issue was, I didn't even think to look in the gmap directory, we looked into all the calls in the HTML and PHP code...until we finally realized it'd be easier just to ask :P

                          Some rendering statistics (It's hugely based on system specs):
                          --PIII - 933MHz (1GB mem)
                          ~3.5 seconds to render the page
                          ~3 seconds to render pop-up after a location is clicked

                          --Centrino 1.86GHz (1GB Mem)
                          ~.5 seconds to render the page
                          ~.2 seconds to render pop-up

                          --P4 2.7GHz (512MB Mem)
                          ~1 second to render the page
                          ~.5 seconds to render pop-up

                          If you need anything else let me know,
                          Thank you so much for this great module!

                          Comment


                          • #14
                            I take those statistics back, the render time is drastically different now that my map isn't cached. I just timed 14 seconds to render the map for the first time on my system, P4 Centrino 1.86GHz (1GB memory).

                            This is with 16 hostgroups mapped, and 177 Hosts in all the mapped hostgroups. Once the map is rendered it's very quick, all pop-up's are instant. The initial rendering time is what takes the longest.
                            It takes approx 35-40 seconds to render on a co-worker's P3 900MHz machine.

                            Comment


                            • #15
                              Justin,
                              I have a small group of questions (more-so requests) for added functionality to the program.

                              First, we have a large amount of host-groups in the new-england and europe areas. Hoping to use this plug-in to monitor all sites world-wide we have run into a large issue. When viewing highly-populated areas the host-group dots simply overlap. I've had a group of 10 sites or so where 9 had no issues, but one had a server down, and from any view other than directly zoomed into New England I can't see the host-group with a server down. So, I was curious if there was any way to add functionality so that host-groups with errors would have a higher-priority than those that are green. Hence always showing the host-groups with issues on top.

                              Second, I'd like to use the plug-in on a large monitor to keep a constant up-to-date view of all hostgroups. At the moment the page doesn't auto-refresh. I was curious if you could implement a refresh interval of some sort?

                              Third, tying off of the last two, I was curious if it'd be possible to render three+ maps on only one page. Say, have one map for a complete global view of all sites, then use the other two maps to narrow down into specific areas of high host-group concentrations.

                              Finally, I know you have the functionality to click a device and bring it into it's page in Oreon, that's great. I was curious if there's anyway to implement right-click functions on devices? Such as, sayyy right-click to open a telnet session to that device, or do a direct ping on the device, tracert?

                              Once again, I want to thank you for all the work and time you've put into this! I hope you can really make this one of the better and widely used plugins for the program! Keep me updated!

                              -Brett

                              Comment

                              Working...
                              X