You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

OpenNSA can send the generated log messages to a remote logging server. Existing log messages will be forwarded without any special preparations. New messages can include extra named parameters which also wil be forwarded. Given the following log statement in the OpenNSA source code:

log.msg('Reserve request from %s' % header.requester_nsa, system=LOG_SYSTEM, cid='DO-1de0e8a897')

All data items in the log message will be send to the remote logging server. As extra information the following will be added:

  • the host that is sending the log message
  • the 'network' name of the host sending the log message
  • all the extra parameters ('cid' in the example) added to the log statement.

The extra parameters provide the option to send machine readable parameters to the remote host that can be manipulated by monitoring scripts.

Remote Logging: Client Side

Remote logging in the client can be configured using three configuration variables:

remlog: boolean (True|False, default False) True when remote logging is enables, False otherwise
remloghost: string (default '') Host where log messages are send to.
remlogport: integer (default: 9090) TCP Port where log messages are send to

And example (partial) configuration file looks like this:

Remote Logging: Server Side

Server side the 'mgmnt' Twisted based Python 3 server application receives log messages and stores them in a database table. 'mgmnt' also provides a simple webserver with some openNSA management/monitoring pages.

The 'mgmnt' Twisted application is part of the onsa-test repository (https://code.geant.net/stash/projects/CCS/repos/onsa-tests) and can be started with the following command:

    twistd -ny bin/go.tac

The 'tac' file looks like this:



And the 'default.conf' configuration file mentioned in the .tac file looks like this:


  • No labels