Skip to content

FastNetMon/fastnetmon-advanced-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker compose for FastNetMon Advanced

Warning

This deployment method is currently experimental and intended for testing and evaluation purposes only.

It is not recommended for production use at this time.

Install

Clone repo.

.env

Then we need create .env for our settings (example - .env.template)

We set there variables

  • FNM_PATH - path to our docker compose files.
  • FNM_VERSION - FastNetMon version to install via Docker tags.
  • FNM_WEB_API_V2 - switch between old syle web API and new
  • FNM_NOT_UPLOAD_ASN_MAPPING - disable upload asn mapping
  • COMPOSE_PROJECT_NAME - project name( will be prefix for containers names ).
  • COMPOSE_FILE - declare what components will be used.

COMPOSE_FILE

Minimal example

COMPOSE_FILE=docker-compose.ym

Most full example

COMPOSE_FILE=docker-compose.yml:docker-compose.clickhouse.yml:docker-compose.grafana.yml:docker-compose.trafficdb.yml:docker-compose.web-api.yml:docker-compose.gobgp.yml

Components by file

  • docker-compose.yml - minimal base FNM (only FastNetMon and MongoDB)
  • docker-compose.gobgp.yml - Add GoBGP daemon
  • docker-compose.clickhouse.yml - Add clickhouse for saving metrics
  • docker-compose.grafana.yml - Add grafana for traffic visualisation(need enabled clickhouse)
  • docker-compose.trafficdb.yml - enable traffic persistence(need enabled clickhouse)
  • docker-compose.web-api.yml - start web API or with FNM_WEB_API_V2=true start LiveView

Configure volumes and secrets

Volumes, secrets and network config separtaed to files volumes.yml,secrets.yml and networks.yml.
By default volumes is directoies in storage/.

Secretes in secrets/ and can be generated with init_secrets.sh scripts.

Start services

After all previose step configured there should be enought to run

docker compose up -d 

If user not in docker group, than all command need sudo -E to lose ENV variables, like

sudo -E docker compose up -d 

Configure

Following instruction for configuration need to change all
sudo fcli $COMMAND
to
docker compose exec fastnetmon fcli $COMMAND .

Except for sudo fcli commit - instaed of commit we restart service now

docker compose restart fastnetmon

Logs notice

Where possible for now logs send to stdout/stderr to appear at docker conpose logs, but some still stored in volumes.
By default logs for services would be lost after docker compose down - could be good to setup /etc/docker/daemon.json for journald or remoute collector - https://docs.docker.com/engine/logging/configure/

About

Put together FastNetMon advanced with visual stack via docker compose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages