airflow_supervisor.SupervisorAirflowConfiguration¶
- pydantic model airflow_supervisor.SupervisorAirflowConfiguration[source]¶
Bases:
SupervisorConvenienceConfiguration
Show JSON schema
{ "title": "SupervisorAirflowConfiguration", "type": "object", "properties": { "unix_http_server": { "anyOf": [ { "$ref": "#/$defs/UnixHttpServerConfiguration" }, { "type": "null" } ], "default": null }, "inet_http_server": { "anyOf": [ { "$ref": "#/$defs/InetHttpServerConfiguration" }, { "type": "null" } ], "default": null }, "supervisord": { "$ref": "#/$defs/SupervisordConfiguration", "default": { "logfile": null, "logfile_maxbytes": null, "logfile_backups": null, "loglevel": null, "pidfile": null, "umask": null, "nodaemon": null, "silent": null, "minfds": null, "minprocs": null, "nocleanup": null, "childlogdir": null, "user": null, "directory": null, "strip_ansi": null, "environment": null, "identifier": null } }, "supervisorctl": { "$ref": "#/$defs/SupervisorctlConfiguration", "default": { "serverurl": null, "username": null, "password": null, "prompt": null, "history_file": null } }, "include": { "anyOf": [ { "$ref": "#/$defs/IncludeConfiguration" }, { "type": "null" } ], "default": null }, "program": { "additionalProperties": { "$ref": "#/$defs/ProgramConfiguration" }, "title": "Program", "type": "object" }, "group": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/GroupConfiguration" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Group" }, "fcgiprogram": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/FcgiProgramConfiguration" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Fcgiprogram" }, "eventlistener": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/EventListenerConfiguration" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Eventlistener" }, "rpcinterface": { "anyOf": [ { "additionalProperties": { "$ref": "#/$defs/RpcInterfaceConfiguration" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Rpcinterface" }, "config_path": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": "supervisor.cfg", "description": "Path to supervisor configuration file, relative to `working_dir`", "title": "Config Path" }, "working_dir": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": "", "description": "Path to supervisor working directory", "title": "Working Dir" }, "convenience": { "$ref": "#/$defs/ConvenienceConfiguration", "description": "Required configurations for convenience integration" }, "airflow": { "$ref": "#/$defs/AirflowConfiguration", "description": "Required options for airflow integration" }, "stop_on_exit": { "default": true, "description": "Stop supervisor on dag completion", "title": "Stop On Exit", "type": "boolean" }, "cleanup": { "default": true, "description": "Cleanup supervisor folder on dag completion. Note: stop_on_exit must be True", "title": "Cleanup", "type": "boolean" } }, "$defs": { "AirflowConfiguration": { "description": "Settings that MUST be set when running in airflow", "properties": { "check_interval": { "default": "PT5S", "description": "Interval between supervisor program status checks", "format": "duration", "title": "Check Interval", "type": "string" }, "check_timeout": { "default": "PT8H", "description": "Timeout to wait for supervisor program status checks", "format": "duration", "title": "Check Timeout", "type": "string" }, "runtime": { "anyOf": [ { "format": "duration", "type": "string" }, { "type": "null" } ], "default": null, "description": "Max runtime of Supervisor job", "title": "Runtime" }, "endtime": { "anyOf": [ { "format": "time", "type": "string" }, { "type": "null" } ], "default": null, "description": "End time of Supervisor job", "title": "Endtime" }, "maxretrigger": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of retriggers of Supervisor job (e.g. max number of checks separated by `check_interval`)", "title": "Maxretrigger" }, "reference_date": { "default": "data_interval_end", "description": "Reference date for the job. NOTE: Airflow schedules after end of date interval, so `data_interval_end` is the default", "enum": [ "start_date", "logical_date", "data_interval_end" ], "title": "Reference Date", "type": "string" } }, "title": "AirflowConfiguration", "type": "object" }, "ConvenienceConfiguration": { "description": "Convenience layer, settings that MUST be set when running via convenience API", "properties": { "startsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1, "description": "The total number of seconds which the program needs to stay running after a startup to consider the start successful (moving the process from the STARTING state to the RUNNING state). Set to 0 to indicate that the program needn\u2019t stay running for any particular amount of time. Even if a process exits with an \u201cexpected\u201d exit code (see exitcodes), the start will still be considered a failure if the process exits quicker than startsecs.", "title": "Startsecs" }, "startretries": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of serial failure attempts that supervisord will allow when attempting to start the program before giving up and putting the process into an FATAL state. After each failed restart, process will be put in BACKOFF state and each retry attempt will take increasingly more time.", "title": "Startretries" }, "exitcodes": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": [ 0 ], "description": "The list of \u201cexpected\u201d exit codes for this program used with autorestart. If the autorestart parameter is set to unexpected, and the process exits in any other way than as a result of a supervisor stop request, supervisord will restart the process if it exits with an exit code that is not defined in this list.", "title": "Exitcodes" }, "stopsignal": { "anyOf": [ { "enum": [ "TERM", "HUP", "INT", "QUIT", "KILL", "USR1", "USR2" ], "type": "string" }, { "type": "null" } ], "default": "TERM", "description": "The signal used to kill the program when a stop is requested. This can be specified using the signal\u2019s name or its number. It is normally one of: TERM, HUP, INT, QUIT, KILL, USR1, or USR2.", "title": "Stopsignal" }, "stopwaitsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 30, "description": "The number of seconds to wait for the OS to return a SIGCHLD to supervisord after the program has been sent a stopsignal. If this number of seconds elapses before supervisord receives a SIGCHLD from the process, supervisord will attempt to kill it with a final SIGKILL.", "title": "Stopwaitsecs" }, "port": { "default": "*:9001", "description": "A TCP host:port value or (e.g. 127.0.0.1:9001) on which supervisor will listen for HTTP/XML-RPC requests. supervisorctl will use XML-RPC to communicate with supervisord over this port. To listen on all interfaces in the machine, use :9001 or *:9001. Please read the security warning above.", "title": "Port", "type": "string" }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The username required for authentication to the HTTP/Unix Server.", "title": "Username" }, "password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password required for authentication to the HTTP/Unix server. This can be a cleartext password, or can be specified as a SHA-1 hash if prefixed by the string {SHA}. For example, {SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d is the SHA-stored version of the password \u201cthepassword\u201d. Note that hashed password must be in hex format.", "title": "Password" }, "rpcinterface_factory": { "default": "supervisor.rpcinterface:make_main_rpcinterface", "description": "pkg_resources \u201centry point\u201d dotted name to your RPC interface\u2019s factory function.", "title": "Rpcinterface Factory", "type": "string" }, "local_or_remote": { "anyOf": [ { "enum": [ "local", "remote" ], "type": "string" }, { "type": "null" } ], "default": "local", "description": "Location of supervisor, either local for same-machine or remote. If same-machine, communicates via Unix sockets by default, if remote, communicates via inet http server", "title": "Local Or Remote" }, "host": { "default": "localhost", "description": "Hostname of the supervisor host. Used by the XMLRPC client", "title": "Host", "type": "string" }, "protocol": { "default": "http", "description": "Protocol of the supervisor XMLRPC HTTP API. Used by the XMLRPC client", "title": "Protocol", "type": "string" }, "rpcpath": { "default": "/RPC2", "description": "Path for supervisor XMLRPC HTTP API. Used by the XMLRPC client", "title": "Rpcpath", "type": "string" }, "command_timeout": { "default": 30, "description": "Timeout for convenience commands sent to the supervisor, in seconds", "title": "Command Timeout", "type": "integer" } }, "title": "ConvenienceConfiguration", "type": "object" }, "EventListenerConfiguration": { "properties": { "command": { "description": "The command that will be run when this program is started. The command can be either absolute (e.g. /path/to/programname) or relative (e.g. programname). If it is relative, the supervisord\u2019s environment $PATH will be searched for the executable. Programs can accept arguments, e.g. /path/to/program foo bar. The command line can use double quotes to group arguments with spaces in them to pass to the program, e.g. /path/to/program/name -p 'foo bar'. Note that the value of command may include Python string expressions, e.g. /path/to/programname --port=80%(process_num)02d might expand to /path/to/programname --port=8000 at runtime. String expressions are evaluated against a dictionary containing the keys group_name, host_node_name, program_name, process_num, numprocs, here (the directory of the supervisord config file), and all supervisord\u2019s environment variables prefixed with ENV_. Controlled programs should themselves not be daemons, as supervisord assumes it is responsible for daemonizing its subprocesses (see Nondaemonizing of Subprocesses). The command will be truncated if it looks like a config file comment, e.g. command=bash -c 'foo ; bar' will be truncated to command=bash -c 'foo. Quoting will not prevent this behavior, since the configuration file reader does not parse the command like a shell would.", "title": "Command", "type": "string" }, "process_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A Python string expression that is used to compose the supervisor process name for this process. You usually don\u2019t need to worry about setting this unless you change numprocs. The string expression is evaluated against a dictionary that includes group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file).", "title": "Process Name" }, "numprocs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Supervisor will start as many instances of this program as named by numprocs. Note that if numprocs > 1, the process_name expression must include %(process_num)s (or any other valid Python string expression that includes process_num) within it.", "title": "Numprocs" }, "numprocs_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer offset that is used to compute the number at which process_num starts.", "title": "Numprocs Start" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The relative priority of the program in the start and shutdown ordering. Lower priorities indicate programs that start first and shut down last at startup and when aggregate commands are used in various clients (e.g. \u201cstart all\u201d/\u201dstop all\u201d). Higher priorities indicate programs that start last and shut down first.", "title": "Priority" }, "autostart": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, this program will start automatically when supervisord is started.", "title": "Autostart" }, "startsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The total number of seconds which the program needs to stay running after a startup to consider the start successful (moving the process from the STARTING state to the RUNNING state). Set to 0 to indicate that the program needn\u2019t stay running for any particular amount of time. Even if a process exits with an \u201cexpected\u201d exit code (see exitcodes), the start will still be considered a failure if the process exits quicker than startsecs.", "title": "Startsecs" }, "startretries": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of serial failure attempts that supervisord will allow when attempting to start the program before giving up and putting the process into an FATAL state. After each failed restart, process will be put in BACKOFF state and each retry attempt will take increasingly more time.", "title": "Startretries" }, "autorestart": { "anyOf": [ { "type": "boolean" }, { "const": "unexpected", "type": "string" }, { "type": "null" } ], "default": null, "description": "Specifies if supervisord should automatically restart a process if it exits when it is in the RUNNING state. May be one of false, unexpected, or true. If false, the process will not be autorestarted. If unexpected, the process will be restarted when the program exits with an exit code that is not one of the exit codes associated with this process\u2019 configuration (see exitcodes). If true, the process will be unconditionally restarted when it exits, without regard to its exit code. autorestart controls whether supervisord will autorestart a program if it exits after it has successfully started up (the process is in the RUNNING state). supervisord has a different restart mechanism for when the process is starting up (the process is in the STARTING state). Retries during process startup are controlled by startsecs and startretries.", "title": "Autorestart" }, "exitcodes": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The list of \u201cexpected\u201d exit codes for this program used with autorestart. If the autorestart parameter is set to unexpected, and the process exits in any other way than as a result of a supervisor stop request, supervisord will restart the process if it exits with an exit code that is not defined in this list.", "title": "Exitcodes" }, "stopsignal": { "anyOf": [ { "enum": [ "TERM", "HUP", "INT", "QUIT", "KILL", "USR1", "USR2" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "The signal used to kill the program when a stop is requested. This can be specified using the signal\u2019s name or its number. It is normally one of: TERM, HUP, INT, QUIT, KILL, USR1, or USR2.", "title": "Stopsignal" }, "stopwaitsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of seconds to wait for the OS to return a SIGCHLD to supervisord after the program has been sent a stopsignal. If this number of seconds elapses before supervisord receives a SIGCHLD from the process, supervisord will attempt to kill it with a final SIGKILL.", "title": "Stopwaitsecs" }, "stopasgroup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, the flag causes supervisor to send the stop signal to the whole process group and implies killasgroup is true. This is useful for programs, such as Flask in debug mode, that do not propagate stop signals to their children, leaving them orphaned.", "title": "Stopasgroup" }, "killasgroup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, when resorting to send SIGKILL to the program to terminate it send it to its whole process group instead, taking care of its children as well, useful e.g with Python programs using multiprocessing.", "title": "Killasgroup" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Instruct supervisord to use this UNIX user account as the account which runs the program. The user can only be switched if supervisord is run as the root user. If supervisord can\u2019t switch to the specified user, the program will not be started. The user will be changed using setuid only. This does not start a login shell and does not change environment variables like USER or HOME. See Subprocess Environment for details.", "title": "User" }, "redirect_stderr": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, cause the process\u2019 stderr output to be sent back to supervisord on its stdout file descriptor (in UNIX shell terms, this is the equivalent of executing /the/program 2>&1). Do not set redirect_stderr=true in an [eventlistener:x] section. Eventlisteners use stdout and stdin to communicate with supervisord. If stderr is redirected, output from stderr will interfere with the eventlistener protocol.", "title": "Redirect Stderr" }, "stdout_logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Put process stdout output in this file (and if redirect_stderr is true, also place stderr output in this file). If stdout_logfile is unset or set to AUTO, supervisor will automatically choose a file location. If this is set to NONE, supervisord will create no log file. AUTO log files and their backups will be deleted when supervisord restarts. The stdout_logfile value can contain Python string expressions that will evaluated against a dictionary that contains the keys group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file). It is not possible for two processes to share a single log file (stdout_logfile) when rotation (stdout_logfile_maxbytes) is enabled. This will result in the file being corrupted. If stdout_logfile is set to a special file like /dev/stdout that is not seekable, log rotation must be disabled by setting stdout_logfile_maxbytes = 0.", "title": "Stdout Logfile" }, "stdout_logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes that may be consumed by stdout_logfile before it is rotated (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d, and \u201cGB\u201d can be used in the value). Set this value to 0 to indicate an unlimited log size.", "title": "Stdout Logfile Maxbytes" }, "stdout_logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of stdout_logfile backups to keep around resulting from process stdout log file rotation. If set to 0, no backups will be kept.", "title": "Stdout Logfile Backups" }, "stdout_capture_maxbytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of bytes written to capture FIFO when process is in \u201cstdout capture mode\u201d (see Capture Mode). Should be an integer (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d and \u201cGB\u201d can used in the value). If this value is 0, process capture mode will be off.", "title": "Stdout Capture Maxbytes" }, "stdout_events_enabled": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If true, PROCESS_LOG_STDOUT events will be emitted when the process writes to its stdout file descriptor. The events will only be emitted if the file descriptor is not in capture mode at the time the data is received (see Capture Mode).", "title": "Stdout Events Enabled" }, "stdout_syslog": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, stdout will be directed to syslog along with the process name.", "title": "Stdout Syslog" }, "stderr_logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Put process stderr output in this file unless redirect_stderr is true. Accepts the same value types as stdout_logfile and may contain the same Python string expressions. It is not possible for two processes to share a single log file (stderr_logfile) when rotation (stderr_logfile_maxbytes) is enabled. This will result in the file being corrupted. If stderr_logfile is set to a special file like /dev/stderr that is not seekable, log rotation must be disabled by setting stderr_logfile_maxbytes = 0.", "title": "Stderr Logfile" }, "stderr_logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes before logfile rotation for stderr_logfile. Accepts the same value types as stdout_logfile_maxbytes.", "title": "Stderr Logfile Maxbytes" }, "stderr_logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of backups to keep around resulting from process stderr log file rotation. If set to 0, no backups will be kept.", "title": "Stderr Logfile Backups" }, "stderr_capture_maxbytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of bytes written to capture FIFO when process is in \u201cstderr capture mode\u201d (see Capture Mode). Should be an integer (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d and \u201cGB\u201d can used in the value). If this value is 0, process capture mode will be off.", "title": "Stderr Capture Maxbytes" }, "stderr_events_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, PROCESS_LOG_STDERR events will be emitted when the process writes to its stderr file descriptor. The events will only be emitted if the file descriptor is not in capture mode at the time the data is received (see Capture Mode).", "title": "Stderr Events Enabled" }, "stderr_syslog": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, stderr will be directed to syslog along with the process name.", "title": "Stderr Syslog" }, "environment": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "description": "A list of key/value pairs in the form KEY=\"val\",KEY2=\"val2\" that will be placed in the child process\u2019 environment. The environment string may contain Python string expressions that will be evaluated against a dictionary containing group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file). Values containing non-alphanumeric characters should be quoted (e.g. KEY=\"val:123\",KEY2=\"val,456\"). Otherwise, quoting the values is optional but recommended. Note that the subprocess will inherit the environment variables of the shell used to start \u201csupervisord\u201d except for the ones overridden here. See Subprocess Environment.", "title": "Environment" }, "directory": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "A file path representing a directory to which supervisord should temporarily chdir before exec\u2019ing the child.", "title": "Directory" }, "umask": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An octal number (e.g. 002, 022) representing the umask of the process.", "title": "Umask" }, "serverurl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL passed in the environment to the subprocess process as SUPERVISOR_SERVER_URL (see supervisor.childutils) to allow the subprocess to easily communicate with the internal HTTP server. If provided, it should have the same syntax and structure as the [supervisorctl] section option of the same name. If this is set to AUTO, or is unset, supervisor will automatically construct a server URL, giving preference to a server that listens on UNIX domain sockets over one that listens on an internet socket.", "title": "Serverurl" }, "buffer_size": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The event listener pool\u2019s event queue buffer size. When a listener pool\u2019s event buffer is overflowed (as can happen when an event listener pool cannot keep up with all of the events sent to it), the oldest event in the buffer is discarded.", "title": "Buffer Size" }, "events": { "anyOf": [ { "items": { "enum": [ "PROCESS_STATE", "PROCESS_STATE_STARTING", "PROCESS_STATE_RUNNING", "PROCESS_STATE_BACKOFF", "PROCESS_STATE_STOPPING", "PROCESS_STATE_EXITED", "PROCESS_STATE_STOPPED", "PROCESS_STATE_FATAL", "PROCESS_STATE_UNKNOWN", "REMOTE_COMMUNICATION", "PROCESS_LOG", "PROCESS_LOG_STDOUT", "PROCESS_LOG_STDERR", "PROCESS_COMMUNICATION", "PROCESS_COMMUNICATION_STDOUT", "PROCESS_COMMUNICATION_STDERR", "SUPERVISOR_STATE_CHANGE", "SUPERVISOR_STATE_CHANGE_RUNNING", "SUPERVISOR_STATE_CHANGE_STOPPING", "TICK", "TICK_5", "TICK_60", "TICK_3600", "PROCESS_GROUP", "PROCESS_GROUP_ADDED", "PROCESS_GROUP_REMOVED" ], "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A comma-separated list of event type names that this listener is \u201cinterested\u201d in receiving notifications for (see Event Types for a list of valid event type names).", "title": "Events" }, "result_handler": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A pkg_resources entry point string that resolves to a Python callable. The default value is supervisor.dispatchers:default_handler. Specifying an alternate result handler is a very uncommon thing to need to do, and as a result, how to create one is not documented.", "title": "Result Handler" } }, "required": [ "command" ], "title": "EventListenerConfiguration", "type": "object" }, "FcgiProgramConfiguration": { "properties": { "command": { "description": "The command that will be run when this program is started. The command can be either absolute (e.g. /path/to/programname) or relative (e.g. programname). If it is relative, the supervisord\u2019s environment $PATH will be searched for the executable. Programs can accept arguments, e.g. /path/to/program foo bar. The command line can use double quotes to group arguments with spaces in them to pass to the program, e.g. /path/to/program/name -p 'foo bar'. Note that the value of command may include Python string expressions, e.g. /path/to/programname --port=80%(process_num)02d might expand to /path/to/programname --port=8000 at runtime. String expressions are evaluated against a dictionary containing the keys group_name, host_node_name, program_name, process_num, numprocs, here (the directory of the supervisord config file), and all supervisord\u2019s environment variables prefixed with ENV_. Controlled programs should themselves not be daemons, as supervisord assumes it is responsible for daemonizing its subprocesses (see Nondaemonizing of Subprocesses). The command will be truncated if it looks like a config file comment, e.g. command=bash -c 'foo ; bar' will be truncated to command=bash -c 'foo. Quoting will not prevent this behavior, since the configuration file reader does not parse the command like a shell would.", "title": "Command", "type": "string" }, "process_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A Python string expression that is used to compose the supervisor process name for this process. You usually don\u2019t need to worry about setting this unless you change numprocs. The string expression is evaluated against a dictionary that includes group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file).", "title": "Process Name" }, "numprocs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Supervisor will start as many instances of this program as named by numprocs. Note that if numprocs > 1, the process_name expression must include %(process_num)s (or any other valid Python string expression that includes process_num) within it.", "title": "Numprocs" }, "numprocs_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer offset that is used to compute the number at which process_num starts.", "title": "Numprocs Start" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The relative priority of the program in the start and shutdown ordering. Lower priorities indicate programs that start first and shut down last at startup and when aggregate commands are used in various clients (e.g. \u201cstart all\u201d/\u201dstop all\u201d). Higher priorities indicate programs that start last and shut down first.", "title": "Priority" }, "autostart": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, this program will start automatically when supervisord is started.", "title": "Autostart" }, "startsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The total number of seconds which the program needs to stay running after a startup to consider the start successful (moving the process from the STARTING state to the RUNNING state). Set to 0 to indicate that the program needn\u2019t stay running for any particular amount of time. Even if a process exits with an \u201cexpected\u201d exit code (see exitcodes), the start will still be considered a failure if the process exits quicker than startsecs.", "title": "Startsecs" }, "startretries": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of serial failure attempts that supervisord will allow when attempting to start the program before giving up and putting the process into an FATAL state. After each failed restart, process will be put in BACKOFF state and each retry attempt will take increasingly more time.", "title": "Startretries" }, "autorestart": { "anyOf": [ { "type": "boolean" }, { "const": "unexpected", "type": "string" }, { "type": "null" } ], "default": null, "description": "Specifies if supervisord should automatically restart a process if it exits when it is in the RUNNING state. May be one of false, unexpected, or true. If false, the process will not be autorestarted. If unexpected, the process will be restarted when the program exits with an exit code that is not one of the exit codes associated with this process\u2019 configuration (see exitcodes). If true, the process will be unconditionally restarted when it exits, without regard to its exit code. autorestart controls whether supervisord will autorestart a program if it exits after it has successfully started up (the process is in the RUNNING state). supervisord has a different restart mechanism for when the process is starting up (the process is in the STARTING state). Retries during process startup are controlled by startsecs and startretries.", "title": "Autorestart" }, "exitcodes": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The list of \u201cexpected\u201d exit codes for this program used with autorestart. If the autorestart parameter is set to unexpected, and the process exits in any other way than as a result of a supervisor stop request, supervisord will restart the process if it exits with an exit code that is not defined in this list.", "title": "Exitcodes" }, "stopsignal": { "anyOf": [ { "enum": [ "TERM", "HUP", "INT", "QUIT", "KILL", "USR1", "USR2" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "The signal used to kill the program when a stop is requested. This can be specified using the signal\u2019s name or its number. It is normally one of: TERM, HUP, INT, QUIT, KILL, USR1, or USR2.", "title": "Stopsignal" }, "stopwaitsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of seconds to wait for the OS to return a SIGCHLD to supervisord after the program has been sent a stopsignal. If this number of seconds elapses before supervisord receives a SIGCHLD from the process, supervisord will attempt to kill it with a final SIGKILL.", "title": "Stopwaitsecs" }, "stopasgroup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, the flag causes supervisor to send the stop signal to the whole process group and implies killasgroup is true. This is useful for programs, such as Flask in debug mode, that do not propagate stop signals to their children, leaving them orphaned.", "title": "Stopasgroup" }, "killasgroup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, when resorting to send SIGKILL to the program to terminate it send it to its whole process group instead, taking care of its children as well, useful e.g with Python programs using multiprocessing.", "title": "Killasgroup" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Instruct supervisord to use this UNIX user account as the account which runs the program. The user can only be switched if supervisord is run as the root user. If supervisord can\u2019t switch to the specified user, the program will not be started. The user will be changed using setuid only. This does not start a login shell and does not change environment variables like USER or HOME. See Subprocess Environment for details.", "title": "User" }, "redirect_stderr": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, cause the process\u2019 stderr output to be sent back to supervisord on its stdout file descriptor (in UNIX shell terms, this is the equivalent of executing /the/program 2>&1). Do not set redirect_stderr=true in an [eventlistener:x] section. Eventlisteners use stdout and stdin to communicate with supervisord. If stderr is redirected, output from stderr will interfere with the eventlistener protocol.", "title": "Redirect Stderr" }, "stdout_logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Put process stdout output in this file (and if redirect_stderr is true, also place stderr output in this file). If stdout_logfile is unset or set to AUTO, supervisor will automatically choose a file location. If this is set to NONE, supervisord will create no log file. AUTO log files and their backups will be deleted when supervisord restarts. The stdout_logfile value can contain Python string expressions that will evaluated against a dictionary that contains the keys group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file). It is not possible for two processes to share a single log file (stdout_logfile) when rotation (stdout_logfile_maxbytes) is enabled. This will result in the file being corrupted. If stdout_logfile is set to a special file like /dev/stdout that is not seekable, log rotation must be disabled by setting stdout_logfile_maxbytes = 0.", "title": "Stdout Logfile" }, "stdout_logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes that may be consumed by stdout_logfile before it is rotated (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d, and \u201cGB\u201d can be used in the value). Set this value to 0 to indicate an unlimited log size.", "title": "Stdout Logfile Maxbytes" }, "stdout_logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of stdout_logfile backups to keep around resulting from process stdout log file rotation. If set to 0, no backups will be kept.", "title": "Stdout Logfile Backups" }, "stdout_capture_maxbytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of bytes written to capture FIFO when process is in \u201cstdout capture mode\u201d (see Capture Mode). Should be an integer (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d and \u201cGB\u201d can used in the value). If this value is 0, process capture mode will be off.", "title": "Stdout Capture Maxbytes" }, "stdout_events_enabled": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If true, PROCESS_LOG_STDOUT events will be emitted when the process writes to its stdout file descriptor. The events will only be emitted if the file descriptor is not in capture mode at the time the data is received (see Capture Mode).", "title": "Stdout Events Enabled" }, "stdout_syslog": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, stdout will be directed to syslog along with the process name.", "title": "Stdout Syslog" }, "stderr_logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Put process stderr output in this file unless redirect_stderr is true. Accepts the same value types as stdout_logfile and may contain the same Python string expressions. It is not possible for two processes to share a single log file (stderr_logfile) when rotation (stderr_logfile_maxbytes) is enabled. This will result in the file being corrupted. If stderr_logfile is set to a special file like /dev/stderr that is not seekable, log rotation must be disabled by setting stderr_logfile_maxbytes = 0.", "title": "Stderr Logfile" }, "stderr_logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes before logfile rotation for stderr_logfile. Accepts the same value types as stdout_logfile_maxbytes.", "title": "Stderr Logfile Maxbytes" }, "stderr_logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of backups to keep around resulting from process stderr log file rotation. If set to 0, no backups will be kept.", "title": "Stderr Logfile Backups" }, "stderr_capture_maxbytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of bytes written to capture FIFO when process is in \u201cstderr capture mode\u201d (see Capture Mode). Should be an integer (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d and \u201cGB\u201d can used in the value). If this value is 0, process capture mode will be off.", "title": "Stderr Capture Maxbytes" }, "stderr_events_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, PROCESS_LOG_STDERR events will be emitted when the process writes to its stderr file descriptor. The events will only be emitted if the file descriptor is not in capture mode at the time the data is received (see Capture Mode).", "title": "Stderr Events Enabled" }, "stderr_syslog": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, stderr will be directed to syslog along with the process name.", "title": "Stderr Syslog" }, "environment": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "description": "A list of key/value pairs in the form KEY=\"val\",KEY2=\"val2\" that will be placed in the child process\u2019 environment. The environment string may contain Python string expressions that will be evaluated against a dictionary containing group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file). Values containing non-alphanumeric characters should be quoted (e.g. KEY=\"val:123\",KEY2=\"val,456\"). Otherwise, quoting the values is optional but recommended. Note that the subprocess will inherit the environment variables of the shell used to start \u201csupervisord\u201d except for the ones overridden here. See Subprocess Environment.", "title": "Environment" }, "directory": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "A file path representing a directory to which supervisord should temporarily chdir before exec\u2019ing the child.", "title": "Directory" }, "umask": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An octal number (e.g. 002, 022) representing the umask of the process.", "title": "Umask" }, "serverurl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL passed in the environment to the subprocess process as SUPERVISOR_SERVER_URL (see supervisor.childutils) to allow the subprocess to easily communicate with the internal HTTP server. If provided, it should have the same syntax and structure as the [supervisorctl] section option of the same name. If this is set to AUTO, or is unset, supervisor will automatically construct a server URL, giving preference to a server that listens on UNIX domain sockets over one that listens on an internet socket.", "title": "Serverurl" }, "socket": { "description": "The FastCGI socket for this program, either TCP or UNIX domain socket. For TCP sockets, use this format: tcp://localhost:9002. For UNIX domain sockets, use unix:///absolute/path/to/file.sock. String expressions are evaluated against a dictionary containing the keys \u201cprogram_name\u201d and \u201chere\u201d (the directory of the supervisord config file).", "title": "Socket", "type": "string" }, "socket_backlog": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Sets socket listen(2) backlog.", "title": "Socket Backlog" }, "socket_owner": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "For UNIX domain sockets, this parameter can be used to specify the user and group for the FastCGI socket. May be a UNIX username (e.g. chrism) or a UNIX username and group separated by a colon (e.g. chrism:wheel).", "title": "Socket Owner" }, "socket_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "For UNIX domain sockets, this parameter can be used to specify the permission mode.", "title": "Socket Mode" } }, "required": [ "command", "socket" ], "title": "FcgiProgramConfiguration", "type": "object" }, "GroupConfiguration": { "properties": { "programs": { "description": "A comma-separated list of program names. The programs which are listed become members of the group.", "items": { "type": "string" }, "title": "Programs", "type": "array" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "A priority number analogous to a [program:x] priority value assigned to the group.", "title": "Priority" } }, "required": [ "programs" ], "title": "GroupConfiguration", "type": "object" }, "IncludeConfiguration": { "properties": { "files": { "description": "A space-separated sequence of file globs. Each file glob may be absolute or relative. If the file glob is relative, it is considered relative to the location of the configuration file which includes it. A \u201cglob\u201d is a file pattern which matches a specified pattern according to the rules used by the Unix shell. No tilde expansion is done, but *, ?, and character ranges expressed with [] will be correctly matched. The string expression is evaluated against a dictionary that includes host_node_name and here (the directory of the supervisord config file). Recursive includes from included files are not supported.", "items": { "type": "string" }, "title": "Files", "type": "array" } }, "required": [ "files" ], "title": "IncludeConfiguration", "type": "object" }, "InetHttpServerConfiguration": { "properties": { "port": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A TCP host:port value or (e.g. 127.0.0.1:9001) on which supervisor will listen for HTTP/XML-RPC requests. supervisorctl will use XML-RPC to communicate with supervisord over this port. To listen on all interfaces in the machine, use :9001 or *:9001. Please read the security warning above.", "title": "Port" }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The username required for authentication to this HTTP server.", "title": "Username" }, "password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "he password required for authentication to this HTTP server. This can be a cleartext password, or can be specified as a SHA-1 hash if prefixed by the string {SHA}. For example, {SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d is the SHA-stored version of the password \u201cthepassword\u201d. Note that hashed password must be in hex format.", "title": "Password" } }, "title": "InetHttpServerConfiguration", "type": "object" }, "ProgramConfiguration": { "properties": { "command": { "description": "The command that will be run when this program is started. The command can be either absolute (e.g. /path/to/programname) or relative (e.g. programname). If it is relative, the supervisord\u2019s environment $PATH will be searched for the executable. Programs can accept arguments, e.g. /path/to/program foo bar. The command line can use double quotes to group arguments with spaces in them to pass to the program, e.g. /path/to/program/name -p 'foo bar'. Note that the value of command may include Python string expressions, e.g. /path/to/programname --port=80%(process_num)02d might expand to /path/to/programname --port=8000 at runtime. String expressions are evaluated against a dictionary containing the keys group_name, host_node_name, program_name, process_num, numprocs, here (the directory of the supervisord config file), and all supervisord\u2019s environment variables prefixed with ENV_. Controlled programs should themselves not be daemons, as supervisord assumes it is responsible for daemonizing its subprocesses (see Nondaemonizing of Subprocesses). The command will be truncated if it looks like a config file comment, e.g. command=bash -c 'foo ; bar' will be truncated to command=bash -c 'foo. Quoting will not prevent this behavior, since the configuration file reader does not parse the command like a shell would.", "title": "Command", "type": "string" }, "process_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A Python string expression that is used to compose the supervisor process name for this process. You usually don\u2019t need to worry about setting this unless you change numprocs. The string expression is evaluated against a dictionary that includes group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file).", "title": "Process Name" }, "numprocs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Supervisor will start as many instances of this program as named by numprocs. Note that if numprocs > 1, the process_name expression must include %(process_num)s (or any other valid Python string expression that includes process_num) within it.", "title": "Numprocs" }, "numprocs_start": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "An integer offset that is used to compute the number at which process_num starts.", "title": "Numprocs Start" }, "priority": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The relative priority of the program in the start and shutdown ordering. Lower priorities indicate programs that start first and shut down last at startup and when aggregate commands are used in various clients (e.g. \u201cstart all\u201d/\u201dstop all\u201d). Higher priorities indicate programs that start last and shut down first.", "title": "Priority" }, "autostart": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, this program will start automatically when supervisord is started.", "title": "Autostart" }, "startsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The total number of seconds which the program needs to stay running after a startup to consider the start successful (moving the process from the STARTING state to the RUNNING state). Set to 0 to indicate that the program needn\u2019t stay running for any particular amount of time. Even if a process exits with an \u201cexpected\u201d exit code (see exitcodes), the start will still be considered a failure if the process exits quicker than startsecs.", "title": "Startsecs" }, "startretries": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of serial failure attempts that supervisord will allow when attempting to start the program before giving up and putting the process into an FATAL state. After each failed restart, process will be put in BACKOFF state and each retry attempt will take increasingly more time.", "title": "Startretries" }, "autorestart": { "anyOf": [ { "type": "boolean" }, { "const": "unexpected", "type": "string" }, { "type": "null" } ], "default": null, "description": "Specifies if supervisord should automatically restart a process if it exits when it is in the RUNNING state. May be one of false, unexpected, or true. If false, the process will not be autorestarted. If unexpected, the process will be restarted when the program exits with an exit code that is not one of the exit codes associated with this process\u2019 configuration (see exitcodes). If true, the process will be unconditionally restarted when it exits, without regard to its exit code. autorestart controls whether supervisord will autorestart a program if it exits after it has successfully started up (the process is in the RUNNING state). supervisord has a different restart mechanism for when the process is starting up (the process is in the STARTING state). Retries during process startup are controlled by startsecs and startretries.", "title": "Autorestart" }, "exitcodes": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The list of \u201cexpected\u201d exit codes for this program used with autorestart. If the autorestart parameter is set to unexpected, and the process exits in any other way than as a result of a supervisor stop request, supervisord will restart the process if it exits with an exit code that is not defined in this list.", "title": "Exitcodes" }, "stopsignal": { "anyOf": [ { "enum": [ "TERM", "HUP", "INT", "QUIT", "KILL", "USR1", "USR2" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "The signal used to kill the program when a stop is requested. This can be specified using the signal\u2019s name or its number. It is normally one of: TERM, HUP, INT, QUIT, KILL, USR1, or USR2.", "title": "Stopsignal" }, "stopwaitsecs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of seconds to wait for the OS to return a SIGCHLD to supervisord after the program has been sent a stopsignal. If this number of seconds elapses before supervisord receives a SIGCHLD from the process, supervisord will attempt to kill it with a final SIGKILL.", "title": "Stopwaitsecs" }, "stopasgroup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, the flag causes supervisor to send the stop signal to the whole process group and implies killasgroup is true. This is useful for programs, such as Flask in debug mode, that do not propagate stop signals to their children, leaving them orphaned.", "title": "Stopasgroup" }, "killasgroup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, when resorting to send SIGKILL to the program to terminate it send it to its whole process group instead, taking care of its children as well, useful e.g with Python programs using multiprocessing.", "title": "Killasgroup" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Instruct supervisord to use this UNIX user account as the account which runs the program. The user can only be switched if supervisord is run as the root user. If supervisord can\u2019t switch to the specified user, the program will not be started. The user will be changed using setuid only. This does not start a login shell and does not change environment variables like USER or HOME. See Subprocess Environment for details.", "title": "User" }, "redirect_stderr": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, cause the process\u2019 stderr output to be sent back to supervisord on its stdout file descriptor (in UNIX shell terms, this is the equivalent of executing /the/program 2>&1). Do not set redirect_stderr=true in an [eventlistener:x] section. Eventlisteners use stdout and stdin to communicate with supervisord. If stderr is redirected, output from stderr will interfere with the eventlistener protocol.", "title": "Redirect Stderr" }, "stdout_logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Put process stdout output in this file (and if redirect_stderr is true, also place stderr output in this file). If stdout_logfile is unset or set to AUTO, supervisor will automatically choose a file location. If this is set to NONE, supervisord will create no log file. AUTO log files and their backups will be deleted when supervisord restarts. The stdout_logfile value can contain Python string expressions that will evaluated against a dictionary that contains the keys group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file). It is not possible for two processes to share a single log file (stdout_logfile) when rotation (stdout_logfile_maxbytes) is enabled. This will result in the file being corrupted. If stdout_logfile is set to a special file like /dev/stdout that is not seekable, log rotation must be disabled by setting stdout_logfile_maxbytes = 0.", "title": "Stdout Logfile" }, "stdout_logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes that may be consumed by stdout_logfile before it is rotated (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d, and \u201cGB\u201d can be used in the value). Set this value to 0 to indicate an unlimited log size.", "title": "Stdout Logfile Maxbytes" }, "stdout_logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of stdout_logfile backups to keep around resulting from process stdout log file rotation. If set to 0, no backups will be kept.", "title": "Stdout Logfile Backups" }, "stdout_capture_maxbytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of bytes written to capture FIFO when process is in \u201cstdout capture mode\u201d (see Capture Mode). Should be an integer (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d and \u201cGB\u201d can used in the value). If this value is 0, process capture mode will be off.", "title": "Stdout Capture Maxbytes" }, "stdout_events_enabled": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "If true, PROCESS_LOG_STDOUT events will be emitted when the process writes to its stdout file descriptor. The events will only be emitted if the file descriptor is not in capture mode at the time the data is received (see Capture Mode).", "title": "Stdout Events Enabled" }, "stdout_syslog": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, stdout will be directed to syslog along with the process name.", "title": "Stdout Syslog" }, "stderr_logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Put process stderr output in this file unless redirect_stderr is true. Accepts the same value types as stdout_logfile and may contain the same Python string expressions. It is not possible for two processes to share a single log file (stderr_logfile) when rotation (stderr_logfile_maxbytes) is enabled. This will result in the file being corrupted. If stderr_logfile is set to a special file like /dev/stderr that is not seekable, log rotation must be disabled by setting stderr_logfile_maxbytes = 0.", "title": "Stderr Logfile" }, "stderr_logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes before logfile rotation for stderr_logfile. Accepts the same value types as stdout_logfile_maxbytes.", "title": "Stderr Logfile Maxbytes" }, "stderr_logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of backups to keep around resulting from process stderr log file rotation. If set to 0, no backups will be kept.", "title": "Stderr Logfile Backups" }, "stderr_capture_maxbytes": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Max number of bytes written to capture FIFO when process is in \u201cstderr capture mode\u201d (see Capture Mode). Should be an integer (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d and \u201cGB\u201d can used in the value). If this value is 0, process capture mode will be off.", "title": "Stderr Capture Maxbytes" }, "stderr_events_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, PROCESS_LOG_STDERR events will be emitted when the process writes to its stderr file descriptor. The events will only be emitted if the file descriptor is not in capture mode at the time the data is received (see Capture Mode).", "title": "Stderr Events Enabled" }, "stderr_syslog": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, stderr will be directed to syslog along with the process name.", "title": "Stderr Syslog" }, "environment": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "description": "A list of key/value pairs in the form KEY=\"val\",KEY2=\"val2\" that will be placed in the child process\u2019 environment. The environment string may contain Python string expressions that will be evaluated against a dictionary containing group_name, host_node_name, process_num, program_name, and here (the directory of the supervisord config file). Values containing non-alphanumeric characters should be quoted (e.g. KEY=\"val:123\",KEY2=\"val,456\"). Otherwise, quoting the values is optional but recommended. Note that the subprocess will inherit the environment variables of the shell used to start \u201csupervisord\u201d except for the ones overridden here. See Subprocess Environment.", "title": "Environment" }, "directory": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "A file path representing a directory to which supervisord should temporarily chdir before exec\u2019ing the child.", "title": "Directory" }, "umask": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An octal number (e.g. 002, 022) representing the umask of the process.", "title": "Umask" }, "serverurl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL passed in the environment to the subprocess process as SUPERVISOR_SERVER_URL (see supervisor.childutils) to allow the subprocess to easily communicate with the internal HTTP server. If provided, it should have the same syntax and structure as the [supervisorctl] section option of the same name. If this is set to AUTO, or is unset, supervisor will automatically construct a server URL, giving preference to a server that listens on UNIX domain sockets over one that listens on an internet socket.", "title": "Serverurl" } }, "required": [ "command" ], "title": "ProgramConfiguration", "type": "object" }, "RpcInterfaceConfiguration": { "properties": { "rpcinterface_factory": { "default": "supervisor.rpcinterface:make_main_rpcinterface", "description": "pkg_resources \u201centry point\u201d dotted name to your RPC interface\u2019s factory function.", "title": "Rpcinterface Factory", "type": "string" }, "kwargs": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Kwargs" } }, "title": "RpcInterfaceConfiguration", "type": "object" }, "SupervisorctlConfiguration": { "properties": { "serverurl": { "anyOf": [ { "format": "uri", "minLength": 1, "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL that should be used to access the supervisord server, e.g. http://localhost:9001. For UNIX domain sockets, use unix:///absolute/path/to/file.sock.", "title": "Serverurl" }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The username to pass to the supervisord server for use in authentication. This should be same as username from the supervisord server configuration for the port or UNIX domain socket you\u2019re attempting to access.", "title": "Username" }, "password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password to pass to the supervisord server for use in authentication. This should be the cleartext version of password from the supervisord server configuration for the port or UNIX domain socket you\u2019re attempting to access. This value cannot be passed as a SHA hash. Unlike other passwords specified in this file, it must be provided in cleartext.", "title": "Password" }, "prompt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "String used as supervisorctl prompt.", "title": "Prompt" }, "history_file": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "A path to use as the readline persistent history file. If you enable this feature by choosing a path, your supervisorctl commands will be kept in the file, and you can use readline (e.g. arrow-up) to invoke commands you performed in your last supervisorctl session.", "title": "History File" } }, "title": "SupervisorctlConfiguration", "type": "object" }, "SupervisordConfiguration": { "properties": { "logfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The path to the activity log of the supervisord process. This option can include the value %(here)s, which expands to the directory in which the supervisord configuration file was found.", "title": "Logfile" }, "logfile_maxbytes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The maximum number of bytes that may be consumed by the activity log file before it is rotated (suffix multipliers like \u201cKB\u201d, \u201cMB\u201d, and \u201cGB\u201d can be used in the value). Set this value to 0 to indicate an unlimited log size.", "title": "Logfile Maxbytes" }, "logfile_backups": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The number of backups to keep around resulting from activity log file rotation. If set to 0, no backups will be kept.", "title": "Logfile Backups" }, "loglevel": { "anyOf": [ { "enum": [ "critical", "error", "warn", "info", "debug", "trace", "blather" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "The logging level, dictating what is written to the supervisord activity log. One of critical, error, warn, info, debug, trace, or blather. Note that at log level debug, the supervisord log file will record the stderr/stdout output of its child processes and extended info about process state changes, which is useful for debugging a process which isn\u2019t starting properly. See also: Activity Log Levels.", "title": "Loglevel" }, "pidfile": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The location in which supervisord keeps its pid file. This option can include the value %(here)s, which expands to the directory in which the supervisord configuration file was found.", "title": "Pidfile" }, "umask": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The umask of the supervisord process.", "title": "Umask" }, "nodaemon": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true, supervisord will start in the foreground instead of daemonizing.", "title": "Nodaemon" }, "silent": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If true and not daemonized, logs will not be directed to stdout.", "title": "Silent" }, "minfds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The minimum number of file descriptors that must be available before supervisord will start successfully. A call to setrlimit will be made to attempt to raise the soft and hard limits of the supervisord process to satisfy minfds. The hard limit may only be raised if supervisord is run as root. supervisord uses file descriptors liberally, and will enter a failure mode when one cannot be obtained from the OS, so it\u2019s useful to be able to specify a minimum value to ensure it doesn\u2019t run out of them during execution. These limits will be inherited by the managed subprocesses. This option is particularly useful on Solaris, which has a low per-process fd limit by default.", "title": "Minfds" }, "minprocs": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The minimum number of process descriptors that must be available before supervisord will start successfully. A call to setrlimit will be made to attempt to raise the soft and hard limits of the supervisord process to satisfy minprocs. The hard limit may only be raised if supervisord is run as root. supervisord will enter a failure mode when the OS runs out of process descriptors, so it\u2019s useful to ensure that enough process descriptors are available upon supervisord startup.", "title": "Minprocs" }, "nocleanup": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Prevent supervisord from clearing any existing AUTO child log files at startup time. Useful for debugging.", "title": "Nocleanup" }, "childlogdir": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The directory used for AUTO child log files. This option can include the value %(here)s, which expands to the directory in which the supervisord configuration file was found.", "title": "Childlogdir" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Instruct supervisord to switch users to this UNIX user account before doing any meaningful processing. The user can only be switched if supervisord is started as the root user.", "title": "User" }, "directory": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "When supervisord daemonizes, switch to this directory. This option can include the value %(here)s, which expands to the directory in which the supervisord configuration file was found.", "title": "Directory" }, "strip_ansi": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Strip all ANSI escape sequences from child log files.", "title": "Strip Ansi" }, "environment": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "A list of key/value pairs in the form KEY=\"val\",KEY2=\"val2\" that will be placed in the environment of all child processes. This does not change the environment of supervisord itself. This option can include the value %(here)s, which expands to the directory in which the supervisord configuration file was found. Values containing non-alphanumeric characters should be quoted (e.g. KEY=\"val:123\",KEY2=\"val,456\"). Otherwise, quoting the values is optional but recommended. To escape percent characters, simply use two. (e.g. URI=\"/first%%20name\") Note that subprocesses will inherit the environment variables of the shell used to start supervisord except for the ones overridden here and within the program\u2019s environment option. See Subprocess Environment.", "title": "Environment" }, "identifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The identifier string for this supervisor process, used by the RPC interface.", "title": "Identifier" } }, "title": "SupervisordConfiguration", "type": "object" }, "UnixHttpServerConfiguration": { "properties": { "file": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "A path to a UNIX domain socket on which supervisor will listen for HTTP/XML-RPC requests. supervisorctl uses XML-RPC to communicate with supervisord over this port. This option can include the value %(here)s, which expands to the directory in which the supervisord configuration file was found.", "title": "File" }, "chmod": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Change the UNIX permission mode bits of the UNIX domain socket to this value at startup.", "title": "Chmod" }, "chown": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Change the user and group of the socket file to this value. May be a UNIX username (e.g. chrism) or a UNIX username and group separated by a colon (e.g. chrism:wheel).", "title": "Chown" }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The username required for authentication to this HTTP server.", "title": "Username" }, "password": { "anyOf": [ { "format": "password", "type": "string", "writeOnly": true }, { "type": "null" } ], "default": null, "description": "The password required for authentication to this HTTP server. This can be a cleartext password, or can be specified as a SHA-1 hash if prefixed by the string {SHA}. For example, {SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d is the SHA-stored version of the password \u201cthepassword\u201d. Note that hashed password must be in hex format.", "title": "Password" } }, "title": "UnixHttpServerConfiguration", "type": "object" } }, "required": [ "program" ] }
- Fields:
airflow (airflow_supervisor.config.airflow.AirflowConfiguration)
cleanup (bool)
stop_on_exit (bool)
- field airflow: AirflowConfiguration [Optional]¶
Required options for airflow integration
- field stop_on_exit: bool = True¶
Stop supervisor on dag completion
- field cleanup: bool = True¶
Cleanup supervisor folder on dag completion. Note: stop_on_exit must be True
- model_post_init(context: Any, /) None ¶
We need to both initialize private attributes and call the user-defined model_post_init method.