Skip to Content.
Sympa Menu

rare-dev - Re: [rare-dev] Prometheus DB and Grafana Dashboards

Subject: Rare project developers

List archive

Re: [rare-dev] Prometheus DB and Grafana Dashboards


Chronological Thread 
  • From: Jordi Ortiz <>
  • To:
  • Subject: Re: [rare-dev] Prometheus DB and Grafana Dashboards
  • Date: Fri, 10 Dec 2021 12:43:28 +0100
  • Authentication-results: mx02.puc.rediris.es; spf=pass (rediris.es: domain of designates 155.54.212.167 as permitted sender)

Dear Carmen,
I hope this helps, here is the sensor definition I have in my wedge, take into account that you need a sensor for bytes and another for packets

wedge32umu#show run sensor ifaces-hw
sensor ifaces-hw
 path interfaces-hw/interface/counter
 prefix freertr-ifaces
 prepend iface_hw_byte_
 command sho inter hwsumm
 name 0 ifc=
 key name interfaces-hw/interface
 replace \. _
 column 1 name st
 column 1 replace admin -1
 column 1 replace down 0
 column 1 replace up 1
 column 2 name tx
 column 3 name rx
 column 4 name dr
 exit
sensor ifaces-hwp
 path interfaces-hwp/interface/counter
 prefix freertr-ifaces
 prepend iface_hw_pack_
 command sho inter hwpsumm
 name 0 ifc=
 key name interfaces-hwp/interface
 replace \. _
 column 1 name st
 column 1 replace admin -1
 column 1 replace down 0
 column 1 replace up 1
 column 2 name tx
 column 3 name rx
 column 4 name dr
 exit

Jordi
On 10/12/2021 12:18, Maria Del Carmen Misa Moreira wrote:
Hi all,

I'm creating some Grafana dashboards by using Prometheus DB.
I have data on ifaces-hw-byte-tx/rx but not on ifaces-hw-pack-tx/rx, any idea
about this? Maybe the sensors changed again or something like that.

Best regards,
Carmen Misa


On 01/12/2021 16:51 mc36 <> wrote:

hi,
well, we moved away to sensors framework when we added streaming telemetry
too...
these are the current sensors: http://sources.nop.hu/misc/sensor/
but as you should already spotted, freerouter show commands are almost
exclusively
tables, mostly ordered from left to right by the importance of the
information,
and this approach works well with prometheus... if you take a closer look on
these sensor definitions, they're just a show command and the columns to
export...
it means that you can easily define your very own sensor if you miss
something...
regarding the dataplanes, the dpdk dataplane attaches and updates the counters
on every aspect but the tofino dataplane does it in just come cases, and the
more sad thing is that the middleware bf_forwarder.p4 only reads the
subinterface
counters and not the rest of the counters... it's a point where things should
improve a lot so if you're willing to join the development, and you enjoy
python hacking then it's a point where really need some help... :)
regards,
cs



On 12/1/21 13:19, Fr d ric LOUI wrote:
Hi Carmen,

The blog you are referring is unfortunately not up to date.

"server prometheus is actually now using freeRtr sensors.

I'm glad as it is a good opportunity to update it !
Maybe if you are interested we can give you access to the blog in edit mode
and you can help us updating it ?

Apart from that I presume that mc36 will come up with more details on
exporting data via prometheus using sensor.

Basically it is a 2 steps process:

1) let s activate 4 sensors:

!
sensor ifaces-hw
path interfaces-hw/interface/counter
prefix freertr-ifaces
prepend iface_hw_byte_
command sho inter hwsumm
name 0 ifc=
key name interfaces-hw/interface
replace \. _
column 1 name st
column 1 replace admin -1
column 1 replace down 0
column 1 replace up 1
column 2 name tx
column 3 name rx
column 4 name dr
exit
!
sensor ifaces-hwp
path interfaces-hwp/interface/counter
prefix freertr-ifaces
prepend iface_hw_pack_
command sho inter hwpsumm
name 0 ifc=
key name interfaces-hwp/interface
replace \. _
column 1 name st
column 1 replace admin -1
column 1 replace down 0
column 1 replace up 1
column 2 name tx
column 3 name rx
column 4 name dr
exit
!
sensor ifaces-sw
path interfaces-sw/interface/counter
prefix freertr-ifaces
prepend iface_sw_byte_
command sho inter swsumm
name 0 ifc=
key name interfaces-sw/interface
replace \. _
column 1 name st
column 1 replace admin -1
column 1 replace down 0
column 1 replace up 1
column 2 name tx
column 3 name rx
column 4 name dr
exit
!
sensor ifaces-swp
path interfaces-swp/interface/counter
prefix freertr-ifaces
prepend iface_sw_pack_
command sho inter swpsumm
name 0 ifc=
key name interfaces-swp/interface
replace \. _
column 1 name st
column 1 replace admin -1
column 1 replace down 0
column 1 replace up 1
column 2 name tx
column 3 name rx
column 4 name dr
exit
!

Then activate prometheus server:

server prometheus pr
sensor ifaces-hw
sensor ifaces-hwp
sensor ifaces-sw
sensor ifaces-swp
interface tunnel123 <put source interface of your promtheus target>
vrf <PUT VRF where your prometheus server_is_>
exit

And you are good to go.

They are more sensors, this is a totally dynamic way to reflect FreeRtr
visibility and make it available to external prometheus server.

PS: Please let me know if you are willing to edit the Blog and I ll arrange
to grant you relevant access ! :)

All the best,
Frederic

Le 1 d c. 2021 13:02, Carmen Misa Moreira <> a
crit :

Hi all,

I would like to create Grafana Dashboards with the data and statistics
collected from the P4 switch.

I was reading the wiki
https://wiki.geant.org/pages/viewpage.action?pageId=154995651 but maybe it's
not up to date.

This example uses iface_hw_byte_ and iface_sw_byte_. I would like to know if
there is a command to list all the counters and metrics available to export
the data?

Best regards,

Carmen Misa


--
Jordi Ortiz


(+34)868884644/(+34)868888532
http://ants.inf.um.es/~jordiortiz
Dpto. Ingeniería de la Información y las Comunicaciones
Universidad de Murcia




Archive powered by MHonArc 2.6.19.

Top of Page