NAME

  arlogd - a remote logger


SYNOPSIS

  arlogd-server [-v] [-q] [-d] [-t] [-c config] [stop|start]
  arlogd-client [-v] [-q] [-d] [-t] [-c config] [stop|start]


DESCRIPTION

Arlogd provides remote logging ; A daemon on the client host transfers data to a daemon on the server host (loghost).

Programs on a client host use remote logging by writing data to a named pipe (fifo).

On the loghost :
  arlogd-server start
On the client host :
  arlogd-client start

The exit status is 0 if a daemon is started (or was already running) ; 1 otherwise ; likewise for stop.

Without an argument, arlogd-server and arlogd-client show the daemon's status.

  arlogd-server
  arlogd-client

The exit status is 0 if the daemon is running ; 1 otherwise.

The default config-file is ./arlogd.conf or /etc/arlogd.conf. The launched daemon will use the same config-file as arlogd used.

On a logging client, the daemon periodicly searches directory $fifos (default /var/log/fifos) for readable fifo's.

Anything written into a client fifo is transferred to a corresponding file on the loghost :

  client:  /var/log/fifos/XXX
  loghost: /var/log/arlog/XXX

To use remote logging, it suffices to replace a utility's logfile by a symlink to a fifo :

  # remote logging for /var/log/httpd/vhost/access.log
  % mkdir -p /var/log/fifos/vhost/
  % mkfifo /var/log/fifos/vhost/access.log
  % cd /var/log/apache
  % mv access.log TEMP
  % ln -s /var/log/fifos/vhost/access.log .
  % cat TEMP > access.log
  % rm TEMP
  # reconfig apache ; use /var/log/fifos/vhost/access.log ; restart apache
  # turn off log rotation :-)

If/when $loghost is unavailable, the client will :

On the server, you can send commands to the daemon ; see ARLOGD-SERVER below.

On the client, the daemon periodicly writes a state-file $run_dir/client.state containing a list of watched fifo's ; see ARLOGD-CLIENT below.

example

For example, suppose the daemons are running ; you create a named pipe :

  mkfifo -m 0755 /var/log/fifos/foo/bar.log

... and some utility writes a log-line to /var/log/fifos/foo/bar.log.

On the client, the daemon will :

On the loghost, the daemon will :

The loghost only checks that the prefix doesn't start with / (slash) and doesn't contain .. as a path-component. If necessary, The loghost creates directories.


OPTIONS

-v

Be verbose.

-q

Be quiet.

-d

Show debug info.

-t

Just check and show the config.


CONFIGURATION

A configuration file must be specified with -c config-file or be present as

  ./arlogd.conf
  /etc/arlogd.conf

In the config-file, lines starting with # are skipped ; as are empty lines. Each line contains a name/value pair, separated by white space.

The list below shows the default value for each name. $name indicates the configured value of entry name.

Config entries you should configure

Config entries that are probably sane


arlogd-server

Program arlogd-server opens two service ports (default 2207 and 2208), and forks a splitter, which does the actual work.

On port 2207 the daemon accepts data connections from hosts in $allow_hosts. The daemon expects lines like

  file-path log-line

The log-line is appended to file $log_dir/file-path.

If the log-line starts with / or contains .. as a path-component, the log-line is appended to file $log_dir/BAD.log.

On port 2208 the daemon accepts command connections from localhost.

To issue a command, on $loghost (for now) use netcat :

  echo command | nc -v localhost 2208

arlogd-server command-list


arlogd-client

arlogd-client - client.state

Every $upd_fifos seconds (default 60) the daemon writes file $run_dir/client.state.

It shows where the daemon is writing ($loghost or $save_file) and a list of watched fifo's in directory $fifos (default /var/log/fifos).


AUTHOR

© 2014 Henk P. Penning, Faculty of Science, Utrecht University
arlogd version arlogd-0.1.2 - Fri Sep 5 07:10:28 2014 UTC - dev revision 57


Valid XHTML 1.0 Strict   Valid CSS!