Skip to main content
Skip table of contents

efutils

This utility is used for simplified solution administration via command line.


General Usage Details

You can this utility to perform following actions: 



login to login to a particular Docker service container using sh. The utility will list all the available Expertflow containers that a user can choose from.
serviceTo start, stop, kill, or restart a service container
profileup,down,restart a profile and all its services
logsshow logs from selected service
allperform up,down,restart on all deployed profiles
statusshow status of all services in short form
imagesList of Images with possible details
pullFetch latest images based on coreversion.env tags
infoSummarized details about this deployment
statsStatistics for all services replayed by an interval
configDisplay Configuration of the selected YAML Profile and its variables



General information

In all cases 'up' argument is implemented as 'up -d'



Login

efutils

BASH
$ efutils  login
 Please select Expertflow Service Container: 
 1) angry_rhodes		      			14) expertflow_file-engine_1
 2) expertflow_activemq_1	      		15) expertflow_keepalived
 3) expertflow_agent-gadget_1	    	16) expertflow_minio_1
 4) expertflow_bot-connector_1	    	17) expertflow_mongo_1
 5) expertflow_ccm_1		      		18) expertflow_mre_1
 6) expertflow_chat_1		      		19) expertflow_mre-frontend_1
 7) expertflow_comm-server_1	      	20) expertflow_mre-microservice_1
 8) expertflow_customer-gadget_1      	21) expertflow_mysql_1
 9) expertflow_database-connector_1   	22) expertflow_app-gateway_1
10) expertflow_eabc_1		      		23) expertflow_portainer_1
11) expertflow_ecm_1		      		24) expertflow_reporting-connector_1
12) expertflow_ecm-frontend_1	      	25) expertflow_umm_1
13) expertflow_ecm-services_1
Please select:12
trying login to expertflow_ecm-frontend_1 using sh
~ $ ls
e50x.html              assets1               docker-entrypoint.sh  index.html            localhost.key         nginx.conf.template   styles
app                   conf                  favicon.ico           localhost.crt         maps                  scripts               translations
~ $ exit
[root@devops32 ~]#


Service

BASH
$ efutils service
 Please select Expertflow Service Container: 
 1) angry_rhodes		      			14) expertflow_file-engine_1
 2) expertflow_activemq_1	      		15) expertflow_keepalived
 3) expertflow_agent-gadget_1	      	16) expertflow_minio_1
 4) expertflow_bot-connector_1	      	17) expertflow_mongo_1
 5) expertflow_ccm_1		      		18) expertflow_mre_1
 6) expertflow_chat_1		      		19) expertflow_mre-frontend_1
 7) expertflow_comm-server_1	      	20) expertflow_mre-microservice_1
 8) expertflow_customer-gadget_1      	21) expertflow_mysql_1
 9) expertflow_database-connector_1   	22) expertflow_app-gateway_1
10) expertflow_eabc_1		      		23) expertflow_portainer_1
11) expertflow_ecm_1		      		24) expertflow_reporting-connector_1
12) expertflow_ecm-frontend_1	      	25) expertflow_umm_1
13) expertflow_ecm-services_1
Please select:18
 Please select action for expertflow_mre_1  
1) up
2) down
3) restart
Please select: 3
Performing  restart   on  expertflow_mre_1 
using  /var/lib/expertflow/sds/docker-compose-ha-routing.yml  
docker-compose --env-file /var/lib/expertflow/coreversion.env -p expertflow -f /var/lib/expertflow/sds/docker-compose-ha-routing.yml restart mre
restart on expertflow_mre_1 performed successfully
[root@devops32 ~]# 



Profile

BASH
$ efutils  profile
 Please select Expertflow Service Profile 
1) ha-agent-gadget	 6) ha-db-connector	11) ha-routing
2) ha-amq		 7) ha-eabc		12) ha-service-gateway
3) ha-campaigns		 8) ha-hc-server	13) ha-umm
4) ha-ccm		 9) ha-mongo
5) ha-customer-gadget	10) ha-mysql
Please select:8
 Please select action for  ha-hc-server 
1) up
2) down
3) restart
4) ps
Please select:1
performing  up -d   operation on  ha-hc-server 
docker-compose -p expertflow --env-file /var/lib/expertflow/coreversion.env  -f /var/lib/expertflow/sds/docker-compose-ha-hc-server.yml  up -d
up -d on ha-hc-server performed successfully
[root@devops32 ~]#


logs


BASH
$ efutils  logs
 Please select Expertflow Service Container: 
 1) angry_rhodes		      14) expertflow_file-engine_1
 2) expertflow_activemq_1	      15) expertflow_keepalived
 3) expertflow_agent-gadget_1	      16) expertflow_minio_1
 4) expertflow_bot-connector_1	      17) expertflow_mongo_1
 5) expertflow_ccm_1		      18) expertflow_mre_1
 6) expertflow_chat_1		      19) expertflow_mre-frontend_1
 7) expertflow_comm-server_1	      20) expertflow_mre-microservice_1
 8) expertflow_customer-gadget_1      21) expertflow_mysql_1
 9) expertflow_database-connector_1   22) expertflow_app-gateway_1
10) expertflow_eabc_1		      23) expertflow_portainer_1
11) expertflow_ecm_1		      24) expertflow_reporting-connector_1
12) expertflow_ecm-frontend_1	      25) expertflow_umm_1
13) expertflow_ecm-services_1
Please select:16
Tailing logs for  expertflow_minio_1 
2020-09-03T11:21:28.157855787Z 
2020-09-03T11:21:28.158001932Z  You are running an older version of MinIO released 6 months ago 
2020-09-03T11:21:28.158016452Z  Update: docker pull minio/minio:RELEASE.2020-09-02T18-19-50Z 
2020-09-03T11:21:28.158024231Z 
2020-09-03T11:21:28.158031300Z 
2020-09-03T11:21:28.920812875Z Endpoint:  https://172.18.0.8:9000  https://127.0.0.1:9000
2020-09-03T11:21:28.920854599Z 
2020-09-03T11:21:28.920863793Z Browser Access:
2020-09-03T11:21:28.920871583Z    https://172.18.0.8:9000  https://127.0.0.1:9000
2020-09-03T11:21:28.920879324Z 
2020-09-03T11:21:28.920886677Z Object API (Amazon S3 compatible):
2020-09-03T11:21:28.921128410Z    Go:         https://docs.min.io/docs/golang-client-quickstart-guide
2020-09-03T11:21:28.921156832Z    Java:       https://docs.min.io/docs/java-client-quickstart-guide
2020-09-03T11:21:28.921165824Z    Python:     https://docs.min.io/docs/python-client-quickstart-guide
2020-09-03T11:21:28.921173849Z    JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
2020-09-03T11:21:28.921181683Z    .NET:       https://docs.min.io/docs/dotnet-client-quickstart-guide
2020-09-03T11:21:28.921190155Z 
2020-09-03T11:21:28.921197649Z Detected default credentials 'minioadmin:minioadmin', please change the credentials immediately using 'MINIO_ACCESS_KEY' and 'MINIO_SECRET_KEY'
^C



all


BASH
$efutils all
 Please select action for all  
1) up
2) down
3) restart
Please select: 1
Performing  up    on  all 
+--------------------------------+-------------+
| Profile                        |  Status     |
+--------------------------------+-------------+
| ha-agent-gadget                | OK          |
+--------------------------------+-------------+
| ha-amq                         | OK          |
+--------------------------------+-------------+
| ha-campaigns                   | OK          |
+--------------------------------+-------------+
| ha-ccm                         | OK          |
+--------------------------------+-------------+
| ha-customer-gadget             | OK          |
+--------------------------------+-------------+
| ha-db-connector                | OK          |
+--------------------------------+-------------+
| ha-eabc                        | OK          |
+--------------------------------+-------------+
| ha-hc-server                   | OK          |
+--------------------------------+-------------+
| ha-mongo                       | OK          |
+--------------------------------+-------------+
| ha-mysql                       | OK          |
+--------------------------------+-------------+
| ha-routing                     | OK          |
+--------------------------------+-------------+
| ha-service-gateway             | OK          |
+--------------------------------+-------------+
| ha-umm                         | OK          |
+--------------------------------+-------------+


status


BASH
$ efutils  status
+--------+-------------------------------------------+-----------------------------------------------------+
| #      |  Service                                ↓ |  Status                                             |
+--------+-------------------------------------------+-----------------------------------------------------+
|  1     | angry_rhodes                              |  Exited (0) 55 minutes ago                          |
+--------+-------------------------------------------+-----------------------------------------------------+
|  2     | expertflow_activemq_1                     |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  3     | expertflow_agent-gadget_1                 |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  4     | expertflow_bot-connector_1                |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  5     | expertflow_ccm_1                          |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  6     | expertflow_chat_1                         |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  7     | expertflow_comm-server_1                  |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  8     | expertflow_customer-gadget_1              |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  9     | expertflow_database-connector_1           |  Up 26 minutes (unhealthy)                          |
+--------+-------------------------------------------+-----------------------------------------------------+
|  10    | expertflow_eabc_1                         |  Up 27 minutes (unhealthy)                          |
+--------+-------------------------------------------+-----------------------------------------------------+
|  11    | expertflow_ecm_1                          |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  12    | expertflow_ecm-frontend_1                 |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  13    | expertflow_ecm-services_1                 |  Up 26 minutes                                      |
+--------+-------------------------------------------+-----------------------------------------------------+
|  14    | expertflow_file-engine_1                  |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  15    | expertflow_keepalived                     |  Up 28 minutes                                      |
+--------+-------------------------------------------+-----------------------------------------------------+
|  16    | expertflow_minio_1                        |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  17    | expertflow_mongo_1                        |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  18    | expertflow_mre_1                          |  Up 3 minutes (healthy)                             |
+--------+-------------------------------------------+-----------------------------------------------------+
|  19    | expertflow_mre-frontend_1                 |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  20    | expertflow_mre-microservice_1             |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  21    | expertflow_mysql_1                        |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  22    | expertflow_app-gateway_1                        |  Up 27 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  23    | expertflow_portainer_1                    |  Up 12 seconds                                      |
+--------+-------------------------------------------+-----------------------------------------------------+
|  24    | expertflow_reporting-connector_1          |  Up 26 minutes (healthy)                            |
+--------+-------------------------------------------+-----------------------------------------------------+
|  25    | expertflow_umm_1                          |  Up 27 minutes (unhealthy)                          |
+--------+-------------------------------------------+-----------------------------------------------------+


Pull


CODE
$ efutils pull
 reading /root/master/coreversion.env file for new changes
 Please select
1) agent-gadget       7) eabc             13) routing
2) amq                8) hc-server        14) service-gateway
3) campaigns          9) mongo            15) umm
4) ccm               10) mysql            16) all
5) customer-gadget   11) portainer
6) db-connector      12) reporting
Please select:1
performing  pull    operation on  agent-gadget
docker-compose -p expertflow --env-file /root/master/coreversion.env  -f /root/master/sds/docker-compose-agent-gadget.yml  pull
agent-gadget update performed  successfully
 details in /tmp/agent-gadget.pull.ef
code


info

CODE
$ efutils info
Deployed in...................: /root/master
Type Of Deployment............: single
Fully Qualified Domain Name...: qateam.expertflow.com
IP Address....................: 192.168.2.82
Bot Integrated................: NO
Deployment Branch.............: master


stats

In below given cases the lines are show red

1) Number of PIDs is greater than 50

OR

2) CPU Usage is greater than 50%

OR

3) Memory usage is greater than 50%

CODE
$ efutils stats
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| NAME                                | %CPU   | MEM_USAGE  | MEM_LIMIT  | %MEM        | NET_IN     | NET_OUT    | BLOCK_IN   | BLOCK_OUT  | PIDS  |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_ccm_1                    | 0.08% | 76.5MiB    | 7.638GiB   | 0.98%       | 162kB      | 101kB      | 0B         | 0B         | 44    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_bot-connector_1          | 0.31% | 28.64MiB   | 128MiB     | 22.37%      | 494kB      | 706kB      | 98.3kB     | 0B         | 11    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_umm_1                    | 0.11% | 388.8MiB   | 1GiB       | 37.97%      | 47.4MB     | 40.1MB     | 65.8MB     | 41kB       | 76    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_app-gateway_1                  | 0.69% | 7.414MiB   | 128MiB     | 5.79%       | 54.5MB     | 60.7MB     | 1.62MB     | 11.3kB     | 3     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_mre_1                    | 0.83% | 490.6MiB   | 7.638GiB   | 6.27%       | 1.21MB     | 2.11MB     | 586kB      | 0B         | 32    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_mre-microservice_1       | 0.00% | 61.35MiB   | 128MiB     | 47.93%      | 3.46MB     | 1.11MB     | 4.2MB      | 0B         | 12    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_mre-frontend_1           | 0.00% | 3.281MiB   | 80MiB      | 4.10%       | 3.89kB     | 0B         | 8.19kB     | 0B         | 6     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_comm-server_1            | 1.03% | 130.9MiB   | 7.638GiB   | 1.67%       | 14.5MB     | 7.21MB     | 2.96MB     | 0B         | 42    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_reporting-connector_1    | 0.03% | 42.89MiB   | 128MiB     | 33.51%      | 3.64MB     | 4.58MB     | 7.04MB     | 0B         | 11    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_portainer_1              | 0.00% | 7.152MiB   | 7.638GiB   | 0.09%       | 8.54kB     | 1.83kB     | 0B         | 344kB      | 11    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_mysql_1                  | 0.06% | 84.03MiB   | 512MiB     | 16.41%      | 42.5MB     | 55.6MB     | 2.24MB     | 2.37GB     | 51    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_mongo_1                  | 0.33% | 18.72MiB   | 256MiB     | 7.31%       | 1.91MB     | 1.76MB     | 23.3MB     | 15.7MB     | 34    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_file-engine_1            | 0.00% | 22.04MiB   | 128MiB     | 17.22%      | 8.84kB     | 3kB        | 1.29MB     | 0B         | 12    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_chat_1                   | 1.37% | 82.48MiB   | 7.638GiB   | 1.05%       | 33MB       | 17.7MB     | 0B         | 0B         | 12    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_minio_1                  | 0.01% | 31.96MiB   | 128MiB     | 24.97%      | 13.8kB     | 6.29kB     | 1.97MB     | 38.9MB     | 13    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_eabc_1                   | 0.13% | 457.5MiB   | 512MiB     | 89.35%      | 967kB      | 641kB      | 54.6MB     | 192MB      | 74    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_database-connector_1     | 0.61% | 32.1MiB    | 128MiB     | 25.08%      | 1.27MB     | 1.15MB     | 5.21MB     | 0B         | 12    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_customer-gadget_1        | 0.00% | 3.309MiB   | 80MiB      | 4.14%       | 161kB      | 359kB      | 32.8kB     | 0B         | 6     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_ecm-frontend_1           | 0.00% | 2.105MiB   | 80MiB      | 2.63%       | 4.82kB     | 0B         | 217kB      | 0B         | 4     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_ecm-services_1           | 0.18% | 43.62MiB   | 512MiB     | 8.52%       | 2.54MB     | 354kB      | 6.37MB     | 0B         | 25    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_ecm_1                    | 0.23% | 475.1MiB   | 512MiB     | 92.79%      | 1.38MB     | 684kB      | 249MB      | 193MB      | 69    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_activemq_1               | 1.07% | 110.7MiB   | 7.638GiB   | 1.42%       | 7.93MB     | 7.98MB     | 12.9MB     | 195MB      | 80    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| expertflow_agent-gadget_1           | 0.00% | 3.352MiB   | 80MiB      | 4.19%       | 78.4kB     | 2.93MB     | 0B         | 0B         | 6     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_nginx_1                      | 0.00% | 8.348MiB   | 7.638GiB   | 0.11%       | 7.36MB     | 3.4MB      | 0B         | 0B         | 5     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_app_1                        | 0.00% | 22.18MiB   | 7.638GiB   | 0.28%       | 25kB       | 138B       | 9.84MB     | 138kB      | 2     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_rasa-worker_1                | 0.37% | 298.4MiB   | 7.638GiB   | 3.82%       | 10MB       | 12.9MB     | 392MB      | 0B         | 11    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_rasa-production_1            | 0.34% | 206.1MiB   | 7.638GiB   | 2.63%       | 13.2MB     | 14MB       | 217MB      | 0B         | 9     |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_rasa-x_1                     | 0.98% | 368.5MiB   | 7.638GiB   | 4.71%       | 61.5MB     | 64.7MB     | 277MB      | 0B         | 100   |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_db_1                         | 0.25% | 47.66MiB   | 7.638GiB   | 0.61%       | 40MB       | 37.5MB     | 90.2MB     | 135MB      | 19    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_duckling_1                   | 0.00% | 22.98MiB   | 7.638GiB   | 0.29%       | 24.9kB     | 0B         | 0B         | 0B         | 11    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+
| docker_rabbit_1                     | 0.23% | 96.81MiB   | 7.638GiB   | 1.24%       | 2.7MB      | 3.56MB     | 89.5MB     | 1.91MB     | 92    |
+-------------------------------------+-------+------------+------------+-------------+-----------+------------+------------+------------+--------+


config


CODE
$efutils config
 Please select Expertflow Service Profile
1) agent-gadget       6) db-connector     11) portainer
2) amq                7) eabc             12) reporting
3) campaigns          8) hc-server        13) routing
4) ccm                9) mongo            14) service-gateway
5) customer-gadget   10) mysql            15) umm
Please select:15
 umm  Config

docker-compose -p expertflow --env-file /root/master/coreversion.env -f /root/master/sds/docker-compose-umm.yml  config

networks:
  chat-solution:
    external: true
    name: chat-solution
services:
  umm:
    cpu_period: 20000
    cpu_quota: 50000
    cpu_shares: 73
    cpuset: 0,1,2,3
    environment:
      ADMIN_PASS: admiN123!
      AGENTS_UPDATE_NOTIFICATIONS: "false"
      AMQ_PRIM: activemq:61616
      AMQ_SEC: activemq:61616
      FINESSE_PASS: Expertflow464
      FINESSE_USER: administrator
      PRIM_FINESSE_IP: https://finesse116.ucce.ipcc
      SEC_FINESSE_IP: ''
      SERVER_URL: https://qateam.expertflow.com
      SOO_AUTO_LOGIN: "false"
      SSO_ENABLED: "false"
      SUP_VERSION: '13.1'
      TOPIC_NAME: umm
      TZ: Asia/Karachi
      UMM_DB_DIALECT: org.hibernate.dialect.MySQL5InnoDBDialect
      UMM_DB_DRIVER: com.mysql.jdbc.Driver
      UMM_DB_PASS: root
      UMM_DB_URL: jdbc:mysql://mysql:3306/umm
      UMM_DB_USER: root
    healthcheck:
      interval: 90s
      retries: 10
      test: wget --no-check-certificate -q --spider https://localhost:8443 || exit
        1
      timeout: 10s
    image: gitlab.expertflow.com:9242/chat-solution/user-management:13.2.1.RBI-256
    init: true
    mem_limit: 1024m
    mem_reservation: 1024m
    memswap_limit: 2048m
    networks:
      chat-solution: null
    pids_limit: -1
    ports:
    - 8452:8443/tcp
    privileged: true
    restart: on-failure:5
    volumes:
    - /root/master/docker/certificates:/opt/apache-tomcat-8.5.41/webapps/umm/base/https:rw
version: '2.4'




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.