Compare commits

..

No commits in common. "main" and "v1.1.1" have entirely different histories.
main ... v1.1.1

6 changed files with 10 additions and 50 deletions

View file

@ -9,6 +9,5 @@
</component>
<component name="PackageRequirementsSettings">
<option name="versionSpecifier" value="Greater or equal (&gt;=x.y.z)" />
<option name="keepMatchingSpecifier" value="false" />
</component>
</module>

View file

@ -192,9 +192,6 @@ Label Notation:
| mesh_packet_ids | Unique packet IDs | Counter | 🏷️ (source), 🏷️ (destination), packet_id |
| mesh_packet_channel | Packet channel | Counter | 🏷️ (source), 🏷️ (destination), channel |
| mesh_packet_rx_rssi | Packet receive RSSI | Gauge | 🏷️ (source), 🏷️ (destination) |
| pax_wifi | Number of Wifi devices (PAX) | Gauge | 🏷 |
| pax_ble | Number of Bluetooth devices (PAX) | Gauge | 🏷 |
| pax_uptime | PAX device uptime | Gauge | 🏷 |
## Configuration

View file

@ -1,5 +1,4 @@
from datetime import datetime
from prometheus_client import CollectorRegistry, Counter, Gauge
from exporter.client_details import ClientDetails
@ -36,7 +35,6 @@ class Metrics:
self._init_metrics_telemetry_air_quality()
self._init_metrics_telemetry_power()
self._init_route_discovery_metrics()
self._init_pax_counter_metrics()
def update_metrics_position(self, latitude, longitude, altitude, precision, client_details: ClientDetails):
# Could be used to calculate more complex data (Like distances etc..)
@ -330,23 +328,3 @@ class Metrics:
self._get_common_labels() + ['response_type'],
registry=self._registry
)
def _init_pax_counter_metrics(self):
self.pax_wifi_gauge = Gauge(
'pax_wifi',
'Number of WiFi devices',
self._get_common_labels(),
registry=self._registry
)
self.pax_ble_gauge = Gauge(
'pax_ble',
'Number of BLE devices',
self._get_common_labels(),
registry=self._registry
)
self.pax_uptime_gauge = Gauge(
'pax_uptime',
'Uptime of the device',
self._get_common_labels(),
registry=self._registry
)

View file

@ -5,17 +5,16 @@ import sys
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from meshtastic.protobuf.mqtt_pb2 import ServiceEnvelope
from exporter.metric.node_configuration_metrics import NodeConfigurationMetrics
try:
from meshtastic.mesh_pb2 import MeshPacket, Data, HardwareModel
from meshtastic.portnums_pb2 import PortNum
from meshtastic.mqtt_pb2 import ServiceEnvelope
except ImportError:
from meshtastic.protobuf.mesh_pb2 import MeshPacket, Data, HardwareModel
from meshtastic.protobuf.portnums_pb2 import PortNum
from meshtastic.protobuf.mqtt_pb2 import ServiceEnvelope
from prometheus_client import CollectorRegistry, Counter, Gauge
from psycopg_pool import ConnectionPool

View file

@ -267,16 +267,6 @@ class PaxCounterAppProcessor(Processor):
except Exception as e:
logger.error(f"Failed to parse PAXCOUNTER_APP packet: {e}")
return
self.metrics.pax_wifi_gauge.labels(
**client_details.to_dict()
).set(paxcounter.wifi)
self.metrics.pax_ble_gauge.labels(
**client_details.to_dict()
).set(paxcounter.ble)
self.metrics.pax_uptime_gauge.labels(
**client_details.to_dict()
).set(paxcounter.uptime)
@ProcessorRegistry.register_processor(PortNum.SERIAL_APP)

View file

@ -1,15 +1,12 @@
paho-mqtt>=2.1.0
python-dotenv>=1.0.1
prometheus_client>=0.21.1
paho-mqtt~=2.1.0
python-dotenv~=1.0.1
prometheus_client~=0.20.0
unishox2-py3~=1.0.0
cryptography>=44.0.1
psycopg>=3.2.5
cryptography~=42.0.8
psycopg~=3.1.19
psycopg_pool~=3.2.2
psycopg-binary>=3.2.5
meshtastic~=2.3.13
psycopg-binary~=3.1.20
geopy>=2.4.1
psycopg-pool>=3.2.5
APScheduler>=3.11.0
# Meshtastic Protocol Buffers
meshtastic-protobufs-protocolbuffers-python==29.3.0.1.20241006120827+cc36fd21e859
--extra-index-url https://buf.build/gen/python
psycopg-pool>=3.2.2
APScheduler>=3.10.4