Not in ntop without a source patch.  Of course, Ntop is a daemon, so
facility level of daemon is probably the "right" choice.


The code that generates the message is in util.c (look around 2194).  The
openlog, which sets the facility is ~ 2168:

#ifndef WIN32
      if(myGlobals.useSyslog)
        openlog("ntop", LOG_PID, LOG_DAEMON);
#endif

the man page for openlog(3) has the call syntax and value choices.

To enhance this, you would add a new parameter --syslog-facility, put the
code into myGlobals and follow up in the openlog.  I'll attach my
"no-password-hint" patch as an example.

It's not completely consistent in Ntop.  There is something in
webInterface.c, using a define, vs. the hardcoded value.

     webInterface.c:  1121      openlog(DAEMONNAME,LOG_PID,SYSLOG_FACILITY);
             ntop.h:   400   # ifndef SYSLOG_FACILITY
             ntop.h:   401   #  define SYSLOG_FACILITY LOG_DAEMON   /*
default value, if not specified otherwise */

Best way would be to make the openlog in webInterface also use the new
myGlobals.syslog_facility value, with the defined value as the default.

-----Burton

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
Stevens
Sent: Friday, February 01, 2002 10:59 AM
To: ntop mailing list
Subject: [Ntop] ntop log messages


Greetings,

I am running ntop 2.0 on a Solaris 8 system.  ntop is started with the
following command line:  /usr/local/bin/ntop -u nobody -P /tmp/ntop -E
-dw 3000.  This starts ntop in daemon mode.  ntop seems to log all sorts
of messages about its operation to the daemon.err syslog facility.
Messages such as this, appear in syslog:

Feb  1 08:45:19 bilbo.globes.com ntop[24612]: [ID 792914 daemon.error]
readLsofInfo completed (3 sec).
Feb  1 08:46:22 bilbo.globes.com last message repeated 1 time
Feb  1 08:47:24 bilbo.globes.com ntop[24612]: [ID 792910 daemon.error]
readLsofInfo completed (2 sec).
Feb  1 08:48:27 bilbo.globes.com ntop[24612]: [ID 792914 daemon.error]
readLsofInfo completed (3 sec).

This is made annoying since the daemon.err facility is also sent to also
set to the system console.  I know I can fix syslog.conf to stop that,
but there may be other error messages that should be routed there.

So, is there a way to route the ntop log messages to a local facility,
such as local0.err?  TIA,

--
Mike Stevens

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop

Attachment: no-admin-password-hint.patch
Description: Binary data

Reply via email to