Once upon a time, Micah Anderson <[EMAIL PROTECTED]> sagely scribed: > On Mon, 24 Jan 2005, Jimmy Olsen wrote: > > > If you modify your plugin slightly (so it reports the number of > > logins/logouts as a COUNTER or DERIVE), and improve the autoconf > > section to actually check if Courier is in use, I'll make it an auto > > plugin (auto plugins are automatically probed when installing > > munin-node). > > I'd love to modify it so that it can do that, if you can help me > figure out where the version is that you modified.
After things are checked into CVS, there's a time lag before it appears in the WebCVS interface. It's arrived overnight: http://cvs.sourceforge.net/viewcvs.py/munin/munin/node/node.d/courier_.in?rev=1.2 (The @@SOMETHING@@ variables are substitution variables that are replaced at install-time.) > Also -- I don't know the difference between COUNTER and DERIVE, so I > did a little searching, and I believe this is the correct information: > > [...] > > I dont really understand what a GAUGE is, but thats not what you are > asking. A COUNTER seems... counter-intuitive to me, because that means > people logging in and out would be graphed in an ever increasing > number (600 people logged in today, 600 tomorrow, the graph would then > show 1200? this doesn't seem to be appropriate). It seems to me that > the most useful graph would be to see how many > logins/logouts/disconnects and connects happen over time, and that > seems to me to be an Absolute report. A GAUGE is like a speedometer, showing how fast you're driving right now. A COUNTER is like the thing that counts the number of kilometer the car has driven in its lifespan. When rrdtool (which Munin uses as its backend) gets the data, it draws GAUGEs straight out, while it converts COUNTERs to an average of per second (Munin also allows graphing per minute by setting the graph_period option in munin.conf). In other words, you won't get an ever increasing graph because rrdtool treats the data differently. DERIVE is, in effect, a COUNTER which can also go down (we like DERIVE instead of COUNTER for a technical reason which I'll explain further down). GAUGEs are perfect when dealing with plugins like df or load. When we want to measure an ever increasing number, COUNTER/DERIVE is preferable. When we have a choice (like in your case), COUNTER/DERIVE is preferable as it is more accurate. In the case of your plugin, you return the number of logins/logouts since the last time the plugin was run. This breaks if you either run the plugin manually, if you connect the munin-node to several servers, if you force a manual run of munin-cron on the server, etc. If you convert the datatype to COUNTER/DERIVE, Munin stores the _difference_ compared to the last time it ran the plugin. That means that multiple instances, manual runs, ++ are take care of automatically (since the state is in the rrd file, not on the munin-node plugin). COUNTER has one weakness -- the wrap detection. If a counter was, say 54 on the last update, and now it is 12, rrdtool assumes that it must have hit a 32bit wrap barrier and been reset to 0, and you'll get a tall spike in the graph. One way to get around from this is to use DERIVE instead, and set a "field.min 0". That way, any values below 0 (e.g. if you go from 54 to 12) will be dropped. HTH, -jo :-)
signature.asc
Description: Digital signature