gateway-api-metrics-exporter

command module
v0.0.0-...-588a842 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

README

Gateway API Metrics Exporter

Overview

The Gateway API Metrics Exporter is a tool designed to provide observability for Gateway API resources by exporting relevant metrics.

This project is a successor to gateway-api-state-metrics project. There are limitations with what resource information can be exposed using the underlying kube-state-metrics project leveraged by gateway-api-state-metrics. This project aims to allow additional stateful information about Gateway API resources to be made available via metrics. For additional information on why this project exists, see https://github.com/Kuadrant/architecture/blob/main/rfcs/0010-gateway-api-metrics-exporter.md

Features

  • Metrics Collection: Gathers stateful metrics for Gateway API resources including GatewayClasses, Gateways and HTTPRoutes.
  • Prometheus Integration: Exports metrics in a Prometheus-compatible format for easy integration.

Installation

Prerequisites
  • Kubernetes cluster (v1.20+)
Steps
Bringing up a local kind cluster
kind create cluster
kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.1.0/standard-install.yaml
Running out of cluster
KUBECONFIG=/path/to/.kube/config go run main.go
Running in cluster

Details TBD

Usage

Once deployed, the exporter will automatically start collecting and exporting metrics. You can view these metrics through your Prometheus instance or any compatible monitoring tool. The metrics scrape endpoint is /metrics

If running the exporter locally, you can use curl to try it out:

curl http://localhost:8080/metrics

You can also create some sample resources (no need for a gateway-api provider to be installed, just the CRDs):

kubectl apply -f ./tests/manifests/

If the curl was successful, you should see some metrics like this:

curl -s http://localhost:8080/metrics | grep gatewayapi
# HELP gatewayapi_gatewayclass_info Information about a GatewayClass
# TYPE gatewayapi_gatewayclass_info gauge
gatewayapi_gatewayclass_info{name="testgatewayclass1"} 1

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

License

This project is licensed under the Apache 2.0 License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL