Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

threefoldtecharchive/vdc-logger

Repository files navigation

Introduction

A monitoring solution for VDC's 3bots, provides:

  • Monitoring

    • Logs
    • Alerts
    • Heartbeats
  • Real time visualization using Grafana

This will help adminstration team to monitor the running 3bots for our clients

Installation

  • Set the REDISPASSWORD environment variable to be used as redis password.
  • Get install.sh bash file and run
export REDISPASSWORD=supersecret

sudo apt-get install curl -y

curl -Lo install.sh https://raw.githubusercontent.com/OmarElawady/vdc-logger/main/install.sh  

bash install.sh <DOMAIN_NAME>

After running the previous command, you will get:

  • redis server
  • influxdb
  • Grafana server
  • Flask running in production using gunicorn
  • redislistener process to get the logs
  • Caddy server to issue https certificate and serve our endpoints on /api and Grafana server on /
  • Our services running using systemctl service manager
    • tf-caddy-server.service responsible for running Caddy
    • tf-loggin-server.service responsible for running gunicorn
    • tf-redis-listern.service responsible for running redislistener

After Installation

  • Grafana will be available on: <DOMAIN_NAME>
  • API endpoints will be available on: <DOMAIN_NAME>/api/<END_POINT>

Note: You can login to grafana with admin as user and pass. MAke sure to change it.

Available endpoints

  • /api/register
  • /api/heartbeat
  • /api/alert

Enabling VDC 3bot monitoring

Add these configurations to your 3bot, after replacing supersecret with the redis password you set earlier.

redis_config = {"channel_type":"redis","channel_host":":supersecret@<DOMAIN_NAME>","channel_port":"6379"}                                                            
j.config.set("VDC_LOG_CONFIG",redis_config)    
j.config.set("MONITORING_SERVER_URL","https://<DOMAIN_NAME>/3bot/api/")

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •