aboutsummaryrefslogtreecommitdiff
path: root/utils/prometheus-node-exporter-lua/files
Commit message (Collapse)AuthorAge
* prometheus-node-exporter-lua: add basic hwmon exporterIvan Mironov2023-10-15
| | | | | | | | | | | | | | | | | | | This collector supports following metrics: * node_hwmon_temp_celsius * node_hwmon_pwm and following auxiliary mappings: * node_hwmon_chip_names * node_hwmon_sensor_label Tested on: * Banana Pi BPI-r3 / OpenWrt 23.05.0-rc2 * TP-Link Archer C7 v5 / OpenWrt 22.03.5 Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
* prometheus-node-exporter-lua: Add thermal collectorJoel Pettersson2023-06-13
| | | | Signed-off-by: Joel Pettersson <me@joelpet.se>
* prometheus-node-exporter-lua: add realtek-poe exporterGregor Michels2022-08-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exposes PoE metrics obtained from realtek-poe # HELP realtek_poe_switch_info information about the poe controller # TYPE realtek_poe_switch_info gauge realtek_poe_switch_info{mcu="ST Micro ST32F100 Microcontroller",firmware="v22.4"} 1 # HELP realtek_poe_switch_budget_watts overall power budget # TYPE realtek_poe_switch_budget_watts gauge realtek_poe_switch_budget_watts 77 # HELP realtek_poe_switch_consumption_watts overall power consumption # TYPE realtek_poe_switch_consumption_watts gauge realtek_poe_switch_consumption_watts 5 # HELP realtek_poe_port_priority poe priority of port # TYPE realtek_poe_port_priority gauge realtek_poe_port_priority{device="lan1"} 1 realtek_poe_port_priority{device="lan2"} 1 [...] # HELP realtek_poe_port_consumption_watts per port power consumption # TYPE realtek_poe_port_consumption_watts gauge realtek_poe_port_consumption_watts{device="lan1"} 0 realtek_poe_port_consumption_watts{device="lan2"} 0 [...] # HELP realtek_poe_port_state per port poe state # TYPE realtek_poe_port_state gauge realtek_poe_port_state{device="lan1",state="Disabled"} 0 realtek_poe_port_state{device="lan1",state="Searching"} 1 [...] (states: Disabled, Searching, Delivering power, Fault, Other fault, Requesting power) # HELP realtek_poe_port_mode per port poe mode # TYPE realtek_poe_port_mode gauge realtek_poe_port_mode{device="lan1",mode="PoE"} 0 realtek_poe_port_mode{device="lan1",mode="PoE+"} 1 [...] (modes: PoE, Legacy, pre-PoE+, PoE+) Signed-off-by: Gregor Michels <hirnpfirsich@brainpeach.de>
* prometheus-node-exporter-lua: fix hostapd stationsNick Hainke2022-08-07
| | | | | | We can only utilize statistics from interfaces having ubus interface. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: Added selinux.lua.Jonathan Davies2022-07-13
| | | | Signed-off-by: Jonathan Davies <jpds@protonmail.com>
* prometheus-node-exporter-lua: fix waiting for interfaceEtienne Champetier2022-06-12
| | | | | | | | | Instead of waiting for interface to be up, wait for it to have IPs, as this is what we need. Also do not call procd_open_instance when not ready. Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* prometheus-node-exporter: fix ubus stationsNick Hainke2022-05-29
| | | | | | | | | Not every radio has also ubus support. Only query radios with ubus functions. Signed-off-by: Nick Hainke <vincent@systemli.org> [fixup, call ubus.connect() once per scrape] Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* prometheus-node-exporter-lua: use uhttpd-mod-luaEtienne Champetier2022-04-25
| | | | | | | | | | | | | listen_ipv6 config option is removed and we now listen on both ipv4 and ipv6 addresses. HTTP keepalive is enabled and set to 70s by default. With uhttpd-mod-lua there is a small change in behavior, all code is loaded/parsed/executed once on startup as before, but now each request is executed in his own fork, so we can't keep a state between requests. Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* prometheus-node-exporter-lua: fixup openwrt collectorEtienne Champetier2022-04-25
| | | | Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* prometheus-node-exporter-lua: improve ubnt-managerNick Hainke2022-04-21
| | | | | | | | It is costly in transmissions to add all information to each metric. Instead, only use the "device" as a label and add all other important labels to the "uptime" metric. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: add ubnt-manager collectorNick Hainke2022-04-04
| | | | | | | Ubnt-manager-collector collects statistics from airos devices configured in ubnt-manager. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: add netclass.lua collectorRené Treffer2022-03-28
| | | | | | | All current node_exporter netclass metrics will be available. This includes speed metrics per lan port on supported DSA switches. Signed-off-by: René Treffer <treffer@measite.de>
* prometheus-node-exporter-lua: Added entropy.lua.Jonathan Davies2021-12-25
| | | | Signed-off-by: Jonathan Davies <jpds@protonmail.com>
* prometheus-node-exporter-lua: add missing metrics to ltq-dslAndre Heider2021-11-02
| | | | | | | | | | | Two values were missing, add them to the appropriate metrics. The dsl error vectors are new and useful stats to debug vector related line deteriorations, see [0]. [0] https://forum.openwrt.org/t/vectoring-on-lantiq-vrx200-vr9-missing-callback-for-sending-error-samples/104046 Signed-off-by: Andre Heider <a.heider@gmail.com>
* prometheus-node-exporter-lua: fix broken control flowMartin Weinelt2021-09-24
| | | | Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
* prometheus-node-exporter-lua: fix bss identifier in hostapd_stationsMartin Weinelt2021-07-24
| | | | | | | | | | | We previously did not identify the correct BSS from the output of `hostapd_cli -i <phy> status`, because when asked for a vif it will always respond with information relevant to the whole phy. The per vif settings will use an iterator and we now try to detect the correct BSS from that output. Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
* prometheus-node-exporter-lua: lower case bssid label value in wifi exporterMartin Weinelt2021-07-06
| | | | | | | To allow cross matching bssids between different exporters we need to use the same case, as label matching is case senstive. Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
* prometheus-node-exporter-lua: fix corner case in hostapd_stationsMartin Weinelt2021-07-06
| | | | | | | | | | | 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>
* prometheus-node-exporter-lua: normalize metric names in hostapd_stationsMartin Weinelt2021-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* prometheus-node-exporter-lua: handle empty lines in all_sta output correctlyMartin Weinelt2021-07-06
| | | | | | | 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>
* prometheus-node-exporter-lua: increase label density in hostapd_stationsMartin Weinelt2021-07-06
| | | | | | | | | | | | 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>
* prometheus-node-export-lua: add my emailKevin Lyda2021-06-13
| | | | | | Add my email address to the copyright for the file. Signed-off-by: Kevin Lyda <kevin@lyda.ie>
* prometheus-node-exporter-lua: fix wifiNick Hainke2021-02-15
| | | | | | | | | The "get_wifi_interfaces" function is not returning the wifi interface names. This causes the bug #14625. Fix the "get_wifi_interfaces" function. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: use the new ubus dsl metricsAndre Heider2021-02-04
| | | | | | This is significantly faster. Signed-off-by: Andre Heider <a.heider@gmail.com>
* prometheus-node-exporter-lua: update netstatNick Hainke2021-01-28
| | | | | | | The snmp and netstat interface are enabled by default See: 4943bc5cff47a482c3010033e04c6d489a4b733c Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: add snmp6 exporterNick Hainke2020-12-07
| | | | | | | | | | | | | If you want statistics about IPv6 you can use snmpv6 exporter. Currently, the "/proc/net/snmp6" is existing but all values are just "0". To use this plugin you have to set CONFIG_PROC_STRIPPED=n I will find a way to enable the important ipv6 statistics by default. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: fix hostapd exporterNick Hainke2020-10-29
| | | | | | | Fix "hostapd_ubus_stations.lua". The bit-lib that is imported and the one specified as the dependency do not match. Use luabitop. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: hostad ubus statsNick Hainke2020-10-12
| | | | | | | | | | | | | There is already the hostapd_stations exporter, which uses hostapd-utils (more precisely hostapd-cli) to get client statistics. However, the ubus interface is permanently integrated under hostapd in OpenWrt. So this exporter needs one dependency less. For now it exports mainly the rrm statistics. Many people are interested in what your device supports. The exporter provides information about the radio-resource-managment extensions. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: update dawn exporterNick Hainke2020-10-07
| | | | | | | Add dawn exporter to Makefile. Add hostname to export. Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: uci_dhcp_host moduleGérondal Thibault2020-07-20
| | | | | | | | | | | Extract data from configuration file /etc/config/dhcp and create labels {name, ip, mac, dns} via uci. Those labels are useful in order to craft complex prometheus queries as replacing the MAC address to a custom name. E.g.: wifi_station_signal_dbm * on (mac) group_left(name) uci_dhcp_host or on (mac) label_replace(wifi_station_signal_dbm, "name", "$1", "mac", "(.+)") Signed-off-by: Gérondal Thibault <contact@tycale.be>
* prometheus-node-exporter-lua: add dawn exporterNick Hainke2020-06-26
| | | | | | | | | | | DAWN is a decentralized WiFi Controller. https://github.com/berlin-open-wireless-lab/DAWN The node exporter allows to gather statistics about your network: - Infos about AP (Channel Utilization, Station Count, ...) - Connected Clients (Signal, Capabilities) Signed-off-by: Nick Hainke <vincent@systemli.org>
* prometheus-node-exporter-lua: Change node_time_seconds type to "gauge"Forest Crossman2020-05-03
| | | | | | | | | | | | | The official node_exporter reports node_time_seconds as a gauge, but prometheus-node-exporter-lua reports it as a counter. To be consistent with the official implementation, and because "gauge" is more correct than "counter" for this metric (system time can decrease, but the Prometheus documentation states, "A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart."), change the type for node_time_seconds to "gauge". Signed-off-by: Forest Crossman <cyrozap@gmail.com>
* prometheus-node-exporter-lua: add hostapd exporterDavid Bauer2020-02-03
| | | | | | | | | This exporter exposes information of the connected stations acquired from hostapd. These contain additional information compared to the existing station exporter, however they require a full build of hostapd / wpad. Signed-off-by: David Bauer <mail@david-bauer.net>
* prometheus-node-exporter-lua: fixed small warningRosen Penev2020-01-27
| | | | | | | | | This happens during compilation: Enabling network ./etc/init.d/prometheus-node-exporter-lua: line 7: /lib/functions/network.sh: No such file or directory Signed-off-by: Rosen Penev <rosenp@gmail.com>
* prometheus-node-exporter-lua: an unavaliable wifi interface may have stopped ↵Zoltan Haindrich2019-11-17
| | | | | | the scraper from functioning Signed-off-by: Zoltan Haindrich <kirk@rxd.hu>
* prometheus-node-exporter-lua: respawn the processAndre Heider2019-11-17
| | | | Signed-off-by: Andre Heider <a.heider@gmail.com>
* prometheus-node-exporter-lua: add a config reload triggerAndre Heider2019-11-17
| | | | Signed-off-by: Andre Heider <a.heider@gmail.com>
* prometheus-node-exporter-lua: switch config to openwrt interface namesAndre Heider2019-11-17
| | | | | | | | | | | | | | | | | | | Drop the config knob 'listen_address' and introduce 'listen_interface' and 'listen_ipv6' instead. 'listen_interface' takes an openwrt interface name ('loopback', 'lan', 'wan' etc, or "*" for all), from which the primary IP is used to listen on. If 'listen_ipv6' is set to '1', the IPv6 adress will be used, IPv4 elsewise. procd interface triggers are now combined with this, so if the listen interface is not yet configured when the init script is executed, the process start is defered, and the trigger takes care of that once the interface is ready. Fixes #7670 Signed-off-by: Andre Heider <a.heider@gmail.com>
* prometheus-node-exporter-lua: ltq-dsl.lua: use new var names errors_fecs_*Martin Schiller2019-09-23
| | | | Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* prometheus-node-exporter-lua: add target & system to OpenWrt collectorEtienne Champetier2019-08-14
| | | | | | | | | | | | Before: node_openwrt_info{revision="r10756+1-7546be6007",model="GL.iNet GL-AR150",id="OpenWrt",board_name="glinet,gl-ar150",release="SNAPSHOT"} 1 After: node_openwrt_info{revision="r10756+1-7546be6007",target="ath79/generic",board_name="glinet,gl-ar150",id="OpenWrt",model="GL.iNet GL-AR150",release="SNAPSHOT",system="Atheros AR9330 rev 1"} 1 Fixes #9730, replace #9735 Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* prometheus-node-exporter-lua: Add more wifi_station metrics and fix naming ↵Kirill Lukonin2019-04-15
| | | | | | according to original wifi_linux.go node exporter Signed-off-by: Kirill Lukonin <klukonin@gmail.com>
* prometheus-node-exporter-lua: Add wifi_station_countAlex Tomlins2019-04-08
| | | | | | | | | | | To return the number of connected clients. At present this can be partially inferred by using a count() over one of the existing metrics, however this doesn't handle the case when there are no connected clients. When that happens, the count() will return no data instead of 0. Signed-off-by: Alex Tomlins <alex@tomlins.org.uk>
* prometheus-node-exporter-lua: wifi packets should be a counterAlex Tomlins2019-04-08
| | | | | | | | These output a count of the number of packets transmitted/received, so should be tracked as a counter. As it stands, promtool is warning that these shouldn't be named ending _total if they're a gauge. Signed-off-by: Alex Tomlins <alex@tomlins.org.uk>
* prometheus-node-exporter-lua: fix missing conntrack valuesAlex Tomlins2019-04-03
| | | | | | | | | | | | If the /proc/sys/net/netfilter/nc_conntrack_* files are not present, this exporter was outputting a blank value, which is invalid. These files will not be present when using an image that doesn't include the iptables and firewall packages (eg a minimal access-point type image). This updates the collector to only output the metrics if the corresponding /proc files are present. Signed-off-by: Alex Tomlins <alex@tomlins.org.uk>
* prometheus-node-exporter-lua: change network metric type to counterPiotr Machała2018-12-30
| | | | Signed-off-by: Piotr Machała <pm7gt@933x.net>
* prometheus-node-exporter-lua: add lantiq dsl modem collectorRene Treffer2018-12-16
| | | | | | | a.heider: Address PR comments and clean up. Signed-off-by: Rene Treffer <treffer+github@measite.de> Signed-off-by: Andre Heider <a.heider@gmail.com>
* prometheus-node-exporter-lua: close io.popen files to reap zombiesLeonid Evdokimov2018-11-25
| | | | Signed-off-by: Leonid Evdokimov <leon@darkk.net.ru>
* prometheus-node-exporter-lua: add conntrack collectorEtienne Champetier2018-07-25
| | | | | | Also fix missing dependency of openwrt collector Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
* prometheus-node-exporter-lua: adapt 0.16 metricsPaul Spooren2018-06-28
| | | | | | | | | | Prometheus introduced some new conventions on how to name metrics. Read here https://prometheus.io/docs/practices/naming/ This PR breaks compatibility with past versions, just like the officials node exporter! 💥 Signed-off-by: Paul Spooren <mail@aparcar.org>
* prometheus-node-exporter-lua: handle fancy releasePaul Spooren2018-06-17
| | | | | | | | | | Some releases may have non letters in it's name currently resulting in an empty ("") output which is then discarded, resulting in *missing* labels in the metric. Now it uses `.-` to catch as little as possible, but anything. Signed-off-by: Paul Spooren <mail@aparcar.org>