Agent Configuration Settings

Slurm-web agent can be configured in INI file /etc/slurm-web/agent.ini.

This page contains the reference documentation of all configuration parameters that can be defined in this file, grouped by sections, and a full example to illustrate its syntax and possible values.

Sections

service

Parameter Type Description Required
cluster

str

Name of cluster served by agent

Example: atlas

No default value

interface

str

Interface address to bind for incoming connections

Default: localhost

-

port

int

TCP port to listen for incoming connections

Default: 5012

-

cors

bool

When true, Cross-Origin Resource Sharing (CORS) headers are enabled.

Default: False

-

debug

bool

Enable debug mode

Default: False

-

log_flags

list[str]

List of log flags to enable. Special value ALL enables all log flags.

Choices:

  • slurmweb

  • rfl

  • werkzeug

  • urllib3

  • racksdb

  • ALL

Default:

  • ALL

-

debug_flags

list[str]

List of debug flags to enable. Special value ALL enables all debug flags.

Choices:

  • slurmweb

  • rfl

  • werkzeug

  • urllib3

  • racksdb

  • ALL

Default:

  • slurmweb

-

slurmrestd

Parameter Type Description Required
uri

uri

URI to slurmrestd HTTP server. It can either be in the form http://host:port for TCP/IP server or unix:///path/to/slurmrestd.socket for Unix socket.

Default: unix:/run/slurmrestd/slurmrestd.socket

-

socket

path

Path to slurmrestd Unix socket.

This parameter is deprecated in favor of [slurmrestd] > uri.

No default value

-

auth

str

Authentication method with slurmrestd.

Note that local authentication method is only supported with Unix socket URI. With this method, Slurm-web agent must run with the same UID as slurmrestd service (eg. slurm system user).

The jwt authentication method is supported by both TCP/IP and Unix sockets URIs.

Choices:

  • local

  • jwt

Default: local

-

jwt_mode

str

Slurmrestd JWT authentication mode, either auto or static.

In auto mode, Slurm-web agent generates tokens with the signature key specified in jwt_key. The tokens have a limited lifespan as defined with jwt_lifespan. Tokens are automatically renewed upon expiration. This is the recommended mode.

In static mode, Slurm-web simply use the token provided with jwt_token.

This parameter is used only when auth is jwt.

Choices:

  • auto

  • static

Default: auto

-

jwt_user

str

The user name used in HTTP headers with JWT authentication.

This parameter is used only when auth is jwt.

Default: slurm

-

jwt_lifespan

int

Lifespan of JWT tokens generated by Slurm-web in seconds. The default value is 1 hour.

This parameter is used only when auth is jwt and jwt_mode is auto.

Default: 3600

-

jwt_key

path

Path to private key shared with Slurm for JWT signature. The key is used by Slurm-web to generate its token for authentication on slurmrestd in auto mode. It must be the same key as used in Slurm AuthAltParameters so that Slurm services can validate JWT generated by Slurm-web.

This parameter is used only when auth is jwt and jwt_mode is auto.

Default: /var/lib/slurm-web/slurmrestd.key

-

jwt_token

password

The static JSON Web Token (JWT) used in HTTP headers with JWT authentication, typically generated with scontrol token. While this is generally not a good practice, it is recommended to generate tokens with infinite lifespan to avoid failures due to expired token.

This parameter is used only when auth is jwt and jwt_mode is static.

No default value

-

version

str

Slurm REST API version.

You SHOULD NOT change this parameter unless you really know what you are doing. This parameter is more intented for Slurm-web developers rather than end users. Slurm-web is officially tested and validated with the default value only.

Default: 0.0.40

-

filters

Parameter Type Description Required
jobs

list[str]

List of jobs fields selected in slurmrestd API when retrieving a list of jobs, all other fields arefiltered out.

Default:

  • job_id

  • user_name

  • account

  • job_state

  • state_reason

  • partition

  • priority

  • qos

  • cpus

  • node_count

  • nodes

-

acctjob

list[str]

List of slurmdbd job fields selected in slurmrestd API when retrieving a unique job, all other fields are filtered out.

Default:

  • association

  • comment

  • derived_exit_code

  • exit_code

  • group

  • name

  • nodes

  • partition

  • priority

  • qos

  • script

  • state

  • steps

  • submit_line

  • time

  • tres

  • used_gres

  • user

  • wckey

  • working_directory

-

ctldjob

list[str]

List of slurmctld job fields selected in slurmrestd API when retrieving a unique job, all other fields are filtered out.

Default:

  • accrue_time

  • batch_flag

  • command

  • cpus

  • current_working_directory

  • exclusive

  • last_sched_evaluation

  • node_count

  • partition

  • standard_error

  • standard_input

  • standard_output

  • tasks

  • tres_req_str

-

nodes

list[str]

List of nodes fields selected in slurmrestd API, all other fields are filtered out.

Default:

  • name

  • cpus

  • sockets

  • cores

  • real_memory

  • state

  • reason

  • partitions

  • alloc_cpus

  • alloc_idle_cpus

-

node

list[str]

List of invidual node fields selected in slurmrestd API, all other fields are filtered out.

Default:

  • name

  • architecture

  • operating_system

  • boot_time

  • last_busy

  • cpus

  • sockets

  • cores

  • threads

  • real_memory

  • state

  • reason

  • partitions

  • alloc_cpus

  • alloc_idle_cpus

  • alloc_memory

-

partitions

list[str]

List of partitions fields selected in slurmrestd API, all other fields are filtered out.

Default:

  • name

  • node_sets

-

qos

list[str]

List of qos fields selected in slurmrestd API, all other fields are filtered out.

Default:

  • name

  • description

  • priority

  • flags

  • limits

-

reservations

list[str]

List of reservations fields selected in slurmrestd API, all other fields are filtered out.

Default:

  • name

  • users

  • accounts

  • node_list

  • node_count

  • start_time

  • end_time

  • flags

-

accounts

list[str]

List of accounts fields selected in slurmrestd API, all other fields are filtered out.

Default:

  • name

-

policy

Parameter Type Description Required
definition

path

Path to RBAC policy definition file with available actions

Default: /usr/share/slurm-web/conf/policy.yml

-

vendor_roles

path

Path to default vendor RBAC policy definition file with roles and permitted actions

Default: /usr/share/slurm-web/conf/policy.ini

-

roles

path

Path to site RBAC policy definition file with roles and permitted actions

Default: /etc/slurm-web/policy.ini

-

jwt

Parameter Type Description Required
key

path

Path to private key for Slurm-web internal JWT signature.

Default: /var/lib/slurm-web/jwt.key

-

algorithm

str

Cryptographic algorithm used to sign JWT

Choices:

  • HS256

  • HS384

  • HS512

  • ES256

  • ES256K

  • ES384

  • ES512

  • RS256

  • RS384

  • RS512

  • PS256

  • PS384

  • PS512

  • EdDSA

Default: HS256

-

audience

str

Audience defined in generated JWT and expected in JWT provided by clients

Default: slurm-web

-

racksdb

Parameter Type Description Required
enabled

bool

Control if RacksDB integration feature for advanced visualization of resources is enabled.

Default: True

-

db

path

Path to RacksDB database

Default: /var/lib/racksdb

-

schema

path

Path to RacksDB database schema

Default: /usr/share/racksdb/schemas/racksdb.yml

-

extensions

path

Path to site-specific RacksDB schema extensions

Default: /etc/racksdb/extensions.yml

-

drawings_schema

path

Path to RacksDB database schema

Default: /usr/share/racksdb/schemas/drawings.yml

-

infrastructure

str

Name of the infrastructure for the cluster in RacksDB. By default, the cluster name is used.

Example: atlas

No default value

-

tags

list[str]

List of tags applied to compute nodes in RacksDB database

Default:

  • compute

-

cache

Parameter Type Description Required
enabled

bool

Determine if caching is enabled

Default: False

-

host

str

Hostname of Redis cache server

Default: localhost

-

port

int

TCP port of Redis cache server

Default: 6379

-

password

password

Password to connect to protected Redis server. When this parameter is not defined, Redis server is accessed without password.

Example: SECR3T

No default value

-

version

int

Expiration delay in seconds for Slurm version in cache

Default: 1800

-

jobs

int

Expiration delay in seconds for jobs in cache

Default: 30

-

job

int

Expiration delay in seconds for invidual jobs in cache

Default: 10

-

nodes

int

Expiration delay in seconds for nodes in cache

Default: 30

-

node

int

Expiration delay in seconds for node in cache

Default: 10

-

partitions

int

Expiration delay in seconds for partitions in cache

Default: 60

-

qos

int

Expiration delay in seconds for QOS in cache

Default: 60

-

reservations

int

Expiration delay in seconds for reservations in cache

Default: 60

-

accounts

int

Expiration delay in seconds for accounts in cache

Default: 60

-

metrics

Parameter Type Description Required
enabled

bool

Determine if metrics feature and integration with Prometheus (or compatible) is enabled.

Default: False

-

restrict

list[network]

Restricted list of IP networks permitted to request metrics.

Default:

  • 127.0.0.0/24

  • ::1/128

-

host

uri

URL of Prometheus server (or compatible) to requests metrics with PromQL.

-

job

str

Name of Prometheus job which scrapes Slurm-web metrics.

Default: slurm

-

Example

This section contains a full example of Slurm-web agent configuration file.

Do NOT use this full example file as a basis for your custom site configuration. This example is provided only to illustrate the syntax of the file, its parameters and possible values. Most parameters are actually optional. You should define only the sections and parameters that are either really required or those for which you want to override default value. Please refer to the quickstart guide to understand the parameters you are supposed to define in most cases.
This example file is also installed in Slurm-web agent distribution packages at /usr/share/doc/slurm-web-agent/examples/agent.ini.
Complete example of Slurm-web agent configuration file
# This file is an example configuration file for Slurm-web agent
#
# Please DO NOT USE THIS FILE as a basis for your custom
# /etc/slurm-web/agent.ini.

[service]

# Name of cluster served by agent
#
# This parameter is required.
cluster=atlas

# Interface address to bind for incoming connections
#
# Default value: localhost
interface=localhost

# TCP port to listen for incoming connections
#
# Default value: 5012
port=5012

# When true, Cross-Origin Resource Sharing (CORS) headers are enabled.
cors=no

# Enable debug mode
debug=no

# List of log flags to enable. Special value `ALL` enables all log flags.
#
# Possible values:
# - slurmweb
# - rfl
# - werkzeug
# - urllib3
# - racksdb
# - ALL
#
# Default value:
# - ALL
log_flags=
  ALL

# List of debug flags to enable. Special value `ALL` enables all debug
# flags.
#
# Possible values:
# - slurmweb
# - rfl
# - werkzeug
# - urllib3
# - racksdb
# - ALL
#
# Default value:
# - slurmweb
debug_flags=
  slurmweb

[slurmrestd]

# URI to slurmrestd HTTP server. It can either be in the form
# http://host:port for TCP/IP server or unix:///path/to/slurmrestd.socket
# for Unix socket.
#
# Default value: unix:/run/slurmrestd/slurmrestd.socket
uri=unix:/run/slurmrestd/slurmrestd.socket

# Authentication method with slurmrestd.
#
# Note that `local` authentication method is only supported with Unix socket
# URI. With this method, Slurm-web agent must run with the same UID as
# slurmrestd service (eg. slurm system user).
#
# The `jwt` authentication method is supported by both TCP/IP and Unix
# sockets URIs.
#
# Possible values:
# - local
# - jwt
#
# Default value: local
auth=local

# Slurmrestd JWT authentication mode, either _auto_ or _static_.
#
# In _auto_ mode, Slurm-web agent generates tokens with the signature key
# specified in `jwt_key`. The tokens have a limited lifespan as defined with
# `jwt_lifespan`. Tokens are automatically renewed upon expiration. This is
# the recommended mode.
#
# In _static_ mode, Slurm-web simply use the token provided with
# `jwt_token`.
#
# This parameter is used only when `auth` is _jwt_.
#
# Possible values:
# - auto
# - static
#
# Default value: auto
jwt_mode=auto

# The user name used in HTTP headers with JWT authentication.
#
# This parameter is used only when `auth` is _jwt_.
#
# Default value: slurm
jwt_user=slurm

# Lifespan of JWT tokens generated by Slurm-web in seconds. The default
# value is 1 hour.
#
# This parameter is used only when `auth` is _jwt_ and `jwt_mode` is _auto_.
#
# Default value: 3600
jwt_lifespan=3600

# Path to private key shared with Slurm for JWT signature. The key is used
# by Slurm-web to generate its token for authentication on slurmrestd in
# _auto_ mode. It must be the same key as used in Slurm `AuthAltParameters`
# so that Slurm services can validate JWT generated by Slurm-web.
#
# This parameter is used only when `auth` is _jwt_  and `jwt_mode` is
# _auto_.
#
# Default value: /var/lib/slurm-web/slurmrestd.key
jwt_key=/var/lib/slurm-web/slurmrestd.key

# The static JSON Web Token (JWT) used in HTTP headers with JWT
# authentication, typically generated with `scontrol token`. While this is
# generally not a good practice, it is recommended to generate tokens with
# infinite lifespan to avoid failures due to expired token.
#
# This parameter is used only when `auth` is _jwt_ and `jwt_mode` is
# _static_.
jwt_token=None

# Slurm REST API version.
#
# CAUTION: You SHOULD NOT change this parameter unless you really know what
# you are doing. This parameter is more intented for Slurm-web developers
# rather than end users. Slurm-web is officially tested and validated with
# the default value only.
#
# Default value: 0.0.40
version=0.0.40

[filters]

# List of jobs fields selected in slurmrestd API when retrieving a list of
# jobs, all other fields arefiltered out.
#
# Default value:
# - job_id
# - user_name
# - account
# - job_state
# - state_reason
# - partition
# - priority
# - qos
# - cpus
# - node_count
# - nodes
jobs=
  job_id
  user_name
  account
  job_state
  state_reason
  partition
  priority
  qos
  cpus
  node_count
  nodes

# List of slurmdbd job fields selected in slurmrestd API when retrieving a
# unique job, all other fields are filtered out.
#
# Default value:
# - association
# - comment
# - derived_exit_code
# - exit_code
# - group
# - name
# - nodes
# - partition
# - priority
# - qos
# - script
# - state
# - steps
# - submit_line
# - time
# - tres
# - used_gres
# - user
# - wckey
# - working_directory
acctjob=
  association
  comment
  derived_exit_code
  exit_code
  group
  name
  nodes
  partition
  priority
  qos
  script
  state
  steps
  submit_line
  time
  tres
  used_gres
  user
  wckey
  working_directory

# List of slurmctld job fields selected in slurmrestd API when retrieving a
# unique job, all other fields are filtered out.
#
# Default value:
# - accrue_time
# - batch_flag
# - command
# - cpus
# - current_working_directory
# - exclusive
# - last_sched_evaluation
# - node_count
# - partition
# - standard_error
# - standard_input
# - standard_output
# - tasks
# - tres_req_str
ctldjob=
  accrue_time
  batch_flag
  command
  cpus
  current_working_directory
  exclusive
  last_sched_evaluation
  node_count
  partition
  standard_error
  standard_input
  standard_output
  tasks
  tres_req_str

# List of nodes fields selected in slurmrestd API, all other fields are
# filtered out.
#
# Default value:
# - name
# - cpus
# - sockets
# - cores
# - real_memory
# - state
# - reason
# - partitions
# - alloc_cpus
# - alloc_idle_cpus
nodes=
  name
  cpus
  sockets
  cores
  real_memory
  state
  reason
  partitions
  alloc_cpus
  alloc_idle_cpus

# List of invidual node fields selected in slurmrestd API, all other fields
# are filtered out.
#
# Default value:
# - name
# - architecture
# - operating_system
# - boot_time
# - last_busy
# - cpus
# - sockets
# - cores
# - threads
# - real_memory
# - state
# - reason
# - partitions
# - alloc_cpus
# - alloc_idle_cpus
# - alloc_memory
node=
  name
  architecture
  operating_system
  boot_time
  last_busy
  cpus
  sockets
  cores
  threads
  real_memory
  state
  reason
  partitions
  alloc_cpus
  alloc_idle_cpus
  alloc_memory

# List of partitions fields selected in slurmrestd API, all other fields are
# filtered out.
#
# Default value:
# - name
# - node_sets
partitions=
  name
  node_sets

# List of qos fields selected in slurmrestd API, all other fields are
# filtered out.
#
# Default value:
# - name
# - description
# - priority
# - flags
# - limits
qos=
  name
  description
  priority
  flags
  limits

# List of reservations fields selected in slurmrestd API, all other fields
# are filtered out.
#
# Default value:
# - name
# - users
# - accounts
# - node_list
# - node_count
# - start_time
# - end_time
# - flags
reservations=
  name
  users
  accounts
  node_list
  node_count
  start_time
  end_time
  flags

# List of accounts fields selected in slurmrestd API, all other fields are
# filtered out.
#
# Default value:
# - name
accounts=
  name

[policy]

# Path to RBAC policy definition file with available actions
#
# Default value: /usr/share/slurm-web/conf/policy.yml
definition=/usr/share/slurm-web/conf/policy.yml

# Path to default vendor RBAC policy definition file with roles and
# permitted actions
#
# Default value: /usr/share/slurm-web/conf/policy.ini
vendor_roles=/usr/share/slurm-web/conf/policy.ini

# Path to site RBAC policy definition file with roles and permitted actions
#
# Default value: /etc/slurm-web/policy.ini
roles=/etc/slurm-web/policy.ini

[jwt]

# Path to private key for Slurm-web internal JWT signature.
#
# Default value: /var/lib/slurm-web/jwt.key
key=/var/lib/slurm-web/jwt.key

# Cryptographic algorithm used to sign JWT
#
# Possible values:
# - HS256
# - HS384
# - HS512
# - ES256
# - ES256K
# - ES384
# - ES512
# - RS256
# - RS384
# - RS512
# - PS256
# - PS384
# - PS512
# - EdDSA
#
# Default value: HS256
algorithm=HS256

# Audience defined in generated JWT and expected in JWT provided by clients
#
# Default value: slurm-web
audience=slurm-web

[racksdb]

# Control if RacksDB integration feature for advanced visualization of
# resources is enabled.
#
# Default value: yes
enabled=yes

# Path to RacksDB database
#
# Default value: /var/lib/racksdb
db=/var/lib/racksdb

# Path to RacksDB database schema
#
# Default value: /usr/share/racksdb/schemas/racksdb.yml
schema=/usr/share/racksdb/schemas/racksdb.yml

# Path to site-specific RacksDB schema extensions
#
# Default value: /etc/racksdb/extensions.yml
extensions=/etc/racksdb/extensions.yml

# Path to RacksDB database schema
#
# Default value: /usr/share/racksdb/schemas/drawings.yml
drawings_schema=/usr/share/racksdb/schemas/drawings.yml

# Name of the infrastructure for the cluster in RacksDB. By default, the
# cluster name is used.
infrastructure=atlas

# List of tags applied to compute nodes in RacksDB database
#
# Default value:
# - compute
tags=
  compute

[cache]

# Determine if caching is enabled
enabled=no

# Hostname of Redis cache server
#
# Default value: localhost
host=localhost

# TCP port of Redis cache server
#
# Default value: 6379
port=6379

# Password to connect to protected Redis server. When this parameter is
# not defined, Redis server is accessed without password.
password=SECR3T

# Expiration delay in seconds for Slurm version in cache
#
# Default value: 1800
version=1800

# Expiration delay in seconds for jobs in cache
#
# Default value: 30
jobs=30

# Expiration delay in seconds for invidual jobs in cache
#
# Default value: 10
job=10

# Expiration delay in seconds for nodes in cache
#
# Default value: 30
nodes=30

# Expiration delay in seconds for node in cache
#
# Default value: 10
node=10

# Expiration delay in seconds for partitions in cache
#
# Default value: 60
partitions=60

# Expiration delay in seconds for QOS in cache
#
# Default value: 60
qos=60

# Expiration delay in seconds for reservations in cache
#
# Default value: 60
reservations=60

# Expiration delay in seconds for accounts in cache
#
# Default value: 60
accounts=60

[metrics]

# Determine if metrics feature and integration with Prometheus (or
# compatible) is enabled.
enabled=no

# Restricted list of IP networks permitted to request metrics.
#
# Default value:
# - 127.0.0.0/24
# - ::1/128
restrict=
  127.0.0.0/24
  ::1/128

# URL of Prometheus server (or compatible) to requests metrics with PromQL.
#
# Default value: http://localhost:9090
host=http://localhost:9090

# Name of Prometheus job which scrapes Slurm-web metrics.
#
# Default value: slurm
job=slurm