Sign inSign up

itgainis/s4dbs_frontend

By itgainis

•Updated 3 months ago

Speedgain for Databases Frontend

Image
1

100K+

itgainis/s4dbs_frontend repository overview

⁠Speedgain for Databases - The all in one monitoring solution

⁠Features

  • Save costs with a central monitoring solution for different operating systems and databases
  • Save time with agentless monitoring of Db2, PostgreSQL, SQL Server, Oracle, Azure SQL Database and Linux (more to come)
  • Increase monitoring efficiency with custom dashboards that fits every need
  • Minimize configuration complexity through policy-based monitoring
  • Save time with a scalable and performant data repository, designed for time-series data

⁠PreReqs

  1. a valid license file is needed (get it at speedgain.com⁠)
  2. any platform that can run docker-compose files
  3. some cores, some ram and some bytes to store data
  4. free ports 80 (or 443 if SSL should be used) to access the web services needed (5432 for postgresql/timescale is optional)
  5. a modern web browser

This Image can't be run in on its own. It has to be executed in a compose with 4 other images (all available on docker hub). The list of all 5 images:

  1. Speedgain timescale - as the repository to store all performance metrics
  2. Speedgain Collector - the core component to pull metrics
  3. Speedgain Service - rest api service
  4. Speedgain Frontend - Configuration Web-Frontend
  5. Speedgain Grafana - Delivering all needed dashboards
  6. NginX - as reverse proxy

⁠How To Start

  1. Get at least a trial license via speedgain.com
  2. create a a new folder with the name you want your speedgain service to run as (e.g. "speedgain")
  3. create a folder named "configuration" in it
  4. copy the nginx.conf file from out website in the configuration folder (nginx.conf at speedgain.info)⁠
  5. create and adjust the docker-compose file (see below) to fit your needs - at least set the postgres password)
  6. optional if you do not have direct access to docker hub: download images from our download portal and transfer to desired system and load via
docker load --input s4dbs_v<version>_all_images.tar.gz
  1. start all sevices via (will create all containers for you)
docker-compose up -d
  1. open a web browser and navigate to http://<DockerHostHostname>:80/
  2. login with admin/admin (default user and pw)

⁠How To enable SSL

Please do the following steps before you start all services under point 7 from the chapter above.

  1. If you want to enable SSL you need first a .crt and a .key file with your SSL certificate data in it.
  2. In the folder of you speedgain service (e.g. "speedgain" from Chapter "How to Start"), create a folder named "ssl".
mkdir ssl
  1. copy your .crt and .key file into the "ssl" folder.
cp company_ssl.key ./ssl/ssl_cert.key
cp company_ssl.crt ./ssl/ssl_cert.crt
  1. open the nginx.conf file in the configuration folder and look for the following line and enable the 4 configuration lines:
...
  server {
...
#SSL Config
# Enable the following 4 lines if SSL should be activated:
#    listen 443 ssl http2;
#    listen [::]:443 ssl http2;
#    ssl_certificate_key /etc/ssl/ssl_cert.key;
#    ssl_certificate     /etc/ssl/ssl_cert.crt;

Then save your changes and close the file.

  1. Next open the docker-compose.yml file and look for the following lines:
  ...
  s4dbs_frontend:
  ...
    environment:
      - FRONTEND_CONFIG_MODE=false
      - SERVICE_PROTOCOL=http                              #use http or https
      - SERVICE_HOST=<enter container host hostname here>
      - SERVICE_PORT=80                                    #use 80 or 443
      - GRAFANA_PROTOCOL=http                              #use http or https
      - GRAFANA_HOST=<enter container host hostname here>
      - GRAFANA_PORT=80/grafana                            #use 80 or 443
 ...

Change the port from "80" to "443" and the protocol name from "http" to "https". Further down, activate these lines too:

  ...
  s4dbs_reverse:
  ...
    ports:
      - "80:80"      # Disable this line when SSL should be used
      #- "443:443"   # Enable this line to activate SSL
    ...
    volumes:
      - ./configuration/nginx.conf:/etc/nginx/nginx.conf           # Enable SSL in this config file
      #- ./ssl/ssl_cert.key:/etc/ssl/ssl_cert.key    # Enable this line to activate SSL
      #- ./ssl/ssl_cert.crt:/etc/ssl/ssl_cert.crt    # Enable this line to activate SSL

The SSL certificate files need to be mounted inside of the NginX container and the port "443" needs to be exposed. On the other hand port "80" must be not exposed.

  1. after doing all configurations above you can start all services as explained under point 7 from chapter "How to Start"

⁠Documentation, Help and Support

⁠Image Infos

⁠Persistent Storage

Speedgain for Databases has two persistent Volumes.

  1. s4dbs_postgres - the volume for the timescale container to store performance and configuration data in
  2. s4dbs_grafana - to store persinstent objects from grafana
⁠Customization Option
  1. Logging is set to 10m per file and max files 5 for each container. adjust based on your needs
  2. all containers will restart automatically if the fail or after a system restart (if the container service itself will restart)
  3. ports can be adjusted but maybe some config has to be changed as well - ask support for more detail and assistance
  4. port forwarding for postgresql is optional and not needed for the services to run correctly

⁠Docker Compose

Use following docker-compose to deploy Speedgain for Databases:

version: "3.9"

services:
  s4dbs_postgres:
    image: itgainis/s4dbs_timescaledb:<Version>
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "5"
    volumes: 
      - s4dbs_postgres:/var/lib/postgresql/data
    ports: 
      - "5432:5432"
    environment: 
      - POSTGRES_PASSWORD=<PasswordOfPostgresUser> 
    privileged: true
  s4dbs_collector:
    image: itgainis/s4dbs_collector:<Version>
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "5"
    environment:    
      - PDB_USER=postgres
      - PDB_PASS=<PasswordOfPostgresUser_specified_in_s4dbs_postgres_section>
      - PDB_HOST=s4dbs_postgres
      - PDB_PORT=5432
      - PDB_DB_NAME=speedgain
      - SPGLOGLEVEL=INFO
    privileged: true
    depends_on:
      - s4dbs_postgres
  s4dbs_service:
    image: itgainis/s4dbs_service:<Version>
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "5"
    environment: 
      - PDB_USER=postgres
      - PDB_PASS=<PasswordOfPostgresUser_specified_in_s4dbs_postgres_section>
      - PDB_HOST=s4dbs_postgres
      - PDB_PORT=5432
      - PDB_DB_NAME=speedgain
      - PDB_PROPERTIES=
      - SPGDB_SERVICE_HOME=/opt/spgdb_service_home/
    privileged: true
    depends_on:
      - s4dbs_postgres
  s4dbs_grafana:
    image: itgainis/s4dbs_grafana:<Version>
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "5"
    volumes: 
      - s4dbs_grafana:/var/lib/grafana
      #- <localPathToCustomBoardsOrVolume>:/s4dbs_custom_boards # valid json files will be provisioned via script into S4DBs - Custom Folder
    environment:
      - PDB_USER=postgres
      - PDB_PASS=<PasswordOfPostgresUser_specified_in_s4dbs_postgres_section>
      - PDB_HOST=s4dbs_postgres
      - PDB_PORT=5432
      - PDB_DB_NAME=speedgain
      - GF_SERVER_SERVE_FROM_SUB_PATH=true
      - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:%(http_port)s/grafana/
    privileged: true
    depends_on:
      - s4dbs_postgres
  s4dbs_frontend:
    image: itgainis/s4dbs_frontend:<Version>
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "5"
    environment:
      - frontendConfigMode=false
    privileged: true
    depends_on:
      - s4dbs_postgres
  s4dbs_reverse:
    image: nginx:1.23
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: 10m
        max-file: "5"
    ports:
      - "80:80"     # Disable this line when SSL should be used
      #- "443:443"   # Enable this line to activate SSL
    depends_on:
      - s4dbs_grafana
      - s4dbs_frontend
      - s4dbs_service
    volumes:
      - ./configuration/nginx.conf:/etc/nginx/nginx.conf           # Enable SSL in this config file
      #- ./ssl/ssl_cert.key:/etc/ssl/ssl_cert.key    # Enable this line to activate SSL
      #- ./ssl/ssl_cert.crt:/etc/ssl/ssl_cert.crt    # Enable this line to activate SSL
volumes: 
  s4dbs_postgres:
  s4dbs_grafana:
  #s4dbs_grafana_custom_boards: #only needed if custom boards volume is used in grafana section

Tag summary

Content type

Image

Digest

sha256:a8fe8bc5f…

Size

157.9 MB

Last updated

3 months ago

docker pull itgainis/s4dbs_frontend:2.3.0