shackerd / freebox-exporter-rs

Unofficial Free S.A.S. ISP Freebox API exporter for Prometheus
MIT License
1 stars 1 forks source link

Grafana Dashboard #22

Closed ottobaer closed 1 month ago

ottobaer commented 1 month ago

Hi,

I finally finished the dashboard :).

File is included here, let me know what you think.

prometheus_exporter_rs-grafana_dashboard.json

edit: there was an error in the file

ottobaer commented 1 month ago

FYI - I also uploaded the Dashboard to Grafana

https://grafana.com/grafana/dashboards/21637

shackerd commented 1 month ago

Hello @ottobaer,

Many thanks for your contribution! I tried it, it works well! I added your grafana board link in the README.md file :wink:

ottobaer commented 1 month ago

Thanks for adding it :-).

I will need to set up mockoon to expand the dashboard, since some metrics are not available in bridge mode it seems.

shackerd commented 1 month ago

With bridge mode enabled the freebox API does not provide these informations indeed. Also, lan browser API metrics depends a lot of the network topology.

Output metric will be like :

fbx_exporter_lan_browser_pub_ether_00_ff_00_ff_00_ff_l3connectivities_1_addr

In fact it's really network specific, for sure it's a pain to mock and I don't know how it's even possible to add a generic solution in Grafana.

Unlike lan browser, lan configuration is way easier to add :smile:

ottobaer commented 1 month ago

I think I can hack something together, since I can send metrics directly to my Victorametrics instance I use as a prometeus replacement.

Would it be possible for you to provide a file with the metrics from a non-bridge mode freebox with 1-2 clients on the lan?

This would also help to integrate all of the wifi data in the future, since my bridge mode box won't export wifi either.

shackerd commented 1 month ago

Nice to read!

Here an example of lan_browser, 2 devices on 1 interface:

# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_active if 1 the host sends traffic to the Freebox
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_active gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_active 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_host_type host type (from Freebox guess)
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_host_type gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_host_type{host_type="networking_device"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l2ident_id layer 2 id
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l2ident_id gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l2ident_id{id="aa:bb:cc:dd:ee:ff"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l2ident_type type of layer 2 address
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l2ident_type gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l2ident_type{type="mac_address"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_active gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_active 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_addr gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_addr{addr="192.168.1.1"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_af gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_af{af="ipv4"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_last_activity gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_last_activity 1723588506
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_last_time_reachable 1723588506
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_reachable gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_0_reachable 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_active gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_active 0
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_addr gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_addr{addr="192.168.1.11"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_af gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_af{af="ipv4"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_last_activity gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_last_activity 1657977994
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_last_time_reachable 1657977994
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_reachable gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_last_activity last time the host sent traffic
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_last_activity gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_last_activity 1723588506
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_last_time_reachable last time the host was reached
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_last_time_reachable 1723588506
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_0_name host name
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_0_name gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_0_name{name="ROUTER"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_0_source source of the name
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_0_source gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_0_source{source="dhcp"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_1_name host name
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_1_name gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_1_name{name="wlan-router"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_1_source source of the name
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_1_source gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_names_1_source{source="mdns"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_persistent if 1 the host is always shown even if it has not been active since the Freebox startup
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_persistent gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_persistent 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_primary_name host primary name
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_primary_name gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_primary_name{primary_name="ROUTER"} 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_primary_name_manual if 1 the primary name has been set manually
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_primary_name_manual gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_primary_name_manual 0
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_reachable if 1 the host can receive traffic from the Freebox
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_reachable gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_reachable 1
# HELP fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_vendor_name host vendor name (from the mac address)
# TYPE fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_vendor_name gauge
fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_vendor_name{vendor_name="Cisco"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_active if 1 the host sends traffic to the Freebox
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_host_type host type (from Freebox guess)
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_host_type gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_host_type{host_type="smartphone"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l2ident_id layer 2 id
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l2ident_id gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l2ident_id{id="00:11:22:33:44:55"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l2ident_type type of layer 2 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l2ident_type gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l2ident_type{type="mac_address"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_addr gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_addr{addr="192.168.1.10"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_af gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_af{af="ipv4"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_last_activity 1723585654
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_last_time_reachable 1723585654
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_0_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_addr gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_addr{addr="fe80::65fa:8fb9:5a70:ef63"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_af gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_af{af="ipv6"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_last_activity 1723585652
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_last_time_reachable 1723585652
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_1_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_addr gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_addr{addr="fe80::d69e:3bff:fe80:db16"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_af gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_af{af="ipv6"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_last_activity 1721904466
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_last_time_reachable 1721904466
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_2_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_addr gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_addr{addr="2a01:e0a:460:f6b0:bd04:eb69:b6a1:5a43"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_af gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_af{af="ipv6"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_last_activity 1721850874
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_last_time_reachable 1721850874
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_3_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_addr gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_addr{addr="2a01:e0a:460:f6b0:c1a7:8fad:f975:61be"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_af gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_af{af="ipv6"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_last_activity 1719015199
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_last_time_reachable 1719015199
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_4_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_active is the connection active
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_active gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_active 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_addr layer 3 address
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_addr gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_addr{addr="2a01:e0a:460:f6b0:fd3c:2568:1bdf:e357"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_af ipv4 or ipv6
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_af gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_af{af="ipv6"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_last_activity last activity timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_last_activity 1723585647
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_last_time_reachable last reachable timestamp
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_last_time_reachable 1723585647
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_reachable is the connection reachable
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_l3connectivities_5_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_last_activity last time the host sent traffic
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_last_activity gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_last_activity 1723585665
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_last_time_reachable last time the host was reached
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_last_time_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_last_time_reachable 1723585654
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_name host name
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_name gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_name{name="00000000-0000-0000-0000-000000000000"} 1
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_name{name="Android-2"} 1
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_name{name="Android-3"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_source source of the name
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_source gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_names_0_source{source="mdns"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_persistent if 1 the host is always shown even if it has not been active since the Freebox startup
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_persistent gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_persistent 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name host primary name
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name{primary_name="00000000-0000-0000-0000-000000000000"} 1
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name{primary_name="Android-2"} 1
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name{primary_name="Android-3"} 1
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name_manual if 1 the primary name has been set manually
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name_manual gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_primary_name_manual 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_reachable if 1 the host can receive traffic from the Freebox
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_reachable gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_reachable 0
# HELP fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_vendor_name host vendor name (from the mac address)
# TYPE fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_vendor_name gauge
fbx_exporter_lan_browser_pub_ether_00_11_22_33_44_55_vendor_name{vendor_name="Manufacturer Electronic Technology Company Limited"} 1
ottobaer commented 1 month ago

Hi,

Thanks for the metrics.

I just tried to implement that in Grafana, but it's either too hacky or not possible it seems ...

Do you think there would be a way to export the metrics as labels instead?

So instead of

fbx_exporter_lan_browser_pub_ether_aa_bb_cc_dd_ee_ff_l3connectivities_1_addr{addr="192.168.1.11"} 1

Something like

fbx_exporter_lan_browser_pub_ether_addr{port="1", type="l2", mac="aa_bb_cc_dd_ee_ff", addr="192.168.1.11"} 1

shackerd commented 1 month ago

Hello,

I'm not satisfied neither of this metrics format, it's not really exploitable, I'm not surprised. I also though to rearrange subdata in labels.

Actually, the process of gathering devices and translating data into prometheus format is:

  1. Fetch network interfaces
  2. Enumerate devices per network interface (we need to iterate on each iface, with previous data)
  3. Allocate gauges / wrap gauges to each level of object cluster for refreshing data

Cons:

I tried to keep the Freebox API structure/path in metrics and avoid any data processing for more consistency, but seems complicated.

So, I think I will rearrange data like the format right down below (this is an example of std node_exporter):

# HELP node_network_info Non-numeric data from /sys/class/net/<iface>, value is always 1.
# TYPE node_network_info gauge
node_network_info{address="00:00:00:00:00:00",adminstate="up",broadcast="00:00:00:00:00:00",device="lo",duplex="",ifalias="",operstate="unknown"} 1
node_network_info{address="ff:ff:ff:ff:ff:ff",adminstate="up",broadcast="ff:ff:ff:ff:ff:ff",device="eth0",duplex="full",ifalias="",operstate="up"} 1

This will look like:

fbx_exporter_lan_browser_devices{port="1", type="l2", mac="aa_bb_cc_dd_ee_f0", addr="192.168.1.11", iface="pub"} 1
fbx_exporter_lan_browser_devices{port="2", type="l2", mac="aa_bb_cc_dd_ee_f1", addr="192.168.1.12", iface="pub"} 1
fbx_exporter_lan_browser_devices{port="3", type="l2", mac="aa_bb_cc_dd_ee_f2", addr="192.168.1.13", iface="pub"} 1

But, their is a painpoint, the l3connectivities property (which is an array of objects), I will try to flatten data or also rework it.