Scroll to navigation

CONDOR_ADSTASH(1) HTCondor Manual CONDOR_ADSTASH(1)

NAME

condor_adstash - HTCondor Manual

Gather schedd and/or startd job history ClassAds and push them via a search engine or file interface.

SYNOPSIS

condor_adstash [--help ]

condor_adstash [--process_name NAME] [--standalone ] [--sample_interval SECONDS] [--checkpoint_file PATH] [--log_file PATH] [--log_level LEVEL] [--quiet ] [--threads THREADS] [--interface {null,elasticsearch,opensearch,jsonfile}] [--collectors COLLECTORS] [--schedds SCHEDDS] [--ignore_schedds SCHEDDS] [--startds STARTDS] [--ignore_startds STARTDS] [--schedd_history ] [--startd_history ] [--schedd_job_epoch_history ] [--schedd_transfer_epoch_history ] [--ad_file PATH] [--ad_file_type {history,job_epoch_history,transfer_epoch_history}] [--schedd_history_max_ads NUM_ADS] [--startd_history_max_ads NUM_ADS] [--schedd_history_timeout SECONDS] [--startd_history_timeout SECONDS] [--schedd_history_projection ATTRIBUTES] [--startd_history_projection ATTRIBUTES] [--se_host HOST[:PORT]] [--se_url_prefix PREFIX] [--se_username USERNAME] [--se_use_https ] [--se_timeout SECONDS] [--se_bunch_size NUM_DOCS] [--se_index_name INDEX_NAME] [--se_no_log_mappings] [--se_ca_certs PATH] [--json_dir PATH] [--custom_field_properties PATH] [--custom_dynamic_templates PATH] [--custom_ignore_attrs ATTRIBUTES] [--custom_index_settings PATH] [--init_index ] [--init_ad_type {history,job_epoch_history,transfer_epoch_history}] [--init_output_directory PATH] [--no_alias ] [--no_ilm ] [--no_template ]

DESCRIPTION

condor_adstash is a tool that assists in monitoring usage by gathering job ClassAds (typically from condor_schedd and/or condor_startd history queries) and pushing the ClassAds as documents to some target (typically a search engine such as Elasticsearch or OpenSearch).

Unless run in --standalone mode, condor_adstash expects to be invoked as a daemon by a condor_master, i.e. condor_adstash should be invoked in standalone mode when run on the command-line. Whether invoked by condor_master or run standalone, condor_adstash gets its configuration, in increasing priority, from the HTCondor configuration macros beginning with ADSTASH_ (when --process_name is not provided), then environment variables, and finally command-line options.

condor_adstash must be able to write its --checkpoint_file to a persistent location so that duplicate job ClassAds are not fetched from the daemons' histories in consecutive polls.

When using a search engine interface, condor_adstash will push index mappings and settings each polling cycle to ensure that well-known ClassAd attributes are mapped to the correct field types. The index must already exist; use --init_index to generate the JSON files and instructions needed to create a new index, index template, and (for Elasticsearch) ILM policy.

OPTIONS

Display the help message and exit.
Give condor_adstash a different name for looking up HTCondor configuration and environment variable values (see examples).
Run condor_adstash in standalone mode (runs once, does not attempt to contact condor_master)
Number of seconds between polling the list(s) of daemons (ignored in standalone mode)
Location of checkpoint file (will be created if missing)
Location of log file
Log level (uses Python logging library levels: CRITICAL/ERROR/WARNING/INFO/DEBUG)
Don't print log messages to stdout
Number of parallel threads to use when polling for job ClassAds and when pushing documents to the search engine
Push ads via the chosen interface



CLASSAD SOURCE OPTIONS

Poll and push condor_schedd job histories
Poll and push condor_startd job histories
Poll and push condor_schedd job epoch histories
Poll and push condor_schedd transfer epoch histories
Load ClassAds from a file instead of querying daemons (ignores --schedd_history, --startd_history, etc.)
Ad type for --ad_file (determines mappings and converter). Default: history



OPTIONS FOR HTCONDOR DAEMON (SCHEDD, STARTD, ETC.) HISTORY SOURCES

Comma-separated list of condor_collector addresses to contact to locate condor_schedd and condor_startd daemons
Comma-separated list of condor_schedd names to poll job histories from
Comma-separated list of condor_schedd names to skip
Comma-separated list of condor_startd machines to poll job histories from
Comma-separated list of condor_startd machines to skip
Abort after reading NUM_ADS from a condor_schedd
Abort after reading NUM_ADS from a condor_startd
Abort if reading from a condor_schedd takes more than this many seconds
Abort if reading from a condor_startd takes more than this many seconds
Fetch only these attributes (comma-separated) from the Schedd history
Fetch only these attributes (comma-separated) from the Startd history



SEARCH ENGINE (ELASTICSEARCH, OPENSEARCH, ETC.) INTERFACE OPTIONS

Search engine host:port
Search engine URL prefix
Search engine username
Use HTTPS when connecting to search engine
Max time to wait for search engine queries
Group ads in bunches of this size to send to search engine
Push ads to this search engine index or alias
Don't write a JSON file with mappings and settings to the log directory
Path to root certificate authority file (will use certifi's CA if not set)



JSON FILE INTERFACE OPTIONS

Directory to store JSON files, which are named by timestamp



FIELD MAPPING AND INDEX SETTING CUSTOMIZATION OPTIONS

Path to a JSON file containing additional field properties to merge into the default mappings
Path to a JSON file containing additional dynamic templates
Comma-separated list of ClassAd attributes to ignore
Path to a JSON file containing additional index settings



INDEX INITIALIZATION OPTIONS

Write out JSON files to set up a new index for the search engine, then exit. The output includes an initial index, an index template, and (for Elasticsearch) an ILM policy, along with a README file with curl commands to push each to the search engine.
Ad type to use for default mappings in --init_index output. Default: history
Directory to write index JSON and README files. Default: current working directory
Do not use index aliases (not recommended)
Do not use an index lifecycle management policy (not recommended)
Do not use an index template (not recommended)



EXAMPLES

Running condor_adstash in standalone mode on the command-line will result in condor_adstash reading its configuration from the current HTCondor configuration:

$ condor_adstash --standalone


By default, condor_adstash looks for HTCondor configuration variables with names are prefixed with ADSTASH_, e.g. ADSTASH_READ_SCHEDDS = *. These values can be overridden on the command-line:

$ condor_adstash --standalone --schedds=myschedd.localdomain


condor_adstash configuration variables can be also be named using custom prefixes, with the prefix passed in using -\-process_name=PREFIX. For example, if the HTCondor configuration contained FOO_SCHEDD_HISTORY = False and FOO_STARTD_HISTORY = True, condor_adstash can be invoked to read these instead of ADSTASH_SCHEDD_HISTORY and ADSTASH_STARTD_HISTORY:

$ condor_adstash --standalone --process_name=FOO


Providing a PREFIX to --process_name that does not match any HTCondor configuration variables will cause condor_adstash to fallback to a default set of configuration values, which may be useful in debugging.

The configuration values that condor_adstash reads from the current HTCondor configuration can be previewed by printing the help message. The values will be listed as the default values for each command-line option:

$ condor_adstash --help
$ condor_adstash --process_name=FOO --help


To generate the JSON files needed to set up a new Elasticsearch or OpenSearch index, use --init_index:

$ condor_adstash --init_index --init_output_directory /tmp/my_index_setup


This will write out an ILM policy, index template, and initial index JSON file, along with a README containing the curl commands to push each to the search engine. Review the generated files, then follow the instructions in the README.

Author

HTCondor Team

Copyright

1990-2026, Center for High Throughput Computing, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI, US. Licensed under the Apache License, Version 2.0.

October 16, 2026