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
- 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 managertf-caddy-server.service
responsible for runningCaddy
tf-loggin-server.service
responsible for runninggunicorn
tf-redis-listern.service
responsible for runningredislistener
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.
/api/register
/api/heartbeat
/api/alert
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/")