Advertisement
Guest User

nfsen.conf

a guest
Apr 18th, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 9.76 KB | None | 0 0
  1. ##############################
  2. #
  3. # NfSen master config file
  4. #
  5. # $Id: nfsen-dist.conf 22 2007-11-20 12:27:38Z phaag $
  6. #
  7. # Configuration of NfSen:
  8. # Set all the values to fit your NfSen setup and run the 'install.pl'
  9. # script from the nfsen distribution directory.
  10. #
  11. # The syntax must conform to Perl syntax.
  12. #
  13. ##############################
  14. #
  15. # NfSen default layout:
  16. # Any scripts, modules or profiles are installed by default under $BASEDIR.
  17. # However, you may change any of these settings to fit your requested layout.
  18.  
  19. #
  20. # Required for default layout
  21. $BASEDIR="/usr/share/nfsen";
  22.  
  23. #
  24. # Where to install the NfSen binaries
  25. $BINDIR="${BASEDIR}/bin";
  26.  
  27. #
  28. # Where to install the NfSen Perl modules
  29. $LIBEXECDIR="${BASEDIR}/libexec";
  30.  
  31. #
  32. # Where to install the config files
  33. $CONFDIR="${BASEDIR}/etc";
  34.  
  35. #
  36. # NfSen html pages directory:
  37. # All php scripts will be installed here.
  38. # URL: Entry point for nfsen: http://<webserver>/nfsen/nfsen.php
  39. $HTMLDIR="/var/www/nfsen/";
  40.  
  41. #
  42. # Where to install the docs
  43. $DOCDIR="${HTMLDIR}/doc";
  44.  
  45. #
  46. # Var space for NfSen
  47. $VARDIR="${BASEDIR}/var";
  48.  
  49. # directory for all pid files
  50. $PIDDIR="$VARDIR/run";
  51. #
  52. # Filter directory
  53. $FILTERDIR="${VARDIR}/filters";
  54. #
  55.  
  56. # FORMATDIR for custom printing formats
  57. $FORMATDIR="${VARDIR}/fmt";
  58. #
  59.  
  60. #
  61. # The Profiles stat directory, where all profile information
  62. # RRD DBs and png pictures of the profile are stored
  63. $PROFILESTATDIR="/media/nfsen/profiles-stat";
  64.  
  65. #
  66. # The Profiles directory, where all netflow data is stored
  67. $PROFILEDATADIR="/media/nfsen/profiles-data";
  68.  
  69. #
  70. # Where go all the backend plugins
  71. $BACKEND_PLUGINDIR="${BASEDIR}/plugins";
  72.  
  73. #
  74. # Where go all the frontend plugins
  75. $FRONTEND_PLUGINDIR="${HTMLDIR}/plugins";
  76.  
  77. #
  78. # nfdump tools path
  79. $PREFIX="/usr/bin";
  80.  
  81. #
  82. # nfsend communication socket
  83. $COMMSOCKET = "$PIDDIR/nfsen.comm";
  84.  
  85. # BASEDIR unrelated vars:
  86. #
  87. # Run nfcapd as this user
  88. # This may be a different or the same uid than your web server.
  89. # Note: This user must be in group $WWWGROUP, otherwise nfcapd
  90. #       is not able to write data files!
  91. $USER="www-data";
  92.  
  93. # user and group of the web server process
  94. # All netflow processing will be done with this user
  95. $WWWUSER="www-data";
  96. $WWWGROUP="www-data";
  97.  
  98. # Receive buffer size for nfcapd - see man page nfcapd(1)
  99. $BUFFLEN=200000;
  100.  
  101. # list of extensions for each collector. See argument -T
  102. # for nfcapd(1) for more detailes.
  103. # defaults to empty -> compatible to nfdump-1.5.8
  104. # $EXTENSIONS = '';
  105. # Example:
  106. # $EXTENSIONS = 'all';
  107. # $EXTENSIONS = '+3,+4';
  108. #
  109. # Directory sub hierarchy layout:
  110. # Possible layouts:
  111. #
  112. # 0 default     no hierachy levels - flat layout - compatible with pre NfSen versions
  113. # 1 %Y/%m/%d    year/month/day
  114. # 2 %Y/%m/%d/%H year/month/day/hour
  115. # 3 %Y/%W/%u    year/week_of_year/day_of_week
  116. # 4 %Y/%W/%u/%H year/week_of_year/day_of_week/hour
  117. # 5 %Y/%j       year/day-of-year
  118. # 6 %Y/%j/%H    year/day-of-year/hour
  119. # 7 %Y-%m-%d    year-month-day
  120. # 8 %Y-%m-%d/%H year-month-day/hour
  121. $SUBDIRLAYOUT=1;
  122.  
  123. # Compress flows while collecting 0 or 1
  124. $ZIPcollected=1;
  125.  
  126. # Compress flows in profiles 0 or 1
  127. $ZIPprofiles=1;
  128.  
  129. # Interrupt expire -- not yet enabled as not yet fully tested
  130. #$InterruptExpire = 0;
  131.  
  132. # number of nfprofile processes to spawn during the profiling phase
  133. # depends on how busy your system is and how many CPUs you have
  134. # on very busy systems increase it to a higher value
  135. $PROFILERS=2;
  136.  
  137. # if the PROFILEDATADIR is filled up to this percentage, a warning message will be printed.
  138. # set to 0 to disable the test
  139. $DISKLIMIT=98;
  140.  
  141. # number of nfprofile processes to spawn during the profiling phase
  142. $PROFILERS=6;
  143.  
  144. # Some Perl Versions/Builds have memory leaks for unknown reason.
  145. # Therefore nfsend will increase its memory footprint over time.
  146. # In order to reset nfsend, it automatically reloads after 1 day
  147. # if PERL_HAS_MEMLEAK is set to 1
  148. # $PERL_HAS_MEMLEAK=0;
  149.  
  150. # Netflow sources
  151. # Define an ident string, port and colour per netflow source
  152. #
  153. # Required parameters:
  154. #    ident   identifies this netflow source. e.g. the router name,
  155. #            Upstream provider name etc.
  156. #    port    nfcapd listens on this port for netflow data for this source
  157. #            set port to '0' if you do not want a collector to be started
  158. #    col     colour in nfsen graphs for this source
  159. #
  160. # Optional parameters
  161. #    type    Collector type needed for this source. Can be 'netflow' or 'sflow'. Default is netflow
  162. #    optarg  Optional args to the collector at startup
  163. #
  164. # Syntax:
  165. #         'ident' => { 'port' => '<portnum>', 'col' => '<colour>', 'type' => '<type>' }
  166. # Ident strings must be 1 to 19 characters long only, containing characters [a-zA-Z0-9_].
  167.  
  168. %sources = (
  169.     'ERX'    => { 'port' => '2055', 'col' => '#1e913b', 'type' => 'netflow' },
  170. );
  171. # %sources originally had these two entries, but the 'IP' line isn't documented
  172. #    'peer1'        => { 'port' => '9996', 'IP' => '172.16.17.18' },
  173. #    'peer2'        => { 'port' => '9996', 'IP' => '172.16.17.19' },
  174.  
  175.  
  176. #
  177. # Low water mark: When expiring files, delete files until
  178. # size = $low_water % of max_size
  179. # typically 90
  180. $low_water=90;
  181.  
  182. #
  183. # syslog facility for periodic jobs
  184. # nfsen uses level 'debug', 'info', 'warning' and 'err'
  185. # Note: nfsen is very chatty for level 'debug' and 'info'
  186. # For normal operation, you may set the logging level in syslog.conf
  187. # to warning or error unless you want to debug NfSen
  188. $syslog_facility='local3';
  189.  
  190. #
  191. # SYSLOG mess
  192. # Log socket type: Most *NIX such as LINUX and *BSD are fine with 'unix'
  193. # which is the default. You need to change that to 'stream' or 'inet' for
  194. # some Solaris version 8/9, AIX and others ..
  195. # You may set it to undef to prevent calling Sys::Syslog::setlogsock at all
  196. # ( works for Solaris 10 and newer Sys::Syslog module
  197. #
  198. # If not defined at all, 'unix' is assumed unless for Solaris, which defaults to 'stream'
  199. $LogSocket = 'unix';
  200.  
  201. #
  202. # Plugins
  203. # Plugins extend NfSen for the purpose of:
  204. # Periodic data processing, alerting-condition and alerting-action
  205. # For data processing a plugin may run for any profile or for a specific profile only.
  206. #     Syntax: [ 'profile list', 'module' ]
  207. #            profile list:  ',' separated list of profiles ( 'profilegroup/profilename' ),
  208. #                           or '*' for any profile, '!' for no profile
  209. #            module:        Perl Module name, equal to plugin name
  210. # The profile list '!' make sense for plugins, which only provide alerting functions
  211. #
  212. # The module follows the standard Perl module conventions, with at least one
  213. # function: Init(). See demoplugin.pm for a simple template.
  214. #
  215. # A file with the same name in the FRONTEND_PLUGINDIR and .php extension is automatically
  216. # recongized as frontend plugin.
  217. #
  218. # Plugins are installed under
  219. # $BACKEND_PLUGINDIR and $FRONTEND_PLUGINDIR
  220.  
  221. @plugins = (
  222.     # profile    # module
  223.     # [ '*',     'demoplugin' ],
  224. );
  225.  
  226. %PluginConf = (
  227.     # For plugin demoplugin
  228. #   demoplugin => {
  229.         # scalar
  230. #       param2 => 42,
  231.         # hash
  232. #       param1 => { 'key' => 'value' },
  233. #   },
  234.     # for plugin otherplugin
  235. #   otherplugin => [
  236.         # array
  237. #       'mary had a little lamb'
  238. #   ],
  239. );
  240.  
  241. #
  242. # Alert module: email alerting:
  243. # Use this from address
  244. $MAIL_FROM   = '[email protected]';
  245.  
  246. # Use this SMTP server
  247. $SMTP_SERVER = 'localhost';
  248.  
  249. # Use this email body:
  250. # You may have multiple lines of text.
  251. # Var substitution:
  252. # @alert@       replaced by alert name
  253. # @timeslot@    replaced by timeslot alert triggered
  254. $MAIL_BODY   = q{Alert '@alert@' triggered at timeslot @timeslot@};
  255.  
  256. ######################################################
  257. #
  258. # For the NfSen simulator include the section below.
  259. #
  260. ######################################################
  261. #
  262. # Nfsen Simulator
  263. # The simulator requires, that you have already installed
  264. # and configured NfSen. The simulation is based on already
  265. # pre-colleted data, which you may get from another live
  266. # NfSen system.
  267. #
  268. # Steps to setup the NfSen simulator:
  269. # 1. Configure the sources of the live profile with the
  270. #    same names of the NfSen system, you take netflow data
  271. #    for the simulation. Set the port for each netflow source
  272. #    to 0 to prevent a collector to be started.
  273. #    Install NfSen with this config in a seperate directory
  274. # 2. Copy the pre-collected data into the appropriate
  275. #    netflow directory of the live profile.
  276. # 3. Configure the simulator using the parameters below
  277. #    Enable Simulation mode => $SIMmode = 1
  278. #    Configure the time window of the pre-collected data.
  279. #      tstart    => Start of time window. yyyymmddhhmm
  280. #      tbegin    => Optional parameter. Start of simulation
  281. #                   profile exists already between tstart - tbegin
  282. #      tend      => End of time window. yyyymmddhhmm
  283. #      cycletime => simulation time in seconds of a 5min slot
  284. #    Setting cycletime = 0 processes the cycles as fast as
  285. #    possible. Please note, if you test plugings, your
  286. #    cycletime needs to be at least the time required to
  287. #    process all plugins.
  288. # 4. Start nfsen: ../nfsen start
  289. #    Simulation starts
  290. #
  291. # The simulator runs from tstart to tend and stops when tend
  292. # is reached. You may stop the simulation at any given time
  293. # using ./nfsen stop. To continue the simulation start NfSen
  294. # again: ./nfsen start. You may reset the simulator at any
  295. # given time using ./nfsen abort-reset. This stops the sumulation
  296. # and rolls back to tstart. All profiles/alerts are deleted,
  297. # so you may start from scratch again.
  298. #
  299. # Configure simulator parameters
  300. #
  301. # $SIMmode = 1;
  302. # %sim = (
  303. #    'tstart'     => '200707100000',    # Simulation data available from July 10th 2007 00:00
  304. #    'tbegin'     => '200707110000',    # Simulation begins at July 11th 2007 00:00
  305. #    'tend'       => '200707112355',    # Simulation ends at July 11th 2007 23:55
  306. #    'cycletime'  => '30',              # 30s per 5min slot
  307. # );
  308.  
  309. 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement