# Scripts

# Common

  • HCL
  • Yaml
scripts {
  updateInterval = 5000
  folder "scripts"{
    path = "/opt/scripts"
    mask = "*.lua" 
  }
  file "demo1" {
    filename = "/path/to/demo.lua"
    disableIgnore = false
  }
  postgres "pg1" {
    host = "domain.com"
    port = 5432
    username = "username"
    password = "password"
    database = "database"
    sslMode = "verify-full"
    sslCertPath = "/path/to/cert.crt"
    query = "SELECT name, body FROM scripts"
  }
}

# updateInterval TIME_INTERVAL

By default: 60000 (1 minute)

An interval for check changes in script sources, milliseconds


# Type file

  • HCL
  • Yaml
file "demo1" {
  filename = "/path/to/demo.lua"
  disableIgnore = false
}

# name (string)

Required, Unique

Script source name

# file (string)

Required, Unique

Script source name

# filename (string)

Required

Path to the script

# disableIgnore (bool)

By default: false

If true, meta-tag @ignore will be ignored


# Type folder

  • HCL
  • Yaml
folder "scripts"{
  path = "/opt/scripts"
  mask = "*.lua" 
}

# name (string)

Required, Unique

Script source name

# path (string)

Required

Path to folder

# mask (string)

By default: *.lua

File mask

# Type postgres

# name (string)

Required, Unique

Script source name

# host (string)

Required

Connection host

# port (int)

By default: 5432

Connection port

# username (string)

By default: postgres

Connection username

# password (string)

By default: postgres

Connection password

# database (string)

By default: postgres

Connection database

# sslMode (string)

By default disable

SSL mode

# sslCertPath (string)

By default: empty string

Path to SSL cert

# timeout

By default: 5000

timeout, milliseconds

# query

Query for scripts select.

TIP

You must return exactly two string fields!

First field for script name, and second field for script body.

Example:

SELECT name, body FROM scripts
Last Updated: 9/23/2021, 1:06:18 PM