Ask Your Question
4

What is the process for making the Hasura (docker container) metrics available to Prometheus?

asked 2023-07-03 07:42:21 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-03 08:04:01 +0000

huitzilopochtli gravatar image

To make the Hasura metrics available to Prometheus, follow these steps:

  1. Install Prometheus on your system if it is not already installed.

  2. Install the Prometheus Node Exporter on the Hasura server. This is a Prometheus exporter for machine level metrics.

  3. Ensure that the Hasura server is running with the --metrics flag enabled. This flag exposes the Hasura metrics on port 8080.

  4. Create a Prometheus configuration file (prometheus.yml) and add the Hasura server as a target. This file should contain configuration information about the Prometheus server and the targets to scrape for metrics.

  5. Restart Prometheus so it can reload the new configuration file.

  6. Verify that Prometheus is scraping the Hasura metrics by checking the Prometheus console for the Hasura server metrics.

  7. Visualize the Hasura metrics in Prometheus in order to monitor and analyze performance.

Sample Prometheus configuration file:

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: 'hasura'
    metrics_path: /metrics
    scheme: http
    static_configs:
      - targets: ['<HASURA_SERVER_IP>:8080']

Note: Replace <HASURA_SERVER_IP> with the IP address of the Hasura server.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-03 07:42:21 +0000

Seen: 13 times

Last updated: Jul 03 '23