There was a corner case, when a vif had no stations, that
evaluate_metrics for a station that was nil and had no collected metrics
would have been called.
Comment the code, to make it easier to understand and follow, and
simplify some variable names along the way.
Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
Normalizes metrics according to the Prometheus upstream metric
guidelines available at https://prometheus.io/docs/practices/naming/.
Drops the `hostapd_station_wpa` metric, because it is misleading, as it
is not a differentiator between WPA versions, like one could be led to
assume.
Exposes more flags in a more consistent manner. Their metric was
previously only exposed if the flag was present, but not if it wasn't.
The same applies issue was fixed with regards to vht caps.
After this commit the following breaking changes are in place:
- All flags have been moved below `hostapd_station_flags_$flagname`:
- `hostapd_station_ht` is now `hostapd_station_flag_ht`
- `hostapd_station_mfp` is now `hostapd_station_flag_mfp`
- `hostapd_station_vht` is now `hostapd_station_flag_vht`
- `hostapd_station_wmm` is now `hostapd_station_flag_wmm`
- New flags have been exposed:
- `hostapd_station_flag_he` for high-efficency connections
- `hostapd_station_flag_short_preamble` for short preamble connections
- `hostapd_station_flag_auth` for authentication state
- `hostapd_station_flag_assoc` for association state
- Some metrics have had their unit normalized to the SI base unit or
embedded into the metrics name:
- `hostapd_station_inactive_msec` is now
`hostapd_station_inactive_seconds`, the value is still float64 and
as such has enough precision anyway, but becomes easier to reason
about
- `hostapd_station_connected_time` has been renamed to
`hostapd_station_connected_seconds_total` so the unit, as well as
the nature of the counter is reflected
- `hostapd_station_signal` now includes its unit and is therefore
named `hostapd_station_signal_dbm`
- The packet counter metrics have been normalized to what the node
exporter uses, so it is more in line with the defaults in the
Prometheus ecosystem:
- `hostapd_station_rx_packets` is now
`hostapd_station_receive_packets_total`
- `hostapd_station_rx_bytes` is now
`hostapd_station_receive_bytes_total`
- `hostapd_station_tx_packets` is now
`hostapd_station_transmit_packets_total`
- `hostapd_station_tx_bytes` is now
`hostapd_station_transmit_bytes_total`
Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
An empty line has a name and value that is nil and setting a table
index to nil breaks metrics for every vif after the first one.
Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
Correlating data is only possible when we have more metadata, this adds
a bunch of labels for each client, that will increase the depth of
dashboards yet to come.
In particular the changes in this commit are:
- renames the `ifname` label to `vif`
- adds `frequency`, `channel`, `bssid`, `ssid`, `encryption` and `mode`
Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
Makefile changes include:
* Remove USE_UCLIBC, as uclibc is no longer supported
* Package output modules
* Move main binary (back) to /usr/sbin, as it is system administration
related and requires superuser privileges
New patches:
* 003-add-space-for-null-byte.patch - from
374cfd2cab
* 004-more-specific-library-linking.patch - from
27b57d9da3
* 005-use-c99-format-macro-constants.patch - from
https://github.com/fln/addrwatch/pull/28
Init script changes include:
* Change from explicit disable to explicit enable, so that the service
is disabled by default and on first install
* Set config option default values to default values of the main binary
* Fix command-line option names and format (from
https://forum.openwrt.org/t/cant-start-addrwatch-service/60499/3)
* Always use the --quiet command-line option, as the procd instance is
not configured to capture stdout/stderr
* Change the syslog config option to start the syslog output module
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
I seem to forget to check/select setuptools and pip (that come bundled with
Python).
This change will do a simple 'ls' on the 2 wheel files, so that the build
fails even if just building Python.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Free and total bytes are now properly returned as bytes by LVM2 as
requested. No longer multiply values.
Fix parameter order of 'create' command in usage output while at it.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Until now the additional tables listed in gobal 'rt_table_lookup' were
not considered for interfaces.
In order to be able to also use interface-defined routes from tables
other than main, consider also tables listed in 'rt_table_lookup'.
Update version to 2.10.10 as requested by maintainer.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The previous approach was to uncompress N times a big tarball (638 MB)
where N=130 is the number of supported languages. Each iteration would
only extract a single file, but it still needs to uncompress the whole
tarball. This is of course completely inefficient.
Now, we uncompress the tarball only once to extract all relevant files,
and then iterate N times to copy the file needed for each language.
This massively speeds up builds, at the expense of temporarily requiring
more build space (about 1 GB more)
Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
This fixes support for x86, auc now selects the right combined image
depending on the system being booted in EFI mode or not.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* add a tcpdump option to resolve IPs in adblock reporting,
set 'adb_represolve' accordingly (disabled by default). If enabled
tcpdump will perform a reverse DNS (PTR) lookup for each IP address
* add 'stalkerware' source (provided by @astryzia)
* update readme
Signed-off-by: Dirk Brenken <dev@brenken.org>
I'm reverting this commit, because it is pulling newer source code, but
without doing a new version bump. This results that users who already
installed this library on their router will have different package
content than users who installed it after the commit.
The another small reason is that commit subject - update revision is cryptic itself and should be more bulletproof like saying update to version 1.1
More details: https://github.com/openwrt/packages/pull/15990#issuecomment-870333695
This reverts commit e779323481.
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
We should use upstream patch here, which can be removed later,
instead of maintaining our own one.
Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Michael Heimpold <mhei@heimpold.de>