Innov-AI     Services     Supporters     Contact     About    
Cluster

Execute MQL scripts throught a cluster of MentDB server.

cluster showcluster createcluster existcluster deletecluster signal processcluster signal deploycluster signal setcluster signal deletecluster signal showcluster signal remote_showcluster signal givecluster node setcluster nodes show_objcluster nodes show_txtcluster node deletecluster node expelscluster execute_hotcluster executecluster node reinstatecluster node generate_setcluster node

cluster show


Description

    To show all clusters

admin
cluster show;
mentdb
[ "cluster_id_2", "cluster_id_1" ]

cluster create <clusterId>


Description

    To create a new cluster

Parameters

    clusterId:   The cluster id - string - required
admin
cluster create "cluster_id_1";
mentdb
Cluster created with successful.

cluster exist <clusterId>


Description

    To check if a cluster already exist

Parameters

    clusterId:   The cluster id - string - required
admin
cluster exist "cluster_id_1";
mentdb
1

cluster delete <clusterId>


Description

    To delete a cluster

Parameters

    clusterId:   The cluster id - string - required
admin
cluster delete "cluster_id_2";
mentdb
Cluster deleted with successful.

cluster signal process


Description

    To send signals to agents

admin
signal process;
mentdb
1

cluster signal deploy <clusterId> <hostname> <port> <user> <user_key> <password> <connectTimeout> <readTimeout> <mql_signal>


Description

    To deploy all signals to all nodes

Parameters

    clusterId:   The cluster id - string - required
    hostname:   The hostname - string - required
    port:   The port - string - required
    user:   The user - string - required
    user_key:   The user key - string - required
    password:   The password - string - required
    connectTimeout:   Connect timeout - string - required
    readTimeout:   Read timeout - string - required
    mql_signal:   MQL signal (return a number) - string - required
admin
signal deploy "cluster_id_1" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 "metric current cpu jvm;"
mentdb
ok/set/cluster_id_1/node_id_3 ok/set/cluster_id_1/node_id_4 ok/set/cluster_id_1/node_id_1 ok/set/cluster_id_1/node_id_2

cluster signal set <clusterId> <nodeId> <hostname> <port> <user> <user_key> <password> <connectTimeout> <readTimeout> <mql_signal>


Description

    To set a new signal into a node

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
    hostname:   The hostname - string - required
    port:   The port - string - required
    user:   The user - string - required
    user_key:   The user key - string - required
    password:   The password - string - required
    connectTimeout:   Connect timeout - string - required
    readTimeout:   Read timeout - string - required
    mql_signal:   MQL signal (return a number) - string - required
admin
cluster signal set "cluster_id_1" "node_id_1" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 "metric current cpu jvm;"
mentdb
Signal added/updated with successful.

cluster signal delete <clusterId> <nodeId>


Description

    To delete a signal from a node

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
admin
cluster signal delete "cluster_id_1" "node_id_1"
mentdb
Signal deleted with successful.

cluster signal show <clusterId>


Description

    To show all signals from a node for a specific cluster

Parameters

    clusterId:   The cluster id - string - required
admin
cluster signal show "cluster_id_1"
mentdb
CLUSTER_ID / NODE_ID / USER@HOSTNAME:PORT / CONNECT_TIMEOUT / READ_TIMEOUT / MQL_SIGNAL / LAST_TIME : ERROR cluster_id_1 / node_id_3 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:58:07 : cluster_id_1 / node_id_4 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:58:07 : cluster_id_1 / node_id_1 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:58:07 : cluster_id_1 / node_id_2 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:58:07 :

cluster signal remote_show <clusterId>


Description

    To show all remote signals from a node for a specific cluster

Parameters

    clusterId:   The cluster id - string - required
admin
signal remote_show "cluster_id_1"
mentdb
ok/CLUSTER_ID / NODE_ID / USER@HOSTNAME:PORT / CONNECT_TIMEOUT / READ_TIMEOUT / MQL_SIGNAL / LAST_TIME : ERROR cluster_id_1 / node_id_3 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_4 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_1 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / : cluster_id_1 / node_id_2 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / : ok/CLUSTER_ID / NODE_ID / USER@HOSTNAME:PORT / CONNECT_TIMEOUT / READ_TIMEOUT / MQL_SIGNAL / LAST_TIME : ERROR cluster_id_1 / node_id_3 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_4 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_1 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_2 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / : ok/CLUSTER_ID / NODE_ID / USER@HOSTNAME:PORT / CONNECT_TIMEOUT / READ_TIMEOUT / MQL_SIGNAL / LAST_TIME : ERROR cluster_id_1 / node_id_3 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_4 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_1 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_2 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : ok/CLUSTER_ID / NODE_ID / USER@HOSTNAME:PORT / CONNECT_TIMEOUT / READ_TIMEOUT / MQL_SIGNAL / LAST_TIME : ERROR cluster_id_1 / node_id_3 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_4 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_1 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 : cluster_id_1 / node_id_2 / admin@localhost:9998 / 10000 / 30000 / metric current cpu jvm; / 2019-07-01 09:57:47 :

cluster signal give <clusterId> <nodeId> <signal> <current_time>


Description

    To give a signal to an agent

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
    signal:   The signal (a number) - number - required
    current_time:   The current time - string - required
admin
cluster signal give "cluster_id_1" "node_id_1" 52 "2019-06-18 10:21:56"
mentdb
1

cluster node set <clusterId> <nodeId> <hostname> <port> <user> <user_key> <password> <connectTimeout> <readTimeout> <active_signal>


Description

    To set a new node into a cluster

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
    hostname:   The hostname - string - required
    port:   The port - string - required
    user:   The user - string - required
    user_key:   The user key - string - required
    password:   The password - string - required
    connectTimeout:   Connect timeout - string - required
    readTimeout:   Read timeout - string - required
    active_signal:   Is an auto active signal node - boolean - required
admin
cluster node set "cluster_id_1" "node_id_1" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true; cluster node set "cluster_id_1" "node_id_2" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true; cluster node set "cluster_id_1" "node_id_3" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true; cluster node set "cluster_id_1" "node_id_4" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true;
mentdb
Node added/updated with successful.

cluster nodes show_obj <clusterId>


Description

    To show all nodes from a cluster in an array format

Parameters

    clusterId:   The cluster id - string - required
admin
cluster nodes show_obj "cluster_id_1"
mentdb
{ "node_id_3": { "in_the_cluster": "1", "active_signal": "1", "signal_last_time": "2019-06-30 09:35:45", "user_key": "pwd", "error": "", "cluster_id": "cluster_id_1", "hostname": "localhost", "password": "pwd", "port": "9998", "readTimeout": "30000", "connectTimeout": "10000", "signal": "0.2", "user": "admin", "node_id": "node_id_3" }, "node_id_4": { "in_the_cluster": "1", "active_signal": "1", "signal_last_time": "2019-06-30 09:35:45", "user_key": "pwd", "error": "", "cluster_id": "cluster_id_1", "hostname": "localhost", "password": "pwd", "port": "9998", "readTimeout": "30000", "connectTimeout": "10000", "signal": "35.1", "user": "admin", "node_id": "node_id_4" }, "node_id_1": { "in_the_cluster": "1", "active_signal": "1", "signal_last_time": "2019-06-30 09:35:45", "user_key": "pwd", "error": "", "cluster_id": "cluster_id_1", "hostname": "localhost", "password": "pwd", "port": "9998", "readTimeout": "30000", "connectTimeout": "10000", "signal": "57.0", "user": "admin", "node_id": "node_id_1" }, "node_id_2": { "in_the_cluster": "1", "active_signal": "1", "signal_last_time": "2019-06-30 09:35:45", "user_key": "pwd", "error": "", "cluster_id": "cluster_id_1", "hostname": "localhost", "password": "pwd", "port": "9998", "readTimeout": "30000", "connectTimeout": "10000", "signal": "57.5", "user": "admin", "node_id": "node_id_2" } }

cluster nodes show_txt <clusterId>


Description

    To show all nodes from a cluster in text format

Parameters

    clusterId:   The cluster id - string - required
admin
cluster nodes show_txt "cluster_id_1"
mentdb
IN_THE_CLUSTER / ACTIVE_SIGNAL / CLUSTER_ID / NODE_ID / USER@HOSTNAME:PORT / CONNECT_TIMEOUT / READ_TIMEOUT / SIGNAL / LAST_TIME / NB_CMD : ERROR 1 / 0 / cluster_id_1 / node_id_3 / admin@localhost:9998 / 10000 / 30000 / 0.2 / 2019-07-01 09:41:07 / 11 : 1 / 0 / cluster_id_1 / node_id_4 / admin@localhost:9998 / 10000 / 30000 / 35.0 / 2019-07-01 09:41:07 / 0 : 1 / 0 / cluster_id_1 / node_id_1 / admin@localhost:9998 / 10000 / 30000 / 58.8 / 2019-07-01 09:41:07 / 0 : 1 / 0 / cluster_id_1 / node_id_2 / admin@localhost:9998 / 10000 / 30000 / 57.0 / 2019-07-01 09:41:07 / 0 :

cluster node delete <clusterId> <nodeId>


Description

    To delete a node from a cluster

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
admin
cluster node delete "cluster_id_1" "node_id_1";
mentdb
Node deleted with successful.

cluster node expels <clusterId> <nodeId> <error>


Description

    To expels a node from a cluster

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
    error:   The error message - string - required
admin
cluster node expels "cluster_id_1" "node_id_1" "error message ...";
mentdb
1

cluster execute_hot


Description

    Execute a MQL command in hot throught a cluster.

admin
-> "[local_var1]" "data1"; -> "[local_var2]" "data2"; include "cluster.1n.hot.exe" "[cluster_id]" "cluster_id_1" "[method]" "LB_50_50|SIGNAL" "[tunnel_id]" "tunnel_id_1" "[request]" (concat "-> \"[remote_var1]\" " (mql encode [local_var1]) ";" "-> \"[remote_var2]\" " (mql encode [local_var2]) ";" (mql { concat [remote_var1] ":" [remote_var2] }) ) ;
mentdb
data1:data2

cluster execute


Description

    Execute a MQL command throught a cluster.

admin
-> "[local_var1]" "data1"; -> "[local_var2]" "data2"; execute "cluster.1n.exe" "[cluster_id]" "cluster_id_1" "[method]" "LB_50_50|SIGNAL" "[request]" (concat "-> \"[remote_var1]\" " (mql encode [local_var1]) ";" "-> \"[remote_var2]\" " (mql encode [local_var2]) ";" (mql { concat [remote_var1] ":" [remote_var2] }) ) ;
mentdb
data1:data2

cluster node reinstate <clusterId> <nodeId>


Description

    To reinstate a node from a cluster

Parameters

    clusterId:   The cluster id - string - required
    nodeId:   The node id - string - required
admin
cluster node reinstate "cluster_id_1" "node_id_1"
mentdb
1

cluster node generate_set <clusterId>


Description

    To generate a set MQL code for set a node into a cluster

Parameters

    clusterId:   The cluster id - string - required
admin
in editor {cluster node generate_set "cluster_id_1"};
mentdb
cluster node set "cluster_id_1" "node_id_3" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true; cluster node set "cluster_id_1" "node_id_4" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true; cluster node set "cluster_id_1" "node_id_1" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true; cluster node set "cluster_id_1" "node_id_2" "localhost" "9998" "admin" "pwd" "pwd" 10000 30000 true;

cluster node <clusterId> <method>


Description

    To get a cluster node

Parameters

    clusterId:   The cluster id - string - required
    method:   The method (LB_50_50|SIGNAL) - string - required
admin
cluster node "cluster_id_1" "LB_50_50"
mentdb
{ "subTunnels": "[MQL_TO_REPLACE]", "hostname": "localhost", "password": "pwd", "cluster_id": "cluster_id_1", "port": "9998", "readTimeout": "30000", "connectTimeout": "10000", "type": "mentdb", "user": "admin", "cluster_method": "lb_50_50", "key": "pwd", "node_id": "node_id_3" }




© 2012 - 2023