---
auth:
  token:
    # Optimize uses token-based authentication to keep track of which users are
    # logged in. Define when a token is supposed to expire.
    lifeMin: 15
    # Optional secret used to sign authentication tokens, it's recommended to use at least a 64 character secret.
    # If set `null` a random secret will be generated with each startup of Optimize.
    secret: null

container:
  # A host name or IP address, to identify a specific network interface on
  # which to listen.
  host: localhost
  ports:
    # A port number that will be used by Optimize to process HTTP connections.
    # If set to null, ~ or left empty, http connections won't be accepted.
    http: 8090
    # A port number that will be used by Optimize to process
    # secure HTTPS connections.
    https: 8091
  # HTTPS requires an SSL Certificate. When you generate an SSL Certificate,
  # you are creating a keystore file and a keystore password for use when the
  # browser interface connects
  keystore:
    location: keystore.jks
    password: optimize
  # configuration of status reporting web socket
  status:
    # max number of threads\sessions that will be kept to report status
    connections:
      max: 10
  checkMetadata: true

# Configuration for engines used to import data. Please note that you have to have at
# least one engine configured at all times.
engines:
  # An alias of the engine, which will be used for internal purposes like
  # logging and displaying which data belong to which engine.
  'camunda-bpm':
    #The name of the engine that will be used to import data.
    name: default
    #A base URL that will be used for connections to the Camunda Engine REST API.
    rest: 'http://localhost:8080/engine-rest'
    # Determines whether this instance of Optimize should import definition & historical data from this engine.
    importEnabled: true
    authentication:
      # Toggles basic authentication on or off. When enabling basic
      # authentication, please be aware that you also need to adjust the values
      # of the user and password.
      # Also note, when enabled, it is required that the user has
      # * READ & READ_HISTORY permission on the Process and Decision Definition resources
      # * READ permission on the Authorization, Group and User resources
      # to enable users to log in and Optimize to import the engine data.
      enabled: false
      #When basic authentication is enabled, this password is used to
      #authenticate against the engine.
      password: ''
      #When basic authentication is enabled, this user is used to authenticate
      #against the engine.
      user: ''
    # The webapps configuration allows Optimize to directly link
    # to the other Camunda Web Applications, e.g. to jump from
    # Optimize directly to a dedicated process instance in Cockpit
    webapps:
      # Defines the endpoint where to find the camunda webapps for the given engine
      endpoint: 'http://localhost:8080/camunda'
      # Enables/disables linking to other Camunda Web Applications
      enabled: true

engine-commons:
  connection:
    #Maximum time without connection to the engine, Optimize should wait
    #until a time out is triggered. A value of zero means to wait an
    # infinite amount of time.
    timeout: 0
  procdef:
    #The engine endpoint to the process definition.
    resource: '/process-definition'
    #The engine endpoint to the process definition xml.
    xml: '/xml'
  decision-definition:
    resource: '/decision-definition'
    xml: '/xml'
  read:
    # Maximum time a request to the engine should last,
    # before a timeout triggers. A value of zero means to wait an
    # infinite amount of time.
    timeout: 0
  user:
    validation:
      #The engine endpoint for the user validation.
      resource: '/identity/verify'

import:
  data:
    activity-instance:
      # Determines the page size for historic activity instance fetching.
      maxPageSize: 10000
    process-definition-xml:
      # Determines the page size for process definition xml model
      # fetching. Should be a low value, as large models will lead to
      # memory or timeout problems.
      maxPageSize: 2
    process-instance:
      # Determines the maximum page size for historic process instance fetching.
      maxPageSize: 10000
    variable:
      # Determines the page size for historic variable instance fetching.
      maxPageSize: 10000
    user-task-instance:
      # Determines the page size for historic user task instance fetching
      maxPageSize: 10000
    user-operation-log-entry:
      # Determines the page size for historic user operation log entry fetching.
      maxPageSize: 10000
    decision-definition-xml:
      # Determines the page size for decision definition xml model
      # fetching. Should be a low value, as large models will lead to
      # memory or timeout problems.
      maxPageSize: 2
    decision-instance:
      # Determines the page size for historic decision instance fetching.
      maxPageSize: 10000
    dmn:
      # Determines if the DMN/decision data, such as decision definitions and instances
      # should be imported.
      enabled: true
  # Number of threads being used to process the import jobs per data type that are writing data to elasticsearch.
  elasticsearchJobExecutorThreadCount: 1
  # Adjust the queue size of the import jobs per data type that store data to elasticsearch.
  # A too large value might cause memory problems.
  elasticsearchJobExecutorQueueSize: 5
  handler:
    backoff:
      # Interval which is used for the backoff time calculation.
      initial: 1000
      # Once all pages are consumed, the import service component will
      # start scheduling fetching tasks in increasing periods of time,
      # controlled by 'backoff' counter.
      # This property sets maximal backoff interval in seconds
      max: 30
  #States how often the import index should be stored to Elasticsearch.
  importIndexStorageIntervalInSec: 10
  # the time interval the import backs off from the current tip of the time, to reread potentially missed concurrent writes
  currentTimeBackoffMilliseconds: 2000

# everything that is related with configuring Elasticsearch or creating
# a connection to it.
es:
  connection:
    #Maximum time without connection to Elasticsearch, Optimize should
    #wait until a time out triggers.
    timeout: 10000
    # a list of Elasticsearch nodes Optimize can connect to. If you  have built
    # an Elasticsearch cluster with several nodes it is recommended to define
    # several connection points in case one node fails.
    nodes:
        # the address/hostname under which the Elasticsearch node is available.
      - host: 'localhost'
        # A port number used by Elasticsearch to accept HTTP connections.
        httpPort: 9200
    # HTTP forward proxy configuration
    proxy:
      # whether an HTTP proxy should be used for requests to elasticsearch
      enabled: false
      # the host of the proxy to use
      host: null
      # the port of the proxy to use
      port: null
      # whether this proxy is using a secured connection
      sslEnabled: false

  # Elasticsearch security settings
  security:
    # the basic auth (x-pack) username
    username: null
    # the basic auth (x-pack) password
    password: null
    # SSL/HTTPS secured connection settings
    ssl:
      # path to a PEM encoded file containing the certificate (or certificate chain)
      # that will be presented to clients when they connect.
      certificate: null
      # A list of paths to PEM encoded CA certificate files that should be trusted, e.g. ['/path/to/ca.crt'].
      # Note: if you are using a public CA that is already trusted by the Java runtime,
      # you do not need to set the certificate_authorities.
      certificate_authorities: []
      # used to enable or disable TLS/SSL for the HTTP connection
      enabled: false

  #Maximum time a request to elasticsearch should last, before a timeout
  #triggers.
  scrollTimeout: 60000
  settings:
    index:
      # How often should the data replicated in case of node failure.
      number_of_replicas: 1
      # How many shards should be used in the cluster.
      # NOTE: this property only applies the first time Optimize is started and
      # the schema/mapping is deployed on Elasticsearch. If you want to take
      # this property to take effect again, you need to delete all indexes (with it all data)
      # and restart Optimize.
      number_of_shards: 5
      #How long Elasticsearch waits until the documents are available
      #for search. A positive value defines the duration in seconds.
      #A value of -1 means that a refresh needs to be done manually.
      refresh_interval: 2s

plugin:
  variableImport:
    #Look in the given base package list for variable import adaption plugins.
    #If empty, the import is not influenced.
    basePackages: []
  engineRestFilter:
    #Look in the given base package list for engine rest filter plugins.
    #If empty, the REST calls are not influenced.
    basePackages: []
  authenticationExtractor:
    # Looks in the given base package list for authentication extractor plugins.
    # If empty, the standard Optimize authentication mechanism is used.
    basePackages: []
  decisionInputImport:
    #Look in the given base package list for Decision input import adaption plugins.
    #If empty, the import is not influenced.
    basePackages: []
  decisionOutputImport:
    #Look in the given base package list for Decision output import adaption plugins.
    #If empty, the import is not influenced.
    basePackages: []


serialization:
  # Define a custom date format that should be used for
  # fetching date data from the engine(should be the same as in the engine)
  # Please note that engine prior to 7.8 use yyyy-MM-dd'T'HH:mm:ss as default date format
  engineDateFormat: yyyy-MM-dd'T'HH:mm:ss.SSSZ

alerting:
  quartz:
    jobStore: 'org.quartz.simpl.RAMJobStore'

email:
  #A switch to control email sending process.
  enabled: false
  # Username of your smtp server
  username: ''
  # Corresponding password to the given user of your smtp server
  password: ''
  # Email address that can be used to send alerts
  address: ''
  # The smtp server name
  hostname: ''
  # The smtp server port. This one is also used as SSL port for the security connection.
  port: 587
  # States how the connection to the server should be secured.
  # Possible values are 'NONE', 'STARTTLS' or 'SSL/TLS'
  securityProtocol: 'NONE'

export:
  csv:
    # Maximum number of records returned by CSV export
    limit: 1000
    # Position of first record which will be exported in CSV
    offset: 0

sharing:
  # decides if the sharing feature of Optimize can be used in the UI.
  enabled: true

historyCleanup:
  # switch for the cleanup, defaults to false
  enabled: false
  # cron expression for when the cleanup should run
  cronTrigger: '0 1 * * *'
  # time to live (ttl) for process instance data, from when reached the process instance will get cleaned up
  # Format is ISO_8601 duration  https://en.wikipedia.org/wiki/ISO_8601#Durations
  ttl: 'P2Y'
  # type of process data cleanup to perform, possible values:
  # 'all' - delete everything related to the process instance
  # 'variables' - only delete associated variables of a process instance
  processDataCleanupMode: 'all'
  # process definition specific configuration parameters that will overwrite the general parameters (ttl, processDataCleanupMode)
  # for the specific processDefinition key
  perProcessDefinitionConfig:
  # 'myProcessDefinitionKey':
  #   ttl: 'P2M'
  #    mode: 'variables'
  # decision definition specific configuration parameters that will overwrite the general parameters (ttl)
  # for the specific decisionDefinition key
  perDecisionDefinitionConfig:
  # 'myDecisionDefinitionKey':
  #   ttl: 'P2M'
