Skip to content

Commit

Permalink
Merge pull request #4511 from anarkiwi/noinfluc
Browse files Browse the repository at this point in the history
Drop InfluxDB support to ease maintenance.
  • Loading branch information
anarkiwi authored May 16, 2024
2 parents a90bec7 + eb0aaf4 commit 4e7dd1c
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 957 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ It supports:
- ACLs matching layer 2 and layer 3 fields
- IPv4 and IPv6 routing, static and via BGP
- Policy based forwarding to offload to external NFV applications (Eg 802.1x via hostapd, DHCP to isc DHCPD)
- Port and flow statistics via InfluxDB/Grafana
- Port and flow statistics via Grafana
- Controller health and statistics via Prometheus
- Unit and systems tests run under GitHub workflows based on mininet and OVS

Expand Down
1 change: 0 additions & 1 deletion clib/clib_mininet_test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
("lsof", ["-v"], r"lsof version", r"revision: (\d+\.\d+(\.\d+)?)\n", "4.86"),
("mn", ["--version"], r"\d+\.\d+.\d+", r"(\d+\.\d+).\d+", "2.2"),
("exabgp", ["--version"], "ExaBGP", r"ExaBGP : (\d+\.\d+).\d+", "4.0"),
("pip3", ["show", "influxdb"], "influxdb", r"Version:\s+(\d+\.\d+)\.\d+", "3.0"),
("curl", ["--version"], "libcurl", r"curl (\d+\.\d+).\d+", "7.3"),
("ladvd", ["-h"], "ladvd", r"ladvd version (\d+\.\d+)\.\d+", "0.9"),
("iperf", ["--version"], "iperf", r"iperf version (\d+\.\d+)\.\d+", "2.0"),
Expand Down
4 changes: 1 addition & 3 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Build-Depends: debhelper (>= 11),
python3-setuptools,
python3-pbr (>= 1.9),
python3-bitstring,
python3-influxdb,
python3-networkx,
python3-prometheus-client,
python3-ruamel.yaml,
Expand All @@ -26,8 +25,7 @@ Vcs-Browser: https://github.com/faucetsdn/faucet

Package: python3-faucet
Architecture: all
Depends: python3-influxdb (>= 2.12.0),
python3-networkx (>= 1.9),
Depends: python3-networkx (>= 1.9),
python3-pbr (>= 1.9),
python3-prometheus-client (>= 0.20.0), python3-prometheus-client (<< 0.20.1),
python3-ruamel.yaml (>= 0.18.6), python3-ruamel.yaml (<< 0.18.7),
Expand Down
15 changes: 0 additions & 15 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
---
version: '2'
services:
influxdb:
restart: always
image: 'influxdb:2.7'
ports:
- '8086'
- '8083'
volumes:
- '${FAUCET_PREFIX}/opt/influxdb/shared/data/db:/var/lib/influxdb'
environment:
INFLUXDB_DB: 'faucet'
INFLUXDB_HTTP_AUTH_ENABLED: 'true'
INFLUXDB_ADMIN_USER: 'faucet'
INFLUXDB_ADMIN_PASSWORD: 'faucet'

prometheus:
restart: always
Expand All @@ -38,7 +25,6 @@ services:
volumes:
- '${FAUCET_PREFIX}/opt/grafana:/var/lib/grafana'
links:
- influxdb
- prometheus

gauge:
Expand All @@ -56,7 +42,6 @@ services:
- '6654:6653'
- '9303'
links:
- influxdb

faucet:
restart: always
Expand Down
7 changes: 1 addition & 6 deletions docs/_static/grafana-dashboards/faucet_instrumentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "process_resident_memory_bytes{job=~\"faucet|gauge\"}",
"format": "time_series",
"groupBy": [
Expand Down Expand Up @@ -535,7 +534,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "process_virtual_memory_bytes{job=~\"faucet|gauge\"}",
"format": "time_series",
"groupBy": [
Expand Down Expand Up @@ -689,7 +687,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "faucet_config_reload_requests_total",
"format": "time_series",
"groupBy": [
Expand Down Expand Up @@ -817,7 +814,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "faucet_config_reload_cold_total",
"format": "time_series",
"groupBy": [
Expand Down Expand Up @@ -945,7 +941,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "faucet_config_reload_warm_total",
"format": "time_series",
"groupBy": [
Expand Down Expand Up @@ -1032,4 +1027,4 @@
"uid": "faucet-instrumentation",
"version": 1,
"weekStart": ""
}
}
5 changes: 1 addition & 4 deletions docs/_static/grafana-dashboards/faucet_inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "of_dp_desc_stats",
"format": "table",
"groupBy": [
Expand Down Expand Up @@ -681,7 +680,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"editorMode": "code",
"exemplar": false,
"expr": "faucet_pbr_version",
Expand Down Expand Up @@ -932,7 +930,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"expr": "python_info",
"format": "table",
"groupBy": [
Expand Down Expand Up @@ -1030,4 +1027,4 @@
"uid": "faucet-inventory",
"version": 3,
"weekStart": ""
}
}
6 changes: 1 addition & 5 deletions docs/_static/grafana-dashboards/faucet_port_statistics.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"editorMode": "builder",
"expr": "rate(of_port_rx_bytes{dp_name=~\"$dp_name\", port=~\"$port\"}[1m]) * 8",
"format": "time_series",
Expand Down Expand Up @@ -322,7 +321,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"editorMode": "builder",
"expr": "rate(of_port_rx_packets{dp_name=~\"$dp_name\", port=~\"$port\"}[1m])",
"format": "time_series",
Expand Down Expand Up @@ -482,7 +480,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"editorMode": "code",
"expr": "rate(of_port_rx_dropped{dp_name=~\"$dp_name\", port=~\"$port\"}[1m])",
"format": "time_series",
Expand Down Expand Up @@ -629,7 +626,6 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"dsType": "influxdb",
"editorMode": "builder",
"expr": "rate(of_port_tx_errors{dp_name=~\"$dp_name\", port=~\"$port\"}[1m])",
"format": "time_series",
Expand Down Expand Up @@ -772,4 +768,4 @@
"uid": "faucet-port-stats",
"version": 9,
"weekStart": ""
}
}
18 changes: 3 additions & 15 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Docker compose
~~~~~~~~~~~~~~

This is an example docker-compose file that can be used to set up gauge to talk
to Prometheus and InfluxDB with a Grafana instance for dashboards and visualisations.
to Prometheus and a Grafana instance for dashboards and visualisations.

It can be run with:

Expand All @@ -207,7 +207,7 @@ It can be run with:
docker-compose up
The time-series databases with the default settings will write to
``/opt/prometheus/`` ``/opt/influxdb/shared/data/db`` you can edit these locations
``/opt/prometheus/`` you can edit these locations
by modifying the ``docker-compose.yaml`` file.

On OSX, some of the default shared paths are not accessible, so to overwrite
Expand All @@ -220,7 +220,7 @@ For example:
export FAUCET_PREFIX=/opt/faucet
When all the docker containers are running we will need to configure Grafana to
talk to Prometheus and InfluxDB. First login to the Grafana web interface on
talk to Prometheus. First login to the Grafana web interface on
port 3000 (e.g http://localhost:3000) using the default credentials of
``admin:admin``.

Expand All @@ -232,18 +232,6 @@ Then add two data sources. Use the following settings for prometheus:
Type: Prometheus
Url: http://prometheus:9090

And the following settings for InfluxDB:

::

Name: InfluxDB
Type: InfluxDB
Url: http://influxdb:8086
With Credentials: true
Database: faucet
User: faucet
Password: faucet

Check the connection using test connection.

From here you can add a new dashboard and a graphs for pulling data from the
Expand Down
2 changes: 1 addition & 1 deletion docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ e.g. learned hosts, via Prometheus (so that an open source NMS such as
Grafana graph it).

Gauge also has an OpenFlow connection to the switch and monitors port and flow
state (exporting it to Prometheus or InfluxDB, or even flat text log files).
state (exporting it to Prometheus, or even flat text log files).
Gauge, however, does not ever modify the switch's state, so that switch
monitoring functions can be upgraded, restarted, without impacting forwarding.

Expand Down
9 changes: 0 additions & 9 deletions etc/faucet/gauge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ watchers:
# dps: ['sw1', 'sw2']
interval: 10
db: 'prometheus'
# db: 'influx'
flow_table_poller:
type: 'flow_table'
all_dps: true
Expand All @@ -29,11 +28,3 @@ dbs:
type: 'text'
compress: true
path: 'flow_tables'
influx:
type: 'influx'
influx_db: 'faucet'
influx_host: 'influxdb'
influx_port: 8086
influx_user: 'faucet'
influx_pwd: 'faucet'
influx_timeout: 10
Loading

0 comments on commit 4e7dd1c

Please sign in to comment.