SACM backend log analysis using elastic stack
10K+
If you experience problems during Elasticsearch startup, make sure the max_map_count is set to a value >= 262144 by running sysctl -w vm.max_map_count=262144 as root. Rebooting the machine will reset the value.
To make the setting permanent, add the line vm.max_map_count=262144 to the file /etc/sysctl.conf, then reload the configuration by running sysctl -p. You can verify everything worked by executing sysctl vm.max_map_count afterwards.
| Value | Description |
|---|---|
SACM_ANALYTICS_JDBC_LOGS | JDBC string to the mySQL DB that contains the SACM REST logs. May not contain user credentials. Example: jdbc:mysql://<ip or hostname>:<port>/<database-name> |
SACM_ANALYTICS_JDBC_LOGS_USER | Username to use for accessing SACM REST logs DB. |
SACM_ANALYTICS_JDBC_LOGS_PASSWORD | Password to use for accessing SACM REST logs DB. |
SACM_ANALYTICS_JDBC_DATA | JDBC string to the mySQL DB that contains the SACM Case data. May not contain user credentials. Example: jdbc:mysql://<ip or hostname>:<port>/<database-name> |
SACM_ANALYTICS_JDBC_DATA_USER | Username to use for accessing SACM Case data DB. |
SACM_ANALYTICS_JDBC_DATA_PASSWORD | Password to use for accessing SACM Case data DB. |
SACM_ANALYTICS_JDBC_MESSAGES | JDBC string to the mySQL DB that contains the patient-professional messages. May not contain user credentials. Example: jdbc:mysql://<ip or hostname>:<port>/<database-name> |
SACM_ANALYTICS_JDBC_MESSAGES_USER | Username to use for accessing patient-professional messages DB. |
SACM_ANALYTICS_JDBC_MESSAGES_PASSWORD | Password to use for accessing patient-professional messages DB. |
SACM_ANALYTICS_KIBANA_USER | Username the users will have to enter for accessing the Kibana Web Interface. |
SACM_ANALYTICS_KIBANA_PASSWORD | Password the users will have to enter for accessing the Kibana Web Interface. |
SACM_ANALYTICS_KIBANA_BASE_PATH (optional) | Enables you to specify a path to mount Kibana at if you are running behind a proxy. The proxy is expected to remove the base path before passing the request on to Kibana. |
LOGSTASH_START (optional) | Flag to toggle Logstash startup. Prevents Logstash from starting if set to anything other than 1, useful for debugging import problems. |
The container requires 4 volumes for storing data. If you do not provide these folders as volumes, you will loose data when pulling or building a new container version.
| Path | Description |
|---|---|
/var/lib/elasticsearch | contains data by Elasticsearch |
/opt/logstash/data | contains data by Logstash |
/opt/kibana/data | contains data by Kibana |
/var/backups | contains backup data created using the Snapshot and Restore process |
Optionally, you can provide 4 additional volumes to gain access to the internal log files:
| Path | Description |
|---|---|
/var/lib/elasticsearch | contains Elasticsearch application logs |
/opt/logstash/data | contains Logstash application logs and redirected stdout |
/opt/kibana/data | contains Kibana application and access logs (authenticated access, non-exposed port) |
/var/log/nginx | contains nginx access logs (public access, exposed port) |
Make sure you followed the instructions in Configuration to set up variables and volumes.
If you are starting the image for the first time, follow the instructions in section First Run to make sure everything is set up correctly.
After starting the container for the first time, you need to manually import all saved objects to Kibana.
To do so, open the Kibana Web interface, navigate to Management -> Kibana -> Saved Objects, click on "Import" and select the file kibana_saved_objects.json from the backup folder of this repository.
Replace <local_base_volume> with the path to the base folder that will contain all mounted volumes.
sacm.analytics:
image: connecare/sacm.analytics:latest
container_name: sacm.analytics
ports:
- "5602:5602"
networks:
- "xcarebackend"
environment:
- SACM_ANALYTICS_JDBC_LOGS=jdbc:mysql://sacm.mysql:3306/sacmlog
- SACM_ANALYTICS_JDBC_LOGS_USER=root
- SACM_ANALYTICS_JDBC_LOGS_PASSWORD=example123
- SACM_ANALYTICS_JDBC_DATA=jdbc:mysql://sacm.mysql:3306/sacmdata
- SACM_ANALYTICS_JDBC_DATA_USER=root
- SACM_ANALYTICS_JDBC_DATA_PASSWORD=example123
- SACM_ANALYTICS_JDBC_MESSAGES=jdbc:mysql://sacm.mysql:3306/patientmessages
- SACM_ANALYTICS_JDBC_MESSAGES_USER=root
- SACM_ANALYTICS_JDBC_MESSAGES_PASSWORD=example123
- SACM_ANALYTICS_KIBANA_USER=root
- SACM_ANALYTICS_KIBANA_PASSWORD=example123
volumes:
# Required volumes
- <local_base_volume>/data/elasticsearch:/var/lib/elasticsearch
- <local_base_volume>/data/logstash:/opt/logstash/data
- <local_base_volume>/data/kibana:/opt/kibana/data
- <local_base_volume>/backups:/var/backups
# Optional volumes
- <local_base_volume>/logs/elasticsearch:/var/log/elasticsearch
- <local_base_volume>/logs/logstash:/var/log/logstash
- <local_base_volume>/logs/kibana:/var/log/kibana
- <local_base_volume>/logs/nginx:/var/log/nginx
TBD
(https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html)
Content type
Image
Digest
Size
657.2 MB
Last updated
almost 8 years ago
docker pull connecare/sacm.analytics