RHMAP Monitoring
uses InfluxDB
and Grafana
to generate graphs of system statistics for RHMAP
cloud apps / services. It is a Docker
based solution which could be deployed to any containerised infrastructure.
InfluxDB
is a time series based Database which accepts data through a UDP port and Grafana
is data visualisation tool which draws pretty graphs with time based queries.
Following docker components will be included:
- nginx
- influxdb
- grafana
- 2 GB memory
- 2 cores
- 30 GB Disk Space -- according to retention policy
- Docker > 1.11.0
- Firewall (see below)
docker-compose.yml
: Config containers like data storage (volume) / log size / ports / quota etcnginx/default.conf
: Config domain name (see below) / use of https (if needed) / simple auth etcinfluxdb/config.toml
: Config influxdb see details here
It is able to use the stack without any modification.
Following ports should be accessible (with default config):
- 80: For portal http access
- 2003/UDP: For RHMAP cloud app sending statistic data to influxdb
By default, data will be stored in /rhmap
folder. This can be changed in docker-compose.yml
file.
By default, bounded domain names are:
grafana.rhmapdev.me
: Grafana portalinfluxdb.rhmapdev.me
: Influxdb query web portalinfluxdb-api.rhmapdev.me
: Influxdb rest api endpoints (used by influxdb web portal)
It is able to change them in nginx/default.conf
to any domain names. Just remind that, if there is no
DNS resolve for those domain names, they should be added to /etc/hosts
file accordingly.
Installation of containers is very straight forward:
- Upload whole folder to server
- SSH into server and switch to user who could access
Docker
by typingdocker ps
- run
docker-compose up -d
at the root of the folder
This should tell Docker to pull images and start running. Once finished, run docker ps
to see all services running ok.
For any cloud apps that needs to be monitored, they should install rhmap-stats
node.js module. Follow the instruction here for more details.
After installation, there are some configurations needed.
See below example:
TBD
The default retention policy in influxdb is not enabled thus it is important to setup retention policy on database grafana
. Otherewise db size will increase all the time. See here for how to setup retention policy.
MIT