-
Notifications
You must be signed in to change notification settings - Fork 15
Installation
smilebasti edited this page Jun 7, 2023
·
21 revisions
This guides you through the installation of npmGrafStats.
A complete installation example is available with the docker-compose.yml file.
This instruction presumes that your working directory is /home/docker
See the requirements page for what you will need!
- create an influx Organisation called npmgrafstats
- Create a Bucket called npmgrafstats and a API-Token for npmgrafstats with write access to the bucket
- Get your GeoLite2-City.mmdb from the geoliteupdate container or download it from maxmind manually to the /home/docker/geolite directory
docker run --name npmgraf -it -d
-v /home/docker/nginx-proxy-manager/data/logs:/logs \
-v /home/docker/geolite:/geolite \
-v /home/docker/monitoringips.txt:/monitoringips.txt \ # optional only mount if preexists and a wanted feature
-e HOME_IPS=<replace with external IP> \
-e INFLUX_HOST=<replace>:8086 \ # use host IP
-e INFLUX_BUCKET=npmgrafstats \
-e INFLUX_ORG=npmgrafstats \
-e INFLUX_TOKEN=<replace> \
-e REDIRECTION_LOGS=<set> # set to TRUE or FALSE or ONLY
smilebasti/npmgrafstats
version: '3'
services:
npmgraf:
image: smilebasti/npmgrafstats
environment:
- HOME_IPS=<replace with external IP>
- INFLUX_HOST=<replace>:8086 # use host IP
- INFLUX_BUCKET=npmgrafstats
- INFLUX_ORG=npmgrafstats
- INFLUX_TOKEN=<replace>
- REDIRECTION_LOGS=<set> # set to TRUE or FALSE or ONLY
volumes:
- /home/docker/nginx-proxy-manager/data/logs:/logs
- /home/docker/geolite:/geolite
- /home/docker/monitoringips.txt:/monitoringips.txt # optional only mount if preexists and a wanted feature
- Set HOME_IPS to your External/Public IP
- Set REDIRECTION_LOGS to TRUE for Reverse-Proxy and Redirection logs, to ONLY for only Redirection logs and FALSE for only Reverse-Proxy logs
- create the monitoringips.txt file and fill it with the IP's of Uptimerobot, Hetrixtools or similar services. (1 IP per row)(This is optional but is recommended if you monitor your domains via http(s) with external services).
- set your credentials for InfluxDB
- Run the docker container command or start the docker-compose with adjusted settings
- Add InfluxDB Bucket npmgrafstats as data source into grafana
- Download the dashboard file (NPM Map Dashboard v2.1.1.json) or import it with the ID: 18826 and set the previously added data source
A complete installation example is available with the docker-compose.yml file.