• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to read metrics from prometheus endpoint ?

Scheduled Pinned Locked Moved TNSR
8 Posts 4 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    jozefrebjak
    last edited by Oct 14, 2020, 12:48 PM

    We successfully configured prometheus endpoint like https://docs.netgate.com/tnsr/en/latest/monitoring/prometheus.html

    Everything is working, but how to read that data ? Is there some grafana dashboard for example or something else where we can learn how to use that stats ?

    We really want to use TNSR but we need statistics from dataplane.

    I believe that somebody figured it out and can help us.

    Thank you.

    1 Reply Last reply Reply Quote 1
    • K
      kiokoman LAYER 8
      last edited by kiokoman Oct 15, 2020, 6:05 PM Oct 15, 2020, 6:01 PM

      from what I read in the docs, Prometheus is running on top of centos8 and listening on the host management IP address
      I think any how-to you can find on the web can be used
      like this one
      https://prometheus.io/docs/visualization/grafana/
      also

      https://prometheus.io/docs/visualization/grafana/#importing-pre-built-dashboards-from-grafana-com
      Grafana.com maintains a collection of shared dashboards which can be downloaded and used
      https://grafana.com/grafana/dashboards?dataSource=prometheus

      ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
      Please do not use chat/PM to ask for help
      we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
      Don't forget to Upvote with the 👍 button for any post you find to be helpful.

      1 Reply Last reply Reply Quote 0
      • X
        xhun
        last edited by Oct 19, 2020, 8:24 AM

        It's quite straightforward to pull data from prometheus with Grafana as mentioned by kiokoman. We've done it 3 weeks ago in our test environment and it's working fine so far. I didn't find any dashboard 'ready to use' online but it would be nice if netgate team could provide a 'complete' dashboard later.

        There's one metric that I didn't find though which is the CPU utilization. Being able to know how much CPU is used by DPDK can be quite usefull. It is possible to get how many threads are being used, but not exactly how much is being used from each thread or in total. Is it possible to get this data somehow?

        J 1 Reply Last reply Oct 20, 2020, 2:53 PM Reply Quote 1
        • J
          jimp Rebel Alliance Developer Netgate @xhun
          last edited by Oct 20, 2020, 2:53 PM

          @xhun said in How to read metrics from prometheus endpoint ?:

          There's one metric that I didn't find though which is the CPU utilization. Being able to know how much CPU is used by DPDK can be quite usefull. It is possible to get how many threads are being used, but not exactly how much is being used from each thread or in total. Is it possible to get this data somehow?

          The dataplane will use 100% of a core at all times when polling data. CPU usage is not a relevant metric to TNSR.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          X 1 Reply Last reply Oct 20, 2020, 3:16 PM Reply Quote 0
          • X
            xhun @jimp
            last edited by Oct 20, 2020, 3:16 PM

            @jimp said in How to read metrics from prometheus endpoint ?:

            The dataplane will use 100% of a core at all times when polling data. CPU usage is not a relevant metric to TNSR.

            Hi,

            I'm aware that in the host/kernel it always shows 100% of utilization for each core assigned to the dataplane, which is the common behaviour with DPDK. I've seen in other vRouters a metric showing how much is actually being used by the dataplane.

            Lets suppose the router is in "idle" with a couple of hundreds pps running through it, and then with 1M pps.. it does make sense to have some measurement of CPU utilization showing how it increases and decreases with PPS and so on, because that's actually the case or not? It would be useful in order to know when and if needed to add additional cores to the dataplane.

            1 Reply Last reply Reply Quote 1
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Oct 20, 2020, 4:01 PM

              I don't have a list of the current TNSR prometheus data handy but what you need to look for there are stats from the dataplane. I don't think we have a command in the TNSR CLI to get these specific ones yet, but the interesting ones are in the top part of sudo vppctl show runtime like the vector rate and loops/sec. (Higher vector rate means higher load, less loops/sec also means higher load)

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              X 1 Reply Last reply Oct 20, 2020, 4:06 PM Reply Quote 2
              • X
                xhun @jimp
                last edited by Oct 20, 2020, 4:06 PM

                @jimp
                Thank you for the output. I'll check vppctl.

                1 Reply Last reply Reply Quote 0
                • J
                  jimp Rebel Alliance Developer Netgate
                  last edited by Oct 23, 2020, 2:05 PM

                  I had a chance to look at the data from Prometheus on TNSR and the nodes you'll be interested in to track load appear to be:

                  • _sys_vector_rate
                  • _sys_vector_rate_per_worker

                  That's on 20.10 which will be out soon. I didn't have a 20.08 system with Prometheus handy to see if it had the same data.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 2
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                    This community forum collects and processes your personal information.
                    consent.not_received