GPS Maps for Cacti
Moderators: Developers, Moderators
Awesome work Spiffydudex!
The zoom functionality and the site status really make this plugin now.
Weather maps work if I have the US map visible, but nothing appears for Australia, so assume the service is US-only. Not a big deal but was interested in checking out what it looked like.
Is there any way to make the red pin for sites that are down, standout more? I have a number of sites clustered together and a site that is down is obscured. I can edit the red icon in host_icons.php and make it larger, but I thought there might be a better way to do it.
Thanks again.
The zoom functionality and the site status really make this plugin now.
Weather maps work if I have the US map visible, but nothing appears for Australia, so assume the service is US-only. Not a big deal but was interested in checking out what it looked like.
Is there any way to make the red pin for sites that are down, standout more? I have a number of sites clustered together and a site that is down is obscured. I can edit the red icon in host_icons.php and make it larger, but I thought there might be a better way to do it.
Thanks again.
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
Nope, Sad to say everything is done in the host icons file.
The weather was just something I was toying with I figured if anyone wants to enable it in the US they can edit it to their needs. Check the weather.php for more info. There should be a similar service like NOAA, for Australia.
Thanks for the great feedback and support definitely helps to have someone look at your work.
The weather was just something I was toying with I figured if anyone wants to enable it in the US they can edit it to their needs. Check the weather.php for more info. There should be a similar service like NOAA, for Australia.
Thanks for the great feedback and support definitely helps to have someone look at your work.
The plugin doesnt appear to automatically update the status if the site goes down. Can it be setup to refresh the markers every 60 seconds so it will display a red marker for a site that has suddenly gone offline?
It would also be useful if when it refreshed and a site was down, it displayed the bubble to draw your attention
I've noticed that simulating a down site by changing it's IP address to a bogus address and refreshing the plugin, the marker changes to red. But when I change the ip back the marker never changes to green it stays red, despite Cacti and the Monitor plugin showing the site as being back up again. The only way to change it back to green is to close IE and re-open it.
I tried to get around the problem of a red marker being hidden by alot of green markers by replacing the green marker with a custom marker I made that reduced the opacity of the green by 75% so I could see through it. Unfortunately when I changed the path for the green marker in host_icons.php to my new marker, they no longer displayed. Not sure why this is the case, I made it a 24-bit png file and put it on the Linux server in the gpsmap/images folder with the same permissions as the print.gif.
I guess i'm hoping that if the functionality is there, I no longer need to use the Monitor plugin.
Thanks.
It would also be useful if when it refreshed and a site was down, it displayed the bubble to draw your attention
I've noticed that simulating a down site by changing it's IP address to a bogus address and refreshing the plugin, the marker changes to red. But when I change the ip back the marker never changes to green it stays red, despite Cacti and the Monitor plugin showing the site as being back up again. The only way to change it back to green is to close IE and re-open it.
I tried to get around the problem of a red marker being hidden by alot of green markers by replacing the green marker with a custom marker I made that reduced the opacity of the green by 75% so I could see through it. Unfortunately when I changed the path for the green marker in host_icons.php to my new marker, they no longer displayed. Not sure why this is the case, I made it a 24-bit png file and put it on the Linux server in the gpsmap/images folder with the same permissions as the print.gif.
I guess i'm hoping that if the functionality is there, I no longer need to use the Monitor plugin.
Thanks.
First upgrade plugin to 1.41 by copying files. Then in setup.php comment two linesBut one bug which is annoying me, is that I have to activate the 'console' menu for my users who wants to get the 'GPS map' link.
I have noticed though that if I click on any tab other than Console, the GPS Map tab disappears, and the only way I can bring it back is clicking on the Console tab again.
Code: Select all
function plugin_gpsmap_install () {
//gpsmap_setup_database();
}
function plugin_gpsmap_uninstall () {
//gpsmap_remove_database();
}
Enjoy permanent "GPS" tab.
For cacti 0.8.7e I also changed line in ./include/top_header.php
Code: Select all
//api_plugin_hook('top_header_tabs');
api_plugin_hook('top_graph_header_tabs');
Also in gpsmap.php change
Code: Select all
include_once("./include/top_header.php");
Code: Select all
include_once("./include/top_graph_header.php");
Also edit in setup.php
Code: Select all
function gpsmap_draw_navigation_text ($nav) {
//$nav["gpsmap.php:"] = array("title" => "GPS Map", "mapping" => "index.php:,utilities.php:", "url" => "gpsmap.php", "level" => "1");
$nav["gpsmap.php:"] = array("title" => "GPS Map", "mapping" => "", "url" => "gpsmap.php", "level" => "0");
return $nav;
}
-
- Posts: 1
- Joined: Tue Aug 25, 2009 8:33 am
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Just for the upgrade part, is that part of your gpsmap_check_upgrade function correct ??
It's more thold related than gpsmap ...
Nice plugin, I would love to use it, but unfortunately, Google Licence terms forbidd using the free google api for internal web-sites and refers to the non-free Premium API ...
Code: Select all
include_once($config['base_path'] . '/plugins/thold/includes/database.php');
thold_upgrade_database ();
Nice plugin, I would love to use it, but unfortunately, Google Licence terms forbidd using the free google api for internal web-sites and refers to the non-free Premium API ...
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
Check to make sure that the xml file also is writable, or delete it so that the server will remake it. Also be sure to check the ownership properties on the folder. I have never run an IIS server effectively (Always had problems with weird things like that)Mikekellner wrote:Hello, i have installed the plugin on 0.87e / Windows 2003.
The XML Folder has "Everyone" write enabled.
By the GPSMap Tab i see an IIS 500 Error.
Any idea?
Mike
Yes...sadly I pulled a lot from Thold and it wiggled its way in there. I was just toying with how to start performing a more simplified upgrade process. Never got around to implementing it.phalek wrote:Just for the upgrade part, is that part of your gpsmap_check_upgrade function correct ??
It's more thold related than gpsmap ...
@ursal
That is a good fix, I don't know if that is the proper way to fix, but it works. Thanks
For some reason I don't get any icons on my map.
-I've added the Google Maps API key.
-I've set an initial long/lat and it works.
-I've set permissions on the XML folder, and the gpsXML.xml file is populated with positions and stuff.
All the hosts I've initially set a position for are of the "undefined" type, so should show as white icons. Tried logging off/on, restarting FireFox, no luck.
Any ideas? I'd really like to get this to work, as it seems like an awesome plugin!
-I've added the Google Maps API key.
-I've set an initial long/lat and it works.
-I've set permissions on the XML folder, and the gpsXML.xml file is populated with positions and stuff.
All the hosts I've initially set a position for are of the "undefined" type, so should show as white icons. Tried logging off/on, restarting FireFox, no luck.
Any ideas? I'd really like to get this to work, as it seems like an awesome plugin!
API problem
When I try to generate API key with my company then push it in GPS API key in cacti it sad:
The Google Maps API server rejected your request. This could be because the API key used on this site was registered for a different web site. You can generate a new key for this web site at
http://code.google.com/apis/maps/.
anybody know why?? Because my company web site have just resisted few days ago! Who stolen my web site ???
The Google Maps API server rejected your request. This could be because the API key used on this site was registered for a different web site. You can generate a new key for this web site at
http://code.google.com/apis/maps/.
anybody know why?? Because my company web site have just resisted few days ago! Who stolen my web site ???
Wellcome) I don't know php well, but can force to work almost everything. top_header.php generates page with console on the left, top_graph_header.php - without it. I'm not sure about changes in cacti files, must be another way to fix tab order.spiffydudex wrote: @ursal
That is a good fix, I don't know if that is the proper way to fix, but it works. Thanks
Hello!
This plugin is really great.
I've installed the 1.4 version and all works perfectly.
Now, I've upgraded to 1.41 version but I cannot see any Icon.
On 1.4 all was ok...
To upgrade I simply copied the new version over the old one. Copied custom_hosts.php and host_icons.php from old 1.40 to 1.41 to not loose anything. The XML folder is writable and the file gpsXML.xml has the coords in. The devices has the coords too, but on the map I cannot see any Icon.
Can you help me?
Thank's!
Simon
***EDIT***
I don't know why, but I'm seeing hosts on my Cacti GPS Map in the USA I've NEVER added of course......
This plugin is really great.
I've installed the 1.4 version and all works perfectly.
Now, I've upgraded to 1.41 version but I cannot see any Icon.
On 1.4 all was ok...
To upgrade I simply copied the new version over the old one. Copied custom_hosts.php and host_icons.php from old 1.40 to 1.41 to not loose anything. The XML folder is writable and the file gpsXML.xml has the coords in. The devices has the coords too, but on the map I cannot see any Icon.
Can you help me?
Thank's!
Simon
***EDIT***
I don't know why, but I'm seeing hosts on my Cacti GPS Map in the USA I've NEVER added of course......
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
At the bottom of the 1.41 there were some additions to the custom_hosts.php This was for the up/down/recovering statuses. Make sure you have those.To upgrade I simply copied the new version over the old one. Copied custom_hosts.php and host_icons.php from old 1.40 to 1.41 to not loose anything. The XML folder is writable and the file gpsXML.xml has the coords in. The devices has the coords too, but on the map I cannot see any Icon.
I don't know why, but I'm seeing hosts on my Cacti GPS Map in the USA I've NEVER added of course......
Just empty the xml file and it should repopulate.
Make sure you copy the entire API key. if you just double click then copy you will usually only get half of the API Key. ALSO for some reason I have found that google can be particular about the differences between: www.domain.com and domain.comWhen I try to generate API key with my company then push it in GPS API key in cacti it sad:
The Google Maps API server rejected your request. This could be because the API key used on this site was registered for a different web site. You can generate a new key for this web site at
http://code.google.com/apis/maps/.
anybody know why?? Because my company web site have just resisted few days ago! Who stolen my web site ???
Use the one that most suites you.
@Øyvind
Make sure you are using the newest version 1.41. If you updated I think that the custom_hosts.php is not the newest version. there are some changes in the new version.
Hopefully this helps guys.
This is the 1.41 content of custom_hosts.php, empty:spiffydudex wrote: At the bottom of the 1.41 there were some additions to the custom_hosts.php This was for the up/down/recovering statuses. Make sure you have those.
Code: Select all
<?
switch ($type) {
// ****** DO NOT EDIT ABOVE ******
//Here you can set custom host type definitions.
//the case number corresponds to the type number set within the Cacti Host databse
//$type = "whatever";
//the "whatever" must be set the same within the host_icons
// THIS WILL be different for all cacti installations as things will be installed in different orders
case 1:
$type = "Server";
break;
case 5:
$type = "Router/Pix";
break;
case 8:
$type = "Localhost";
break;
case 14:
$type = "AP/Tower";
break;
case 15:
$type = "Subscriber";
break;
// ****** DO NOT EDIT BELOW *******
//must include default for safety
default:
$type = "Undefined";
break;
}
DONE, removed gpsXML.xml and cacti creates a new one, with ONLY my hostnames and coords, but if I zoom all out, I see hosts in Texas with IP address and hosts not used by me...Just empty the xml file and it should repopulate.
I still miss my icons/hosts in europe, seen since 1.40 version.
API key surely corret, otherwise i think I cannot see any map as well.
thank's
Simon
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
That is strange. The XML file is parsed and then sent to google to make the map. Points in Texas should not be showing up unless they are in the XML or for some strange reason in your database.
When I get to a computer I'll check and post differences, because the customs_hosts.php should have several new additions.
When I get to a computer I'll check and post differences, because the customs_hosts.php should have several new additions.
-
- Cacti User
- Posts: 97
- Joined: Thu Jul 24, 2008 11:21 am
- Location: Hallsville, TX
- Contact:
Sorry, I misspoke. it is the host_icons.php that was changed.
at the bottom it should have these:
at the bottom it should have these:
Code: Select all
//DO NOT REMOVE THESE
customIcons["up"] = iconGreen;
customIcons["recovering"] = iconOrange;
customIcons["down"] = iconRed;
customIcons["disabled"] = iconBlack;
Who is online
Users browsing this forum: No registered users and 0 guests