jablonka.czprosek.czf

weathermap

Subversion Repositories:
[/] [docs/] [pages/] [cacti-plugin.html] - Diff between revs 1 and 85

Show entire file Ignore whitespace

Rev 1 Rev 85
Line 6... Line 6...
<link rel="stylesheet" type="text/css" media="screen" href="weathermap.css" /> <link rel="stylesheet" type="text/css" media="screen" href="weathermap.css" />
<meta name="generator" content= <meta name="generator" content=
"HTML Tidy for Mac OS X (vers 12 April 2006), see www.w3.org" /> "HTML Tidy for Mac OS X (vers 12 April 2006), see www.w3.org" />
   
<title>PHP Weathermap <title>PHP Weathermap
v0.91 v0.97a
- Cacti Plugin</title> - Cacti Plugin</title>
<style type="text/css" media="print"> <style type="text/css" media="print">
/*<![CDATA[*/ /*<![CDATA[*/
body { font-size: 12pt; } body { font-size: 12pt; }
a { color: black; text-decoration: underline; font-weight: normal;} a { color: black; text-decoration: underline; font-weight: normal;}
Line 39... Line 39...
</ul> </ul>
</div> </div>
   
<div id="header"> <div id="header">
<h1>PHP Weathermap <h1>PHP Weathermap
v0.91 v0.97a
</h1> </h1>
<h4>Copyright &copy; 2005-2007 Howard Jones, <tt><a <h4>Copyright &copy; 2005-2010 Howard Jones, <tt><a
href="mailto:howie@thingy.com">howie@thingy.com</a></tt>. (<a href="mailto:howie@thingy.com">howie@thingy.com</a></tt>. (<a
href="http://www.network-weathermap.com/">Website</a>)</h4> href="http://www.network-weathermap.com/">Website</a>)</h4>
</div> </div>
   
   
Line 125... Line 125...
<h3>Managing Maps - Other Options</h3> <h3>Managing Maps - Other Options</h3>
   
<p><em>Output Format</em> allows you to change the image file format used by the plugin. Since v0.9, Weathermap can create PNG, GIF and JPEG files, as long as the GD library on your system was compiled with the correct libraries. JPEG images can be quite a bit smaller than PNG, without much degradation in quality. PNG is the default.</p> <p><em>Output Format</em> allows you to change the image file format used by the plugin. Since v0.9, Weathermap can create PNG, GIF and JPEG files, as long as the GD library on your system was compiled with the correct libraries. JPEG images can be quite a bit smaller than PNG, without much degradation in quality. PNG is the default.</p>
   
<p><em>Map Rendering Interval</em> is intended for advanced users only. If you use the <em>1-minute polling</em> patch for Cacti, you might not want to have Weathermap redraw your maps every minute. This option allows you to change this, so that Weathermap only redraws every <em>n</em> polling cycles. </p> <p><em>Map Rendering Interval</em> is intended for advanced users only. If you use the <em>1-minute polling</em> patch for Cacti, you might not want to have Weathermap redraw your maps every minute. This option allows you to change this, so that Weathermap only redraws every <em>n</em> polling cycles. </p>
<p>During that one cycle when it does redraw, your polling cycle will still be longer than usual, so you can also turn off the poller part of Weathermap, so that it doesn't redraw at all. This allows you to use the user-access parts of the plugin, but manage the redrawing of maps yourself. To redraw all the maps outside of the standard Cacti poller process, there is a special PHP script <tt>weathermap-cacti-rebuild.php</tt> that does the same job as the Cacti poller. To use this, you need to edit it, and change the path in the top of the file to point to your Cacti root directory. Then set up a second /etc/crontab entry, to redraw your Weathermaps without slowing down your Cacti polling: <p>During that one cycle when it does redraw, your polling cycle will still be longer than usual, so you can also turn off the poller part of Weathermap, so that it doesn't redraw at all. This allows you to use the user-access parts of the plugin, but manage the redrawing of maps yourself. To redraw all the maps outside of the standard Cacti poller process, there is a special PHP script <tt>weathermap-cacti-rebuild.php</tt> that does the same job as the Cacti poller. To use this, you need to edit it, and change the path in the top of the file to point to your Cacti root directory. Then set up a second /etc/crontab entry, to redraw your Weathermaps without slowing down your Cacti polling:</p>
<div class="shell"><pre> <div class="shell"><pre>
*/5 * * * * cactiuser /usr/bin/php /your/cacti/path/plugins/weathermap/weathermap-cacti-rebuild.php */5 * * * * cactiuser /usr/bin/php /your/cacti/path/plugins/weathermap/weathermap-cacti-rebuild.php
</pre></div> </pre></div>
   
You will need to change the paths to php and cacti, and the user that cacti runs as. If you use 'crontab -e', instead of editing /etc/crontab directly, then you should remove the 'cactiuser'. <p>You will need to change the paths to php and cacti, and the user that cacti runs as. If you use 'crontab -e', instead of editing /etc/crontab directly, then you should remove the 'cactiuser'. <strong>In normal use, you don't need to add a cron job - the Cacti poller does this work for you.</strong>
</p> </p>
   
<h3>Final Notes and Troubleshooting</h3> <h3>Final Notes and Troubleshooting</h3>
   
<p class="important">Weathermap has quite a lot of logging. If you have a problem, then <em>check your cacti.log</em> for lines starting WEATHERMAP. Most normal errors will <p class="important">Weathermap has quite a lot of logging. If you have a problem, then <em>check your cacti.log</em> for lines starting WEATHERMAP. Most normal errors will
appear in here with Cacti's logging level set to LOW. If you set Cacti's logging level to DEBUG, then Weathermap will produce a <em>lot</em> of log information as it runs. Also see the <a href="faq.html">FAQ section</a> of this manual, and the <a href="http://www.network-weathermap.com/">network-weathermap.com</a> website for more.</p> appear in here with Cacti's logging level set to LOW. If you set Cacti's logging level to DEBUG, then Weathermap will produce a <em>lot</em> of log information as it runs. Also see the <a href="faq.html">FAQ section</a> of this manual, and the <a href="http://www.network-weathermap.com/">network-weathermap.com</a> website for more.</p>
   
<p>On the Weathermap management page, there is a 'Recalculate NOW' button. This will try to recalculate all your maps on demand. This is more complicated than it sounds, due to file permissions! Normally, the Cacti poller would create the images and HTML files in the output directory, which means they are owned by the 'cactiuser', whatever that user is called on your system. When you click 'Recalculate NOW', the redraw process is run from within your webserver, and runs as whatever user runs your webserver (nobody, www, apache...). To allow for both these situations, the output directory and it's contents must have appropriate permissions to allow both users to write to the files. The lazy insecure way to do this is just 'chmod 777 output/*', but that allows <em>everyone</em> to write to the files! A better way is to create a new group, make 'cacti' and 'www' members of that group (as well as their other groups), then 'chgrp -R newgroup output' and 'chmod 770 output/*' so that they can both write, but nothing else can. <strong>This is why the button is labelled 'experimental'.</strong></p> <p>On the Weathermap management page, there is a 'Recalculate NOW' button. This will try to recalculate all your maps on demand. This is more complicated than it sounds, due to file permissions! Normally, the Cacti poller would create the images and HTML files in the output directory, which means they are owned by the 'cactiuser', whatever that user is called on your system. When you click 'Recalculate NOW', the redraw process is run from within your webserver, and runs as whatever user runs your webserver (nobody, www, apache...). To allow for both these situations, the output directory and it's contents must have appropriate permissions to allow both users to write to the files. The lazy insecure way to do this is just 'chmod 777 output/*', but that allows <em>everyone</em> to write to the files! A better way is to create a new group, make 'cacti' and 'www' members of that group (as well as their other groups), then 'chgrp -R newgroup output' and 'chmod 770 output/*' so that they can both write, but nothing else can. <strong>This is why the button is labelled 'experimental'.</strong></p>
   
</div> </div>
</div>  
</body> </body>
</html> </html>

Powered by WebSVN 2.2.1