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: mc36 <>
  • To: , Maria Del Carmen Misa Moreira <>
  • Subject: Re: [rare-dev] Prometheus DB and Grafana Dashboards
  • Date: Fri, 10 Dec 2021 15:17:10 +0100

hi,
yeahhh, so that would be the last part of the process so if you have the
readings then the last thing would be to export the sensors within a
prometheus server..
regards,
cs

On 12/10/21 14:59, Maria Del Carmen Misa Moreira wrote:
Hi Jordi and Csaba,

The declaration of the sensors were like that. I run these commands without
problems and now I have data on both sensors, my apologies maybe I didn't
export all of them.

Cheers,
Carmen Misa

On 10/12/2021 13:03 mc36 <> wrote:

hi,
could you please check the following:
1-the counters are reported from the dataplane:
sho inter hwsumm
sho inter hwpsumm
2-if the sensor data created properly?
sho sens ifaces-hw
sho sens ifaces-hwp
3-if the sensors are replyed properly?
sho sens
thanks,
cs



On 12/10/21 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





Archive powered by MHonArc 2.6.19.

Top of Page