Server
Control the server: version and id, shutdown, maintenance status and locks, configuration (reload, show, set, certificate), session counters, kill of processes and refresh of the editor. Typical uses: administration and maintenance of a MentDB server.
idai firstnameai lastnamename ai nameshutdownstopwaitmaintenance getmaintenance setmaintenance set_lockversionexceeded sessionsreset exceeded sessions@exceeded sessions@reset exceeded sessionssrc countfunction countrefresh adminrefresh develrefresh configin editorin clipboardin out_editorin activityin scatterconfig reloadconfig showconfig setconfig certkillkill_process

id


Description

    To get the id of the server

admin
id
mentdb
WLMJ4JpIGAYY

ai firstname


Description

    To show the AI first name

admin
ai firstname
mentdb
lisa
Used in use cases (1 recipe)

    System administrator & DevOps › Server inventory and security checks
Often used with

    ai lastname  ·  config cert  ·  function count  ·  json doc  ·  json iobject  ·  metric java vendor  ·  metric java version  ·  metric system architecture

ai lastname


Description

    To show the AI last name

admin
ai lastname
mentdb
payet
Used in use cases (1 recipe)

    System administrator & DevOps › Server inventory and security checks
Often used with

    ai firstname  ·  config cert  ·  function count  ·  json doc  ·  json iobject  ·  metric java vendor  ·  metric java version  ·  metric system architecture

name


Synonymous

    ai name

Description

    To show the AI name

admin
name
mentdb
lisa payet
Used in use cases (2 recipes)

    System administrator & DevOps › Health report in JSON for the monitoring
    Cluster & high-availability engineer › Run MQL on the least loaded node of the cluster
Often used with

    atom get  ·  date systimestamp  ·  execute  ·  include  ·  json doc  ·  json iobject  ·  metric current available mem  ·  metric current cpu jvm

shutdown <serverName>


Description

    To stop the server (or stop)

Parameters

    serverName:   The server name - string - required
admin
shutdown "server_A"
mentdb
MentDB: Shutdown with successful. Bye. Disconnected.

stop <serverName>


Description

    To stop the server (or shutdown)

Parameters

    serverName:   The server name - string - required
admin
stop "server_A"
mentdb
MentDB: Shutdown with successful. Bye. Disconnected.

wait <time>


Description

    To force the server to wait

Parameters

    time:   The time in milliseconds - string - required
admin
wait "10000";
mentdb
1
Used in use cases (36 recipes)

    JSON & document store developer › A report cached in a node with a time to live
    Execution modes › Stack run postponed until a gate opens
    Async developer › Push a script to the stack and watch it close
    Scheduler developer › A heartbeat job every 2 seconds: run, pause, resume, remove
    Event developer › Run a script when a file arrives in a folder
    Versioning & deployment › Change a script, see it as U, commit again and read the history
    and 30 more in the Use cases
Often used with

    script create  ·  script delete  ·  while  ·  and  ·  date now  ·  sequence add  ·  sequence remove  ·  sequence get current

maintenance get <time>


Description

    To get the maintenance statuses: mql (MQL editor, except admin), ws (web services), web (web applications, except the https admin application), bot (bots), job (jobs), stack (stack), mail (sending of the mails)

Parameters

    time:   The time in milliseconds - string - required
admin
maintenance get;
mentdb
1
Used in use cases (3 recipes)

    Backend & web service developer › Health check endpoint for the load balancer
    System administrator & DevOps › Maintenance window: lock, change the config, reopen
    Automation architect › Monitor the stack queue
Often used with

    job scheduler status  ·  stack count_error  ·  stack count_wait  ·  string regexp_extract  ·  and  ·  atom get  ·  config reload  ·  config set

maintenance set <mql_door> <ws_door> <web_door> <job_door> <stack_door>


Description

    To set the maintenance statuses of the MQL editor: mql ws web job stack (1 to lock, 0 to unlock), the other locks are kept

Parameters

    mql_door:   The MQL door - boolean - required
    ws_door:   The WS door - boolean - required
    web_door:   The WEB door - boolean - required
    job_door:   The JOB door - boolean - required
    stack_door:   The STACK door - boolean - required
admin
maintenance set 0 0 0 0 0;
mentdb
1
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config reload  ·  config set  ·  job scheduler restart  ·  kill  ·  log remove  ·  log trace  ·  log write

maintenance set_lock <lock> <value>


Description

    To lock (1) or unlock (0) one entry of MentDB: MQL, WS, WEB, BOT, JOB, STACK or MAIL (admin only)

Parameters

    lock:   The lock: MQL, WS, WEB, BOT, JOB, STACK or MAIL - string - required
    value:   1 to lock, 0 to unlock - boolean - required
admin
maintenance set_lock "BOT" 1;
mentdb
{"mql":false,"ws":false,"web":false,"bot":true,"job":false,"stack":false,"mail":false}
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config reload  ·  config set  ·  job scheduler restart  ·  kill  ·  log remove  ·  log trace  ·  log write

version


Description

    To show the version of the server

admin
version
mentdb
4.2.5
Used in use cases (5 recipes)

    Backend & web service developer › Health check endpoint for the load balancer
    System administrator & DevOps › Health report in JSON for the monitoring
    System administrator & DevOps › Server inventory and security checks
    System administrator & DevOps › Morning check line from the system statistics
    System administrator & DevOps › CMDB record with a hashed host id
Often used with

    json doc  ·  json iobject  ·  metric total mem  ·  atom get  ·  date systimestamp  ·  function count  ·  metric current available mem  ·  metric current cpu jvm

exceeded sessions


Description

    To show the number of exceeded sessions

admin
exceeded sessions
mentdb
0
Used in use cases (1 recipe)

    System administrator & DevOps › Sessions and errors of the day
Often used with

    cmdid  ·  count sessions  ·  date sysdate  ·  log archive path  ·  log archive size  ·  log current id  ·  log retention day  ·  log search

reset exceeded sessions


Description

    To reset the number of exceeded sessions

admin
reset exceeded sessions;
mentdb
Exceeded sessions has been reset successfully.
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config reload  ·  config set  ·  job scheduler restart  ·  kill  ·  log remove  ·  log trace  ·  log write

@exceeded sessions


Description

    To show the number of exceeded web socket sessions

admin
@exceeded sessions
mentdb
0
Used in use cases (1 recipe)

    System administrator & DevOps › Sessions and errors of the day
Often used with

    cmdid  ·  count sessions  ·  date sysdate  ·  log archive path  ·  log archive size  ·  log current id  ·  log retention day  ·  log search

@reset exceeded sessions


Description

    To reset the number of exceeded web socket sessions

admin
@reset exceeded sessions;
mentdb
Exceeded sessions has been reset successfully.
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config reload  ·  config set  ·  job scheduler restart  ·  kill  ·  log remove  ·  log trace  ·  log write

src count


Description

    To count the lines of code of MentDB: the Java and MQL files of the server (src, mql/scripts, basic-integration.mql) and of the editor (MentDB_Weak_Editor_GPLv3: src, mql, etl), plus conf/server.conf. A folder that is not installed counts 0.

admin
src count
mentdb
35679
Used in use cases (1 recipe)

    System administrator & DevOps › Server inventory and security checks
Often used with

    ai firstname  ·  ai lastname  ·  config cert  ·  function count  ·  json doc  ·  json iobject  ·  metric java vendor  ·  metric java version

function count


Description

    To count the number of MQL functions

admin
function count
mentdb
690
Used in use cases (2 recipes)

    Backend & web service developer › Health check endpoint for the load balancer
    System administrator & DevOps › Server inventory and security checks
Often used with

    json doc  ·  json iobject  ·  version  ·  ai firstname  ·  ai lastname  ·  atom get  ·  config cert  ·  count sessions

refresh admin


Description

    To refresh the admin tree in the editor

admin
refresh admin
mentdb
In editor ...

refresh devel <filter>


Description

    To refresh the devel tree in the editor

Parameters

    filter:   The string to search - string - required
admin
refresh devel "as400"
mentdb
In editor ...

refresh config


Description

    To refresh the config tree in the editor

admin
refresh config
mentdb
In editor ...

in editor


Description

    To refresh the tree in the editor

admin
in editor {file load "home/file.txt"};
mentdb
...

in clipboard


Description

    To copy a string to the clipboard

admin
in clipboard {script generate update "division"};
mentdb
...

in out_editor


Description

    Show data in the editor

admin
in out_editor { sql show data "demo_db_mysql" "SELECT * FROM products LIMIT 0, 200"; }
mentdb
...

in activity


Description

    Show the line process

admin
in activity {...};
mentdb
...

in scatter


Description

    Show the scatter plot for PA

admin
in scatter {...};
mentdb
...

config reload


Description

    To show the config file

admin
config reload;
mentdb
1
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config set  ·  job scheduler restart  ·  kill  ·  log remove  ·  log trace  ·  log write  ·  maintenance get

config show


Description

    To show the keys of conf/server.conf (section, key, value, comment, secret, editable, reload: applied by config reload, else a restart is needed). The secret values are masked. Reserved to the sys group.

admin
config show
mentdb
[ { "section": "LOG", "key": "RETENTION_DAYS", "value": "50", "comment": "The retention in days [integer]", "secret": "0", "editable": "1", "reload": "1" } ]
Used in use cases (1 recipe)

    Cluster & high-availability engineer › Is this server ready for a cluster?
Often used with

    cluster exist  ·  cluster show  ·  cluster signal show_obj  ·  concat_var  ·  job exist  ·  job show  ·  string trim

config set <section> <key> <value>


Description

    To change a key of conf/server.conf, the comments and the layout of the file are kept. The secret keys and the section ADMIN cannot be changed. Then execute config reload or restart the server (see config show). Reserved to the sys group.

Parameters

    section:   The section - string - required
    key:   The key - string - required
    value:   The value - string - required
admin
config set "LOG" "RETENTION_DAYS" "60";
mentdb
1
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config reload  ·  job scheduler restart  ·  kill  ·  log remove  ·  log trace  ·  log write  ·  maintenance get

config cert


Description

    To show the certificates of the server (cert/ca_cert.pem and cert/cu_cert.pem): subject, issuer, validity and days left. Reserved to the sys group.

admin
config cert
mentdb
[ { "file": "cert/cu_cert.pem", "subject": "CN=127.0.0.1", "not_after": "2031-10-29 10:00:00", "days_left": "1825" } ]
Used in use cases (1 recipe)

    System administrator & DevOps › Server inventory and security checks
Often used with

    ai firstname  ·  ai lastname  ·  function count  ·  json doc  ·  json iobject  ·  metric java vendor  ·  metric java version  ·  metric system architecture

kill <sessionId>


Description

    To kill a session

Parameters

    sessionId:   The session id - string - required
admin
kill 23
mentdb
1
Used in use cases (1 recipe)

    System administrator & DevOps › Maintenance window: lock, change the config, reopen
Often used with

    and  ·  config reload  ·  config set  ·  job scheduler restart  ·  log remove  ·  log trace  ·  log write  ·  maintenance get

kill_process <pid>


Description

    To kill a process from the stack

Parameters

    pid:   The process id - string - required
admin
kill_process 23a;
mentdb
The process will be stoped at the next MQL command ...
Used in use cases (1 recipe)

    Automation architect › Kill a runaway process of the stack
Often used with

    and  ·  date now  ·  script create  ·  script delete  ·  sequence add  ·  sequence get current  ·  sequence increment  ·  sequence remove