====== Statistics ====== {{tools:stats.png|}} NAV maintains traffic statistics for all “intersections” in the network; i.e. all router and switch ports. Octet, packet and error counters are collected, along with CPU and memory statistics (and more). NAV also gathers statistics on servers, i.e. disk usage, memory, load etc. :!: **Please note** that all statistics are stored using [[http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/|RRDTool]] and [[http://cricket.sourceforge.net/|Cricket]] is used as the main statistics collector. RRDTool and Cricket are not a part of NAV, they are third party GPL software. NAV will however auto generate the Cricket configuration tree based on data from the NAV topology database (see [[backendprocesses#makecricketconfig|The Cricket Configuration Builder]]). ===== Local cricket add ons ===== The Cricket collection that NAV does can, with a little knowledge, be extended to cover statistics of your particular interest. \\ See [[howtoconfigurecricket|How To Extend Cricket]] for how to do this. ===== Ranked Statistics ===== The statistics tool from the tool box navigates to a menu where you can move on to the Cricket statistics or you can use the "Ranked statistics tool" explained in the following. Ranked statistics gathers all data for a specific data source, orders it and presents you with the ranked list. ==== The webpage ==== The webpage is your way of getting ranked statistics of the data Cricket gathers. The interface should be easy to understand, but lets do a quick introduction: * Choose view: This is a drop-down menu with all the available views for you. * Timeframe: Choose the timespan we are searching the Cricket-data * Rows: The number of rows to display * Live: Check this button to always fetch live data from the Cricket-files. If this button is unchecked sortedStats will try to fetch cached data if available, unless the timer for the cachetimeout is surpassed. You may add more views if you want to. See "The config file" for more information. ==== The configfile ==== Sortedstats has a configfile called sortedStats.conf. It is located among the other NAV configurastion files. Here you can make your own views if you want to see other statistics. A view is defined by starting and ending []. You can add as many views as you want as long as they are unique. A view needs certain parameters to function properly: name, path and dsdescr. * name: The name shown in the drop-down menu on the page. It needs to be unique. * path: The path of the rrd-files. This may be only a subset of the path. * dsdescr: The description of the datasource in the database. Other parameters: * units: Set the units shown on the webpage. * modifier: A modifier evaled on the data before displaying it on the page. * linkview: If you browse Cricket, you will notice that certain views are available. For routers this may be cpu, memory etc. Add the name of the view you want to link to here. Without this linkview it is impossible to link properly to Cricket. You may also adjust the timeout for the cache here. This is done in the ss_general view. The values are in seconds.