Building RPM package:

1) Get package configs and scripts from SVN
   svn export http://svnweb.cern.ch/guest/dashboard/trunk/arda.dashboard.xrootd_ucsd/
2) Download latest Gled XrdMon from ftp://ftp.gled.org/xrdmon/ to current directory (take file like gled-xrdmon-YYYYMMDD.tar.gz)
   For example:
   cd arda.dashboard.xrootd_ucsd
   wget ftp://ftp.gled.org/xrdmon/gled-xrdmon-slc5-20130322.tar.gz


3) Run RPM building script
  ./make-rpm.sh


4) Resulting RPM package is in ./build/RPMS/x86_64/


Setup and configuration:

1) Install gled-xrdmon-*.rpm

2) Configuration is in the /etc/gled/configuration.cfg

# Section names (names of collectors) should not contain space characters
# 
# LISTEN_PORT          - local port for collector to listern for xrootd monitoring packets
# MSG_HOST, MSG_PORT   - ActiveMQ message broker's host and port
# MSG_TOPIC            - topic on the message broker to send data to
# MSG_USER, MSG_PASSWD - authorization credentials for the message broker
# LISTENER_LOGFILE     - name and path to log file; if not specified, used the default one: /var/log/gled/${NAME}-listener.log
#

[first]
LISTEN_PORT=9930
MSG_HOST=gridmsg07.cern.ch
MSG_PORT=6193
MSG_TOPIC=xrdpop.gled_xrdmon_test
MSG_USER=xrdpop
MSG_PASSWD=xyzz
#LISTENER_LOGFILE=/var/log/gled/first-listener-custom.log

[second]
LISTEN_PORT=9931
MSG_HOST=gridmsg07.cern.ch
MSG_PORT=6193
MSG_TOPIC=xrdpop.gled_xrdmon_test
MSG_USER=xrdpop
MSG_PASSWD=xyzz


3) When collectors are configured, services could be started

 /sbin/service gled-xrdmon start

If RPM is updated, service will be restarted automatically if it was running.

 
4) Service could be managed in standard way with commands 'start', 'stop', 'status', 'restart', 'condrestart' as other system services in Linux
E.g.:

/sbin/service gled-xrdmon restart


5) Collectors could be managed separately by specifying their name(s) after commands 'start', 'stop', 'status', 'restart', 'condrestart':

 /sbin/service gled-xrdmon start first second
 /sbin/service gled-xrdmon stop second


6) List of collectors described in the configuration files could be displayed using 'list' option:

 /sbin/service gled-xrdmon list


7) By default, there is a periodic checking if collectors were started and are running.
If service is not running but was previously started (pid file still exists), checker will try to restart the service
and send a warning mail to root@localhost; also message will be written to /var/log/gled/xrdmon-checker.log
Checking could be disabled by commenting last non-empty line in /etc/cron.d/gled-xrdmon-check

If some collectors were advisedly stopped with 'stop' command, they will not be restarted by the checker (but on machine's boot all collectors described in the configuration file will be started).


8) gled-xrdmon log files are placed in /var/log/gled/ .

