# Grid Proxy Certificate and VOMS Attributes
# ==========================================

[gridproxy]
# The default VOMS to use.  You can override this for specific probes by
# setting "voms" under the corresponding section.
#default_voms = ops

# Alternative 1:  Use an externally generated proxy certificate.  You can either
# export X509_USER_PROXY or point to it with
#user_proxy = /var/cache/nagios/gridproxy.pem

# Alternative 2:  Let the probe generate a proxy certificate on demand from
# a robot certificate.
#user_cert = /etc/grid-security/robotcert.pem
#user_key = /etc/grid-security/robotkey.pem


# Checking Storage Elements
# =========================

[gridstorage]

# Base directory where to store temporary files and runtime state information.
#arcnagios_spooldir = /var/spool/arc/nagios

# The ARC commands will store some files under $HOME/.arc/.  Since the home
# directory may not be set to something usable, set an appropriate value here
# to instruct the Nagios plugins to override $HOME at startup.
#home_dir = /var/spool/arc/nagios

# The log-level to use for this probe.  In valid values in order of
# decreasing verbosity are DEBUG, INFO, WARNING, ERROR, CRITICAL, FATAL.
#loglevel = WARNING


# Checking Compute Elements: Information System
# =============================================

[arcinfosys]
# Same as for [gridstorage].
#arcnagios_spooldir = /var/spool/arc/nagios
#home_dir = /var/spool/arc/nagios

# The log-level for this probe as described under [gridstorage].
# It may be useful to set this to INFO.
#loglevel = WARNING


# The glue2 entry point
# ---------------------
#
# These are also provided as command-line options.

# Use this GLUE2 schema instead of querying the CE.
#glue2_schema =

# Warn if there are no objects of these classes.
#warn_if_missing = GLUE2AdminDomain,GLUE2Service,GLUE2Endpoint

# Report critical status if there are no object of these classes.
#critical_if_missing =

# A comma-separating list of foreign key attribute types which should be
# reflected in the DIT.
#hierarchical_foreign_keys =

# Require that all foreign keys which represent aggregation or composition
# are reflected in the DIT.
#hierarchical_aggregates =


# The aris and egiis entry points
# -------------------------------
#
# Use the command-line options.


# Example tests for the aris entry point
# --------------------------------------

# Usage: --cluster-test=cache_total
[arcinfosys.aris.cache_free]
type = limit
value = float(cache_free)/cache_total
critical.min = 0.01
warning.min = 0.1

# Usage: --cluster-test=topphys
[arcinfosys.aris.topphys]
type = regex
variable = runtimeenvironment
critical.pattern = APPS/HEP/ATLAS-TOPPHYS
critical.message = Missing TOPPHYS.

# Usage: --queue-test=queue-active
[arcinfosys.aris.queue-active]
type = regex
variable = status
critical.pattern = ^active$
critical.message = Inactive queue


# Checking Compute Elements: Job Submission
# =========================================

[arcce]
# Same as for [gridstorage].
#arcnagios_spooldir = /var/spool/arc/nagios
#home_dir = /var/spool/arc/nagios

# The log-level for this probe as described under [gridstorage].
#loglevel = WARNING

[arcce.connection_urls]
# This section can be used to force specific flavours and connection URLs for
# individual CEs.  Each line takes the form
#
#     ce.example.org = FLAVOUR:URL
#
# where the right hand side corresponds to the -c argument of arcsub(1).


# Example Scripted Job Tests
# --------------------------
#
# These checks are enabled by passing "--test NAME" to the submit command,
# where NAME is the section name without the "arcce." prefix.  They injects
# pieces of shell to to the remote script and checks the output using
# regular expression patterns.

[arcce.python]
jobplugin = scripted
required_programs = python
script_line = python -V >python.out 2>&1
output_file = python.out
output_pattern = Python\s+(?P<version>\S+)
status_ok = Found Python version %(version)s.
status_critical = Python version not found in output.
service_description = ARCCE Python version

[arcce.perl]
jobplugin = scripted
required_programs = perl
script_line = perl -v >perl.out 2>&1
output_file = perl.out
output_pattern = This is perl, v(?P<version>\S+)
status_ok = Found Perl version %(version)s.
status_critical = Perl version not found in output.
service_description = ARCCE Perl version

[arcce.gcc]
jobplugin = scripted
required_programs = gcc
script_line = gcc -v >gcc.out 2>&1
output_file = gcc.out
output_pattern = gcc version (?P<version>\S+)
status_ok = Found GCC version %(version)s.
status_critical = GCC version not found in output.
service_description = ARCCE GCC version

[arcce.csh]
jobplugin = scripted
required_programs = csh
script_line = echo >csh-test.csh '#! /bin/csh'; echo >>csh-test.csh 'env >csh.out'; chmod +x csh-test.csh; ./csh-test.csh
output_file = csh.out
output_pattern = ^PATH=
status_ok = Found working csh.
status_critical = Did not find $PATH in csh environment.
service_description = ARCCE csh usability

# Example Storage Job Checks
# --------------------------
#
# These check are also enabled by passing the second componest of the
# section name to the --test option.  This will add the specified staging to
# the job description.  Input files will must exist in advance.  Output
# files will be removed after checking that they exist.

[arcce.stage_srm]
jobplugin = staging
staged_inputs = srm://srm.example.org/somedir/testfile
staged_outputs = srm://srm.example.org/somedir/srm-%(hostname)s-%(epoch_time)s
service_description = ARCCE SRM Result

[arcce.stage_gridftp]
jobplugin = staging
staged_inputs = gsiftp://srm.example.org/somedir/testfile
staged_outputs = gsiftp://srm.example.org/somedir/gsiftp-%(hostname)s-%(epoch_time)s
service_description = ARCCE GridFTP Result

[arcce.stage_lfc]
jobplugin = staging
staged_inputs = lfc://lfc.example.org/lfcdir/testfile-lfc
staged_outputs = lfc://srm://srm.example.org/somedir/lfc-%(hostname)s-%(epoch_time)s@lfc.example.org/lfcdir/lfc-%(hostname)s-%(epoch_time)s
service_description = ARCCE LFC Result
