
************
* Overview *
************
This package provides a mechanism for testing xrootd hosts

****************
* Nagios Probe *
****************
The Nagios probe is called "xrdcp_probe.py", and it installs into /usr/bin.

xrdcp_probe.py takes two arguments and several options.  The arguments are:
  - hostname: Xrootd host to test; if on a non-standard port, you can give this
    in the form of "hostname:port"
  - filename: A filename in the cluster to be read out by the probe.

Because the xrootd server may require GSI authentication, you can specify a
host certificate and key using the -u and -k options.

When invoked, xrdcp_probe.py attempts to use the xrootd client to read out
exactly the first 1024 bytes from the file.

If the following occurs, the probe exits with code 2 (CRITICAL):
  - Probe is unable to contact or auth with remote server.
  - Probe is unable to open file.
  - Probe is unable to read out 1024 bytes (NOTE: if test file is less than 1024
    bytes, this probe will always fail).
  - Probe takes more than `timeout` seconds (default=30) to run.

If the probe is killed due to some other signal, it will exit 3 (UNKNOWN).

EXAMPLES:

This example tests the host red-gridftp2.unl.edu using file /store/mc/JobRobot/RelValProdTTbar/GEN-SIM-DIGI-RECO/MC_3XY_V24_JobRobot-v1/0001/D2831219-992C-DF11-9003-000423D9880C.root

xrdcp_probe.py red-gridftp2.unl.edu /store/mc/JobRobot/RelValProdTTbar/GEN-SIM-DIGI-RECO/MC_3XY_V24_JobRobot-v1/0001/D2831219-992C-DF11-9003-000423D9880C.root

Example output (note how the hostcert is specified):
[brian@brian-test xrootd_status_probe]$ xrdcp_probe.py red-gridftp2.unl.edu /store/mc/JobRobot/RelValProdTTbar/GEN-SIM-DIGI-RECO/MC_3XY_V24_JobRobot-v1/0001/D2831219-992C-DF11-9003-000423D9880C.root --timeout 4 -u ~/hostcert.pem -k ~/hostkey.pem 
Xrootd server red-gridftp2.unl.edu appears OK.

Example (failure) output, using non-default timeout:

[brian@brian-test xrootd_status_probe]$ xrdcp_probe.py red-gridftp1.unl.edu /store/mc/JobRobot/RelValProdTTbar/GEN-SIM-DIGI-RECO/MC_3XY_V24_JobRobot-v1/0001/D2831219-992C-DF11-9003-000423D9880C.root --timeout 4
xrdcp_small root://red-gridftp1.unl.edu//store/mc/JobRobot/RelValProdTTbar/GEN-SIM-DIGI-RECO/MC_3XY_V24_JobRobot-v1/0001/D2831219-992C-DF11-9003-000423D9880C.root
100510 13:46:31 001 Xrd: Connect: can't open connection to [red-gridftp1.unl.edu:1094]
100510 13:46:31 001 Xrd: XrdNetFile: Error creating logical connection to red-gridftp1.unl.edu:1094
Failed to read file root://red-gridftp1.unl.edu//store/mc/JobRobot/RelValProdTTbar/GEN-SIM-DIGI-RECO/MC_3XY_V24_JobRobot-v1/0001/D2831219-992C-DF11-9003-000423D9880C.root within timeout 4.


