> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get monitors state in metrics (prometheus) format for authorized user.

> Example of success response:

```
HELP healthcheck_state The `healthcheck_state` metric reflects the state of a specific monitor after conducting a health check
TYPE healthcheck_state gauge
healthcheck_state{client_id="1",monitor_id="431",monitor_locations="us-east-1,us-west-1",monitor_name="test-monitor-1",monitor_type="http",rrset_name="rrset-name1",rrset_type="rrset-type1",zone_name="zone-name1"} 0
healthcheck_state{client_id="1",monitor_id="4871",monitor_locations="fr-1,fr-2",monitor_name="test-monitor-2",monitor_type="tcp",rrset_name="rrset-name2",rrset_type="rrset-type2",zone_name="zone-name2"} 1
healthcheck_state{client_id="2",monitor_id="7123",monitor_locations="ua-1,ua-2",monitor_name="test-monitor-3",monitor_type="icmp",rrset_name="rrset-name3",rrset_type="rrset-type3",zone_name="zone-name3"} 0
```



## OpenAPI

````yaml /api-reference/services_documented/dns_api.yaml get /dns/v2/monitor/metrics
openapi: 3.1.0
info:
  title: Gcore OpenAPI – DNS API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-07T20:33:46.548242+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Analyze
    x-displayName: Analyze
  - name: DNS Locations
    x-displayName: DNS Locations
  - name: Lookup
    x-displayName: Lookup
  - name: Metrics
    x-displayName: Metrics
  - name: NetworkMappings
    x-displayName: NetworkMappings
  - name: Pickers
    x-displayName: Pickers
  - name: DNS Clients
    x-displayName: DNS Clients
  - name: Zones
    x-displayName: Zones
  - name: DNSSEC
    x-displayName: DNSSEC
  - name: RRsets
    x-displayName: RRsets
paths:
  /dns/v2/monitor/metrics:
    get:
      tags:
        - Metrics
      summary: Get monitors state in metrics (prometheus) format for authorized user.
      description: >-
        Example of success response:


        ```

        HELP healthcheck_state The `healthcheck_state` metric reflects the state
        of a specific monitor after conducting a health check

        TYPE healthcheck_state gauge

        healthcheck_state{client_id="1",monitor_id="431",monitor_locations="us-east-1,us-west-1",monitor_name="test-monitor-1",monitor_type="http",rrset_name="rrset-name1",rrset_type="rrset-type1",zone_name="zone-name1"}
        0

        healthcheck_state{client_id="1",monitor_id="4871",monitor_locations="fr-1,fr-2",monitor_name="test-monitor-2",monitor_type="tcp",rrset_name="rrset-name2",rrset_type="rrset-type2",zone_name="zone-name2"}
        1

        healthcheck_state{client_id="2",monitor_id="7123",monitor_locations="ua-1,ua-2",monitor_name="test-monitor-3",monitor_type="icmp",rrset_name="rrset-name3",rrset_type="rrset-type3",zone_name="zone-name3"}
        0

        ```
      operationId: MonitorMetrics
      parameters:
        - name: client_ids
          in: query
          description: >-
            Admin and technical user can specify `client_id` to get metrics for
            particular client.

            Ignored for client
          style: form
          explode: false
          schema:
            type: array
            items:
              type: integer
              format: uint64
        - name: zone_names
          in: query
          description: >-
            Admin and technical user can specify `monitor_id` to get metrics for
            particular zone.

            Ignored for client
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          content:
            plain/text:
              schema:
                type: string
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            metrics = client.dns.metrics.list()
            print(metrics)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/dns\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmetrics, err := client.DNS.Metrics.List(context.TODO(), dns.MetricListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", metrics)\n}\n"
components:
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````