Munin (www.munin-monitoring.org) is a system to request, store, and display statistical data about a running computer system. Tirex comes with several Munin plugins to help you watch what Tirex is doing, resource consumption, etc.
The functionality for the Munin plugins is in the Tirex::Munin Perl libraries. The scripts in the munin directory are only thin wrappers to call the libraries with the right configuration. You might have to change the munin plugins to reflect the map names, zoom levels and buckets in use on your system.
If you use the Debian/Ubuntu packages install the tirex-munin-plugins package. If you install from source you have to call make install-munin.
Create soft links from /etc/munin/plugins to the scripts in /usr/share/munin/plugins/ like this:
ln -s /usr/share/munin/plugins/tirex-status-active-requests /etc/munin/plugins/tirex-status-active-requests ln -s /usr/share/munin/plugins/tirex-status-queued-requests /etc/munin/plugins/tirex-status-queued-requests ln -s /usr/share/munin/plugins/tirex-status-queued-requests-age /etc/munin/plugins/tirex-status-queued-requests-age
And the following for each map that you want statistics for.
ln -s /usr/share/munin/plugins/tirex-status-render-time /etc/munin/plugins/tirex-status-render-time-mapname ln -s /usr/share/munin/plugins/tirex-status-requests-rendered /etc/munin/plugins/tirex-status-requests-rendered-mapname ln -s /usr/share/munin/plugins/tirex-tiledir-diskusage /etc/munin/plugins/tirex-tiledir-diskusage-mapname ln -s /usr/share/munin/plugins/tirex-tiledir-tileage /etc/munin/plugins/tirex-tiledir-tileage-mapname ln -s /usr/share/munin/plugins/tirex-tiledir-tilecount-absolute /etc/munin/plugins/tirex-tiledir-tilecount-absolute-mapname ln -s /usr/share/munin/plugins/tirex-tiledir-tilecount-relative /etc/munin/plugins/tirex-tiledir-tilecount-realtive-mapname
Alternatively you can copy and edit the script, for instance if you want to change the zoom levels for which statistics should be reported. The standard config will create one value for zoom levels 0 to 9 together and one value for each zoom level from 10 to 17. (Except the render-time and requests-rendered scripts which will use zoom level ranges 0-9, 10-12, 13-15, and 16-17.)
After a change to the munin config, you have to restart the munin node, on Debian/Ubuntu this is done by calling /etc/init.d/munin-node restart.
Munin plugins come in two flavours, one checks the status of the currently running tirex-master through shared memory, just as the tirex-status program does. The code for these is in Tirex::Munin::Status and subclasses, the munin plugins themselves are called tirex-status-*. The other flavour check the statistics generated by the tirex-tiledir-check program. The code for these is in Tirex::Munin::Tiledir and subclasses, the munin plugins themselves are called tirex-tiledir-*. These scripts will only work if you run the tirex-tiledir-check program regularly and put the output into /var/lib/tirex/stats/. See utils/tirex-create-stats-and-update-tiles.sh for a way of doing that.
|tirex-status-active-requests||Tirex::Munin::Status::ActiveRequests||Number of metatile requests currently rendering. This is reported per bucket (ie. range of priorities).|
|tirex-status-queued-requests||Tirex::Munin::Status::QueuedRequests||Number of metatile requests queued for rendering. This is reported per bucket (ie. range of priorities).|
|tirex-status-queued-requests-age||Tirex::Munin::Status::QueuedRequestsAge||Age of oldest requests in the queue for each bucket (ie. range of priorities).|
|tirex-status-render-time||Tirex::Munin::Status::RenderTime||Milliseconds each second spend rendering tiles for a map.|
|tirex-status-requests-rendered||Tirex::Munin::Status::RequestsRendered||Number of metatile requests rendered per minute or second for a map.|
|tirex-tiledir-diskusage||Tirex::Munin::Tiledir::Diskusage||Sum of bytes in all metatile files for a map and specified zoom levels or zoom level ranges. Actual disk usage will be a bit higher because of file system blocks.|
|tirex-tiledir-tileage||Tirex::Munin::Tiledir::Tileage||Max age of metatiles on disk for a map and specified zoom levels or zoom level ranges.|
|tirex-tiledir-tilecount-absolute||Tirex::Munin::Tiledir::Tilecount||Number of metatiles on disk for a map and specified zoom levels or zoom level ranges.|
|tirex-tiledir-tilecount-relative||Tirex::Munin::Tiledir::Tilecount||Percent of world covered by the metatiles on disk for a map and specified zoom levels or zoom level ranges.|