Ad Widget

Collapse

How to connect prometheus with zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • samantha.v
    Junior Member
    • Aug 2024
    • 4

    #1

    How to connect prometheus with zabbix

    Hi Team,

    I am working on integrating Prometheus with Zabbix to monitor a Kubernetes cluster. We are aiming to gather all metrics data from Prometheus and visualize it within Zabbix. According to the documentation, this can be achieved using templates.

    However, I am using Zabbix version 7.0.3 and have been unable to locate the Prometheus template. Could someone provide guidance on how to find or use the appropriate template for Prometheus integration with Zabbix? Any assistance or recommendations for monitoring an entire Kubernetes cluster using this setup would be greatly appreciated.

    Thank you!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    There is no universal Prometheus template... Prometheus checks are described in docs.. https://www.zabbix.com/documentation...pes/prometheus

    Kubernetes monitoring is described there -> https://www.zabbix.com/integrations/kubernetes

    Comment

    • samantha.v
      Junior Member
      • Aug 2024
      • 4

      #3

      Hi, i tried using kubernetes cluster state by http. I created the host and linked to the template. I was able to get the latest data around 2000+ but no graph and dashboards. When i check for the each data i am getting no data. And issue regarding prometheus. Can you help me how to troubleshoot this one.
      1. Created a host linked the kubernetes cluster state by http. Passing the kube_api_url and kube_api_token of the cluster in macros.

      Please do help me out to get the kubernetes cluster metrics -






      Attached Files

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        I have never used any of that. But your first pic shows error or preprocessing, which looks like your master items returns "error" instead of data and thus your other items are not abel to populate, as they do not find any needed patterns from master item.

        Comment

        • samantha.v
          Junior Member
          • Aug 2024
          • 4

          #5
          Now i am able to get the data by using the temple kubernetes cluster by http & kubernetes nodes by http.
          I wanted to use prometheus as a datasource just how we use in grafana, please let me know if that can be achieved.

          Comment

          • LyonKing
            Junior Member
            • Aug 2020
            • 5

            #6
            Hi Samantha,

            Have you achieved your objective?

            You need to create a new template with an item that queries the Prometheus metrics endpoint and sets "Prometheus to JSON" preprocessing for each "key." you want. Then, you’ll need to create a dependent item with a Prometheus pattern to retrieve the specific data you want. As for the discovery process, I’m not sure how to approach that.

            I'm working on this task, but it’s quite tedious... If you already have this template, could you please share it?

            Thank you!

            Comment

            • samantha.v
              Junior Member
              • Aug 2024
              • 4

              #7
              Hi LyonKing, i tried the way you suggested by creating new template. But it is not feasible because i will need to write queries for each item, our task was to monitor cluster using prometheus node-exporter. Just how we are able to monitor in Grafana. I failed over here. I used the different method to get the details of kubernetes cluster to monitor as the templates were ready in zabbix.

              Comment

              Working...