User Tools

Site Tools


howtoconfigurecricket

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
howtoconfigurecricket [2015/10/14 13:42]
morten remove obsolete page
— (current)
Line 1: Line 1:
  
- 
- 
-====== How to configure local Cricket-additions in NAV-v3 ====== 
- 
- 
-===== Introduction ===== 
- 
- 
-The information assume that you have installed nav in /​usr/​local/​nav. 
- 
-The information here is under construction. It is possibly erroneous 
-and for a fact incomplete. 
- 
-The default installation of Cricket in NAV-v3 gives you statistics for 
-your routers and switches and their interfaces. However, it may be 
-desirable to add local statistics to the installation of Cricket. This 
-document will lead you through a detailed way to do this without 
-installing a new instance of Cricket. This document will **not** help 
-you if you do not know anything about Cricket. For information about 
-how to configure Cricket, see the documentation at [[http://​cricket.sourceforge.net/​support/​doc/​|SourceForge]] 
- 
- 
- 
-===== The three steps ===== 
- 
-Adding your local statistics to Cricket may be done in three (or four) 
-steps: 
- 
-  * Create a directory to store the configuration. 
-  * Create the configuration you wish in the newly created directory. 
-  * Edit the subtree-sets so that Cricket knows that this directory is active. 
-  * Alternatively:​ Add a new cron-job to collect data in another interval than 5 minutes. 
- 
- 
- 
-===== Creating a directory ===== 
- 
- 
-The Cricket config-tree is located at 
-/​usr/​local/​nav/​cricket/​cricket-config. 
- 
-The basic structure of a NAV-v3 install is the following directories:​ 
- 
-  * giga-router-interfaces 
-  * giga-switch-ports 
-  * router-interfaces 
-  * routers 
-  * servers 
-  * switch-ports 
-  * switches 
- 
-These directories are configured automatically,​ and the files here 
-should not be altered. 
- 
-However, any other directories you create will not be affected by the 
-automatic processes in NAV-v3. This is thus where you start when 
-making your local additions. 
- 
-Create the directory you want to store your configuration in here. 
- 
- 
-<​code>​ 
- > cd /​usr/​local/​nav/​cricket/​cricket-config 
- > mkdir localadditions 
-</​code>​ 
- 
-Make sure that directory has correct permissions. At least it should 
-be a member of the nav-group and that group should have read and 
-execute-permissions. 
- 
- 
-===== Creating the configuration ===== 
- 
-This document does not cover how to configure Cricket. The 
-Cricket-documentation is located at  
-[[http://​cricket.sourceforge.net/​support/​doc/​|SourceForge]] 
-and should give you 
-all the information you need. Remember to compile the new config-tree 
-when you are done making the configuration. 
- 
- 
-<​code>​ 
- > /​usr/​local/​nav/​cricket/​cricket/​compile 
-</​code>​ 
- 
- 
-===== Edit subtree-sets ===== 
- 
- 
-Cricket gathers data using cron. The cron-daemon executes the 
-collector-script located in /​usr/​local/​nav/​cricket/​cricket. To ease 
-the configuration of the cron-daemon,​ the file "​subtree-sets"​ is used 
-to group directories into specific "​sets"​. To collect data from a 
-"​set"​ the collect-subtree script is called with the name of the set as 
-argument. 
- 
-NAV-v3 uses two different sets when gathering data - "​normal"​ and 
-"​giga"​. The "​normal"​ set runs every five minute (which is default in 
-Cricket) and the "​giga"​ set runs every minute (see also "​Coming 
-updates in NAV" below). The reason giga runs every minute is to reduce the 
-chance that the 32-bits counters wrap on giga-interfaces. This method 
-is not perfect, but mitigates the threat of a wrap. 
- 
-To collect data from your local configuration you only need to edit 
-the subtree-sets file and add your directory in the "​normal"​ set. This 
-will ensure that data is gathered every five minute. ​ 
- 
- 
-<​code>​ 
- set normal: 
-            /routers 
-            /switches 
-            /​switch-ports 
-            /​router-interfaces 
-            /servers 
-            /​localadditions 
-</​code>​ 
- 
-If you want to collect data in another interval you will have to make 
-another set. In addition you will need to make a new cron-job so that 
-Cricket gathers data (covered in the next section). 
- 
- 
-===== Adding a new cron-job to collect data ===== 
- 
-Adding a new cron-job may be done in several ways: 
- 
-1. Adding a cron-job to an existing user. If the user is a member of the nav-group, this user can run the collect-subtrees script with the intended interval. Remember to use the set you made as argument to collect-subtrees. The cron-job should look something like this (assuming 10 minute intervals): 
- 
-<​code>​ 
- CRICKETDIR=/​usr/​local/​nav/​cricket 
- */10 * * * * $CRICKETDIR/​cricket/​collect-subtrees local 
-</​code>​ 
- 
-2. Adding a new cron-job in /​usr/​local/​nav/​etc/​cron.d/​cricket and restart cricket using /​usr/​local/​nav/​bin/​nav. **This is not recommended** because this file may be either overwritten or not changed when upgrading to a new version of NAV. 
- 
-3. Make a new cron-fragment in /​usr/​local/​nav/​etc/​cron.d. This will ensure that you can start/stop collecting using the nav-script. Make sure that you create a fragment that is not likely to be overwritten,​ i.e. the name should reflect that this is a local addition. This because if a future release of NAV has a fragment with the same name, complications may occur. 
- 
- 
- 
-===== Coming updates in NAV ===== 
- 
-makecricketconfig.pl is planned for a rewrite. It will be rewritten in python. A list with planned changes will come during the year. 
howtoconfigurecricket.1444830127.txt.gz ยท Last modified: 2015/10/14 13:42 by morten