jablonka.czprosek.czf

weathermap

Subversion Repositories:
[/] [docs/] [pages/] [cacti-plugin.html] - Blame information for rev 10

 

Line No. Rev Author Line
11simandl<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 
4<html lang="en" xml:lang="en">
5<head>
6 <link rel="stylesheet" type="text/css" media="screen" href="weathermap.css" />
7 <meta name="generator" content=
8 "HTML Tidy for Mac OS X (vers 12 April 2006), see www.w3.org" />
9 
10 <title>PHP Weathermap
11v0.91
12 - Cacti Plugin</title>
13<style type="text/css" media="print">
14/*<![CDATA[*/
15body { font-size: 12pt; }
16a { color: black; text-decoration: underline; font-weight: normal;}
17/*]]>*/
18</style>
19 
20</head>
21 
22<body>
23 <div id="frame">
24 
25 
26<div class="navcontainer">
27 <ul id="navlist">
28 <li><a href="main.html">Main Page</a></li>
29 <li><a href="main.html#installation">Installation</a></li>
30 <li><a href="main.html#basics">Basics</a></li>
31 <li><a href="faq.html">FAQ and Tips</a></li>
32 <li><a href="main.html#example">Sample Map</a></li>
33 <li><a href="cli-reference.html">CLI Reference</a></li>
34 <li><a href="config-reference.html">Config Reference</a></li>
35 <li><a href="advanced.html">Advanced Topics</a></li>
36 <li><a href="editor.html">Editor</a></li>
37 <li><a href="cacti-plugin.html">Cacti Plugin</a></li>
38 <li><a href="http://www.network-weathermap.com/">Site</a></li>
39 </ul>
40</div>
41 
42<div id="header">
43 <h1>PHP Weathermap
44v0.91
45</h1>
46 <h4>Copyright &copy; 2005-2007 Howard Jones, <tt><a
47href="mailto:howie@thingy.com">howie@thingy.com</a></tt>. (<a
48href="http://www.network-weathermap.com/">Website</a>)</h4>
49</div>
50 
51 
52 <h2><a name="cactiplugin">Cacti Plugin</a></h2>
53 
54<p><img class="figure figright" src="../images/cacti_step2.png" />Since v0.8 there is support for tighter <a href="http://www.cacti.net/">Cacti</a> integration, using the Cacti Plugin Architecture that Jimmy Conner (aka cigamit) has developed for Cacti 0.8.x.</p>
55<p class="important">NOTE: To start using the plugin, you should follow the <a href="main.html#installation">installation notes</a> through first.</p>
56 
57<p>With that done, you should now have a Weathermap tab showing in your Cacti web interface, and a Weathermaps entry under Management in the Console menu. If you already have your map configuration files, you should now copy those into the 'configs' directory, inside the weathermap directory, so that the plugin can find them. If you don't, there's a complete example map in the weathermap/docs/example directory, that you can use to get started. Copy the example.conf from there into your configs/ directory instead.</p>
58 
59 
60<p><img class="figure figright" src="../images/cacti_maps_manage.png" />Once your maps are in the configs directory, choose the 'Weathermaps'
61link from the left side menu of the Console page in Cacti. A new screen
62appears, showing the configuration files that Weathermap is currently
63handling. Choose 'Add' and pick one of your configuration files from the
64list. </p>
65<p>It should appear in the 'Weathermaps' list now, and you
66can see whether it will be updated on the next poller run ('active'),
67and who will be able to see it.</p>
68 
69<p>At this stage, you should probably wait five minutes (a poller cycle), reload the
70Weathermap tab, and make sure your map was created. If it doesn't show
71up, turn on the regular Cacti DEBUG logging, and wait for the next
72poller cycle to finish. You should get some useful error message from
73Weathermap in the Cacti logs to help you figure out what went
74wrong.</p>
75 
76<p>Don't forget to turn DEBUG off again, once you are done, as
77it can quickly take a lot of disk space!</p><p>Most serious errors will
78also show up in the log, even with DEBUG turned off.</p>
79 
80<p>If your map was created OK, then welcome to Weathermap!</p>
81<p>The rest of this page is a reference to all the available options in the plugin.</p>
82 
83<h3>Managing Maps - Access Control</h3>
84 
85<p>Access-control with the
86<img src="../images/cacti_user_manage.png" class="figure figright" /> Weathermap plugin is in two layers. First, you can control who will see
87the Weathermap tab (and the 'Weathermaps' management link) in the usual Cacti way:
88in User Management, give your users the 'View Weathermaps' right.
89Second, you can control <i>which</i> weathermaps that they will see,
90from the Manage Maps page. Click on the link for your new map in the
91column marked 'Accessible By', and you will get a page where you can add
92and remove users from the list who can see this particular map. There is
93one extra user 'Anyone', that matches <i>any</i> authenticated user.
94This is to save you adding new users to a list when you want to have a
95'global' map available to all users.</p>
96<p>The final feature of the Management page is that you can change the order in which the maps are shown, by clicking the Sort Order
97arrows to move them up or down.</p>
98 
99<h3>Viewing Maps</h3>
100<p><img src="../images/cacti_mainscreen.png" class="figure figright" />Since this is what it's really all about - presenting your users with
101nice maps!</p>
102<p>Your users can access the maps that they have been allowed access to (see above) by clicking on the Weathermap tab. You will need to give them the right
103to View Weathermaps in the User Management page first. The user can choose to cycle between the maps that they can see (if there is more than one). Also note: if you use OVERLIB popup graphs in your maps, your users must have access to view those graphs in Cacti, or they will see a broken image icon instead!</p>
104 
105<h3 style="clear:both" >Managing Maps - Display Options</h3>
106<p><img src="../images/cacti_wmap_settings.png" class="figure figright" />All of the Weathermap plugin's settings are in the Misc tab of Cacti's Settings page (Console..Settings on the left side menu).</p>
107<p><em>Page style</em> gives you two
108choices of layout - a big stack of fullsize maps on one page, or a grid of thumbnails,
109each of which leads to a full size map view. From either view, you can also choose the
110Cycle mode. Cycle mode gives you an automatically refreshing page cycling through all the
111maps available to you.</p>
112<p>If
113you only have one map (or a user is only allowed to see one), then the user will
114get a full-size map regardless of the setting. Also in the settings
115page, you can choose the maximum size of the thumbnails. The Page style setting
116takes effect immediately, but the thumbnail size is used next time the
117maps are generated by the poller.</p>
118 
119<p>The last display-related Weathermap setting in the Settings page is the Refresh Time for Cycle mode. You can choose
120how long each map stays on-screen for. The default is 'Automatic', which takes the 5 minutes
121that the data is valid for (a poller cycle), and divides it evenly between the available maps
122- if you had 5 maps, they would each get 1 minute onscreen before the page reloaded with new
123 updated maps. <em>This is nothing to do with changing how the Cacti poller works!</em></p>
124 
125<h3>Managing Maps - Other Options</h3>
126 
127<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>
128 
129<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>
130<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:
131<div class="shell"><pre>
132*/5 * * * * cactiuser /usr/bin/php /your/cacti/path/plugins/weathermap/weathermap-cacti-rebuild.php
133</pre></div>
134 
135You 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'.
136</p>
137 
138<h3>Final Notes and Troubleshooting</h3>
139 
140<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
141appear 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>
142 
143<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>
144 
145 </div>
146 </div>
147</body>
148</html>

Powered by WebSVN 2.2.1