Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Exporting weathermaps

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
robgolding63



Joined: 05 Apr 2008
Posts: 16

PostPosted: Tue Apr 08, 2008 11:13 am    Post subject: Exporting weathermaps Reply with quote

Hi,
I know this is the second topic in as many days I've started, but I hope this will be a simple one to answer.

I wish to export my weathermap, to another webserver - so I can publish it on my website. At present I have an smbmount working to the target server (cacti server is linux, target is Windows Server 2003), and a cp command that runs every minute (as does the poller) to copy the weathermap over to the webserver.

I am experiencing problems, however, when the two commands run almost simultaneously, and only half the weathermap is generated when the copy runs, so I get an incomplete weathermap on the webserver. Is there an "official" way to export the maps, or should I make a script to run the poller, wait a few seconds, then run the copy, and call that from a single cron.

I am trying this method at present, but the sleep command doesn't seem to be working for me .

Thanks a lot,

Rob
Back to top
streaker69
Cacti Pro User


Joined: 27 Mar 2006
Posts: 630
Location: Psychic Amish Network Administrator

PostPosted: Tue Apr 08, 2008 1:40 pm    Post subject: Reply with quote

Why not just link to the weathermap in an IFrame instead of trying to export it to another server?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 1966
Location: United Kingdom

PostPosted: Tue Apr 08, 2008 1:55 pm    Post subject: Reply with quote

streaker69 wrote:
Why not just link to the weathermap in an IFrame instead of trying to export it to another server?


You may need to remove/modify the .htaccess file I just added in 0.95 to do that The latest version tries a little more to block you getting to maps without being logged into Cacti. Also, the <IMG> tag in the HTML refers to a script rather than the image directly.

Hmmm. It's getting so you *do* need an export option, isn't it?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 1966
Location: United Kingdom

PostPosted: Tue Apr 08, 2008 2:00 pm    Post subject: Reply with quote

As for the 'half-map' problem, the way I solve those is by changing my cron script for Cacti. I have an update.sh script in the cacti home directory, and put *that* in the crontab.

That looks like:
Code:

#!/bin/sh

/usr/bin/php /var/www/docs/cacti/poller.php

# at this stage, the rrd files are updated, and weathermaps too.

# any other commands I want to run right after Cacti.
rrdtool graph .......



I use this to generate some composite graphs for our intranet, and also some stripgraphs from the just-collected cacti data.
Back to top
robgolding63



Joined: 05 Apr 2008
Posts: 16

PostPosted: Tue Apr 08, 2008 5:28 pm    Post subject: Reply with quote

streaker69 wrote:
Why not just link to the weathermap in an IFrame instead of trying to export it to another server?


The Cacti server isn't visible from the outside, so this can't be done unfortunately.

Howie wrote:

As for the 'half-map' problem, the way I solve those is by changing my cron script for Cacti. I have an update.sh script in the cacti home directory, and put *that* in the crontab.


Yeah that's what I was thinking too. I made the script, but wanted to add a sleep command between the poller and the copy, but it seems to be working OK without it.

Thanks a lot...again!

Rob
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group