User Tools

Site Tools


linux:firewall6

Firewall Part 6

Firewall with iptables

In this part we will cover the topics listed below:

  • Docker
    • grafana
  • Logs to influxdb
    • Display logs in
      • chronagraf
      • grafana

grafana

user@lan01:~ $ mkdir -p Docker/grafana
user@lan01:~ $ cd Docker/grafana
user@lan01:~/Docker/grafana $ cat docker-compose.yml


# docker-compose.yml
version: '3'

services:
  grafana:
    image: grafana/grafana
    container_name: grafana
    restart: unless-stopped
    volumes:
      - grafana-data:/var/lib/grafana
    ports:
      - 3000:3000

networks:
  influx_be:
    external: true
    name: influx_be

volumes:
  grafana-data:

The grafana container also needs access to influxdb, so make sure, it also connects to influx_be network

Now start grafana container

user@lan01:~/Docker/grafana $ docker-compose up -d

In portainer you should see it now

Now connect to grafana website

Now visit http://localhost:3000 on lan01 and create your first data source

Click on Configuration in grafana website and choose Add data source

Under Add data sources choose influxdb

Enter the URL http://influxdb:8086

Set the Database to firewall01 and change HTTP method to GET

Click Save & test and you should see, that Data source is working

grafana.com provides a lot of pre-defined Dashboards.

Adjust the search to the following

and choose the first one displayed

After clicking you will find the dashbord ID on the right

Remember it or copy to clipboard

On your grafana installation choose + and then Import

Enter the copied Dashboard ID and click Load

You now see a description of the dashbord

Under Options you need to change InfluxDB telegraf

and click Import

After that, you should see a populated dashboard.

Some of the panels are probably showing no data. This is due to the fact, that we are not sending the data via telegraf

linux/firewall6.txt · Last modified: by stefan

Page Tools