Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
netflow
>
nnfc
> nnfc-0.8.1-config.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nnfc-0.8.1-config.patch of Package nnfc
diff -Naur nnfc-0.8.1.org1/config/nnfc nnfc-0.8.1/config/nnfc --- nnfc-0.8.1.org1/config/nnfc 1970-01-01 01:00:00.000000000 +0100 +++ nnfc-0.8.1/config/nnfc 2005-07-27 14:00:37.000000000 +0200 @@ -0,0 +1,79 @@ +#! /bin/bash +# +# nnfc Start/Stop the nnfc netflow daemon. +# +# chkconfig: 345 95 05 +# description: This daemon is used to recieve netflow data +# processname: nnfc +# config: /etc/sysconfig/nnfc + +prog=nnfc + +. /etc/init.d/functions + +# pull in sysconfig settings +[ -f /etc/sysconfig/${prog} ] && . /etc/sysconfig/${prog} + + +start() { + echo -n "Starting ${prog}: " + PROCESS=$(fuser /usr/sbin/${prog}) + if [ -z "${PROCESS}" ] + then + daemon /usr/sbin/${prog} -f /etc/nnfc.cfg + RETVAL=$? + [ ${RETVAL} -eq 0 ] && touch /var/lock/subsys/${prog} + echo + else + echo "nnfc is already running" + return 1 + fi + return ${RETVAL} +} + +stop() { + echo -n "Stoping ${prog}: " + killproc ${prog} -TERM + RETVAL=$? + echo +} + +reload() { + echo -n "Reloading ${prog}: " + killproc ${prog} -HUP + RETVAL=$? + echo +} + + +case "$1" in +'start') + start + ;; + +'stop') + stop + ;; +'reload') + reload + ;; +'restart') + stop + i=500 + PID=$(pidof ${prog}) + while [ "${PID}" != "" -a ${i} -gt 0 ] + do + usleep 10 + i=$(($i-1)) + PID=$(pidof ${prog}) + done + start + ;; +'status') + ps -fu ${USER} | grep ${prog} + ;; +*) + echo "Usage: $0 { start | stop | restart | status }" + exit 1 + ;; +esac diff -Naur nnfc-0.8.1.org1/config/nnfc.cfg nnfc-0.8.1/config/nnfc.cfg --- nnfc-0.8.1.org1/config/nnfc.cfg 1970-01-01 01:00:00.000000000 +0100 +++ nnfc-0.8.1/config/nnfc.cfg 2005-07-27 13:54:20.000000000 +0200 @@ -0,0 +1,54 @@ +# configuration file for nnfc + +# daemonize or not? +daemonize = 1 + +# where to store pidfile +pidfile = /var/run/nnfc.pid + +# where to store statistics +statfile = /var/lib/nnfc/nnfc.stat + +# verbosity level +verbose = 0; + +# uid +uid = nnfc + +# gid +gid = nnfc + +# address to bind, 0 - any +host = 0 + +# port to bind, default is 9996 +port = 2055 + +# Active modules +modules = { + "/usr/lib/nnfc/mysql.so" +}; + +# IP addresses to listen +ip = { + "10.108.0.63" +}; + +# Which time to log? 1 = local computer time, 0 = remote router time +# used by most modules +localtime = 0 + +# Filename templates. Used by file module +flowfile = "/var/lib/nnfc/flow-%Y%m%d" +hdrfile = "/var/lib/nnfc/flow-%Y%m%d" +filename = "/var/lib/nnfc/dump-%Y%m%d" + +# The following values are for postgres and mysql modules. +# I think, they are self-explanatory +dbhost = localhost +dbport = 3306 +dbuser = nnfc +dbpass = passwd +dbname = nnfc +dbheader = headers +dbflows = flows