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    


View Weathermap outside of Cacti
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
bdearlove



Joined: 09 Jun 2005
Posts: 14

PostPosted: Thu Jun 21, 2007 3:44 pm    Post subject: View Weathermap outside of Cacti Reply with quote

Good Day All,

I am running weathermap, great product integrated with Cacti. Is it possible to display this outside of Cacti?

I have for example on Occasion added Cacti graphs via Guest to the Intranet, is it possible to do this with Weathermap and have it still get updated?

Thanks!
Back to top
Howie
Cacti Guru User


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

PostPosted: Thu Jun 21, 2007 4:35 pm    Post subject: Re: View Weathermap outside of Cacti Reply with quote

bdearlove wrote:
Good Day All,

I am running weathermap, great product integrated with Cacti. Is it possible to display this outside of Cacti?

I have for example on Occasion added Cacti graphs via Guest to the Intranet, is it possible to do this with Weathermap and have it still get updated?

Thanks!


Access to the actual weathermap images isn't really controlled by Cacti. If you link directly to one of those .png files, it will work from anywhere. Possibly I should make the filenames less guessable, actually...

I use exactly this myself to add the thumbnail of one of our overview maps to the intranet.
Back to top
bdearlove



Joined: 09 Jun 2005
Posts: 14

PostPosted: Fri Jun 22, 2007 7:15 am    Post subject: Reply with quote

Actually, the PNG files I found no problem, I didnt know if it was possible to see the PNG files with the ability to hover over them outside if Cacti. My guess is yes if you didn't install the Cacti add-on...

Did you create the weathermap? If so, THANKS! It is amazing!
Back to top
Howie
Cacti Guru User


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

PostPosted: Fri Jun 22, 2007 8:35 am    Post subject: Reply with quote

bdearlove wrote:
Actually, the PNG files I found no problem, I didnt know if it was possible to see the PNG files with the ability to hover over them outside if Cacti. My guess is yes if you didn't install the Cacti add-on...

Did you create the weathermap? If so, THANKS! It is amazing!


OK... the html (which contains the imagemap hover stuff) is also in the output folder. It's a partial HTML page (no BODY or HEAD) for each map, but if you fetch it across to your intranet server with something like wget, or use server-side includes (mod_include) if the intranet is on the same server as cacti, then that would work.
Back to top
bdearlove



Joined: 09 Jun 2005
Posts: 14

PostPosted: Fri Jun 22, 2007 2:56 pm    Post subject: Reply with quote

Awsome. Thats where I got mixed up, the HTML file, if clicking on it references the image, but with an extra output folder thats why it wasn't displaying correctly.
Back to top
gkhnyldrm



Joined: 30 Apr 2008
Posts: 11
Location: Denizli,Turkey

PostPosted: Wed Apr 30, 2008 8:26 am    Post subject: Re: View Weathermap outside of Cacti Reply with quote

bdearlove wrote:
Good Day All,

I am running weathermap, great product integrated with Cacti. Is it possible to display this outside of Cacti?

I have for example on Occasion added Cacti graphs via Guest to the Intranet, is it possible to do this with Weathermap and have it still get updated?

Thanks!


i need the same thing with bdearlove,i need to view my weathermaps without logging on the cacti web console. it is possible using the weathermap.html file in /cacti/plugings/weathermap/output/ directory but there is no weathermap.html file in my /weathermap/output/ directory. i'm using cacti 0.8.6j version and weathermap plugin version 0.95 how can i create weathermap.html file or how can i view my maps anonymously? any ideas?
Back to top
Howie
Cacti Guru User


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

PostPosted: Wed Apr 30, 2008 8:40 am    Post subject: Reply with quote

You can use weathermap without Cacti altogether, from a command-line:
Code:

php weathermap --config /path/to/cacti/plugins/weathermap/configs/blah.conf --output /var/www/html/weathermap.png --htmloutput /var/www/html/weathermap.html

as long as your TARGET paths are full paths. Don't forget to copy overlib.js into the directory on your webserver where the maps are going. You'd need a cron job to do these regularly.

or you could enable the Guest user in Cacti, and then give that user access to your weathermaps (or the ones you want to publish at least), same as for graphs.
Back to top
gkhnyldrm



Joined: 30 Apr 2008
Posts: 11
Location: Denizli,Turkey

PostPosted: Wed Apr 30, 2008 9:34 am    Post subject: Reply with quote

thank you for your reply howie,i used the code below

Code:
php weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html


and i get the following error;
Could not open input file: weathermap

is "weather" parameter wrong? or the paramater "weathermap" is a user name?
Back to top
Howie
Cacti Guru User


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

PostPosted: Wed Apr 30, 2008 9:45 am    Post subject: Reply with quote

gkhnyldrm wrote:
thank you for your reply howie,i used the code below

Code:
php weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html


and i get the following error;
Could not open input file: weathermap

is "weather" parameter wrong? or the paramater "weathermap" is a user name?


You'd need to do that from within the weathermap directory. Didn't mention that, sorry. weathermap is the name of the command-line script. It assumes that all the other *.class.php files it needs are in the current directory, and the lib/datasources directory, so you need to cd to <cacti_dir>/plugins/weathermap first.

(You *might* need to use ./weathermap instead of weathermap, too, but I don't think so)
Back to top
gkhnyldrm



Joined: 30 Apr 2008
Posts: 11
Location: Denizli,Turkey

PostPosted: Wed Apr 30, 2008 10:03 am    Post subject: Reply with quote

I run the following command in <cacti_path>/plugins/weathermap/ and I get the following error

Code:
root@cacti:/usr/share/cacti/site/plugins/weathermap# php weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html

Warning: require_once(Console/Getopt.php): failed to open stream: No such file or directory in /usr/share/cacti/site/plugins/weathermap/weathermap on line 8

Fatal error: require_once(): Failed opening required 'Console/Getopt.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/cacti/site/plugins/weathermap/weathermap on line 8


I didn't edited /usr/share/cacti/site/plugins/weathermap/weathermap file but it causes errors as above. do I need to edit line 8 manually?
Back to top
Howie
Cacti Guru User


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

PostPosted: Wed Apr 30, 2008 10:08 am    Post subject: Reply with quote

No, you need to install a PEAR module. How you do this varies a lot depending on your OS. It's a PHP thing and not a weathermap thing though.

The base PEAR install includes Console-Getopt, which is what is missing on your system. You might be able to install a package/RPM/deb/port/whatever to do this for you. Look for pear or php-pear in your packages.
Back to top
gkhnyldrm



Joined: 30 Apr 2008
Posts: 11
Location: Denizli,Turkey

PostPosted: Wed Apr 30, 2008 10:46 am    Post subject: Reply with quote

thank you so much Howie,I'll work on it
Back to top
gkhnyldrm



Joined: 30 Apr 2008
Posts: 11
Location: Denizli,Turkey

PostPosted: Thu May 01, 2008 5:55 am    Post subject: Reply with quote

I installed pear module on my machine and run the command and get this output.

[/code]root@cacti:/usr/share/cacti/site/plugins/weathermap# php ./weathermap --config /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: RRD DS: Can't find RRDTOOL. Check line 29 of the 'weathermap' script.
RRD-based TARGETs will fail. [WMRRD02]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01213-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_91.rrd on config line 152 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09414-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_96.rrd on config line 158 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_86.rrd on config line 164 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09426-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_83.rrd on config line 170 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09447-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_84.rrd on config line 176 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09496-node09479, target: /usr/share/cacti/site/rra/8800_traffic_in_89.rrd on config line 182 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09489-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_90.rrd on config line 189 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01583-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_85.rrd on config line 195 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01583-node01588, target: /usr/share/cacti/site/rra/iibfa_blok_5500_traffic_in_112.rrd on config line 205 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node01686, target: /usr/share/cacti/site/rra/fefa_blok_5500_traffic_in_111.rrd on config line 211 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node01691, target: /usr/share/cacti/site/rra/fefa_blok_5500_traffic_in_110.rrd on config line 218 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node01220-node01699, target: /usr/share/cacti/site/rra/fefa_blok_5500_traffic_in_109.rrd on config line 225 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02524, target: /usr/share/cacti/site/rra/3com6040_traffic_in_105.rrd on config line 232 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02484, target: /usr/share/cacti/site/rra/3com6040_traffic_in_103.rrd on config line 239 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02490, target: /usr/share/cacti/site/rra/3com6040_traffic_in_104.rrd on config line 246 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02498, target: /usr/share/cacti/site/rra/3com6040_traffic_in_102.rrd on config line 253 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02503, target: /usr/share/cacti/site/rra/3com6040_traffic_in_106.rrd on config line 260 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02509, target: /usr/share/cacti/site/rra/3com6040_traffic_in_107.rrd on config line 267 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02532, target: /usr/share/cacti/site/rra/3com6040_traffic_in_100.rrd on config line 274 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09496-node02771, target: /usr/share/cacti/site/rra/8800_traffic_in_93.rrd on config line 281 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02154-node02537, target: /usr/share/cacti/site/rra/3com6040_traffic_in_101.rrd on config line 289 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09431-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_98.rrd on config line 296 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09496-node09431, target: /usr/share/cacti/site/rra/8800_traffic_in_97.rrd on config line 303 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node09420-node09496, target: /usr/share/cacti/site/rra/8800_traffic_in_95.rrd on config line 310 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: ReadData: LINK node02771-node02154, target: /usr/share/cacti/site/rra/3com6040_traffic_in_108.rrd on config line 316 was recognised as a valid TARGET by a plugin that is unable to run (WeatherMapDataSource_rrd) [WMWARN07]
root@cacti:/usr/share/cacti/site/plugins/weathermap# [code]

weathermap.html file is created in /var/www/ (my web root) directory. I copied the overlib.js file to /var/www/ directory,everything seems ok but when I try to reach weathermap.html (http://mycactiserver/weathermap.html) no graphs are displayed,only a thin line and "Network Map created with PHP Network Weathermap v0.95b" string.
Back to top
Howie
Cacti Guru User


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

PostPosted: Thu May 01, 2008 7:00 am    Post subject: Reply with quote

gkhnyldrm wrote:

/usr/share/cacti/site/plugins/weathermap/configs/kampus.conf: RRD DS: Can't find RRDTOOL. Check line 29 of the 'weathermap' script.
RRD-based TARGETs will fail. [WMRRD02]


This line at the top explains all the other problems (which are just weathermap telling you that it *still* can't find rrdtool). Check the top of the 'weathermap' script and make sure that the path for rrdtool in there is correct.

Quote:

weathermap.html file is created in /var/www/ (my web root) directory. I copied the overlib.js file to /var/www/ directory,everything seems ok but when I try to reach weathermap.html (http://mycactiserver/weathermap.html) no graphs are displayed,only a thin line and "Network Map created with PHP Network Weathermap v0.95b" string.


Did you get a .png file too? That's the actual map after all.

Ooh. You may need to add '--image-uri .' (that's a dot) to your command-line too, so that the IMG SRC in the HTML is correct.
Back to top
gkhnyldrm



Joined: 30 Apr 2008
Posts: 11
Location: Denizli,Turkey

PostPosted: Thu May 01, 2008 7:32 am    Post subject: Reply with quote

yes there is 3 files total in /var/www/ directory. these are weathermap.html weathermap.png and overlib.js (overlib.js is the file that I copied there)

I edit weathermap file and correct rrdtool path line,I run the command without '--image-uri .' and browse site in internet explorr, png image shows with a broken image (X). Then I check the properties of the png image;image url is "http://mycactiserver/var/www/weathermap.png" it must be "http://mycactiserver/weathermap.png"

then I run the command with '--image-uri .' paramater and get the following error.

Code:
root@cacti:/usr/share/cacti/site/plugins/weathermap# php ./weathermap --config --image-uri . /usr/share/cacti/site/plugins/weathermap/configs/kampus.conf --output /var/www/weathermap.png --htmloutput /var/www/weathermap.html

Warning: fopen(--image-uri): failed to open stream: No such file or directory in /usr/share/cacti/site/plugins/weathermap/Weathermap.class.php on line 1321
--image-uri: Couldn't open config file --image-uri for reading


Could not read Weathermap config file. No output produced. Maybe try --help?
root@cacti:/usr/share/cacti/site/plugins/weathermap#


the problem is the url of the png image but I don't know how to fix it.
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
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group