Skip to content

Commit 995dcd7

Browse files
committed
Add doctoc to automatically generate TOCs
1 parent 95324ec commit 995dcd7

File tree

8 files changed

+131
-12
lines changed

8 files changed

+131
-12
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,12 @@ repos:
4444
rev: v1.35.1
4545
hooks:
4646
- id: yamllint
47+
48+
- repo: https://github.com/thlorenz/doctoc
49+
rev: v2.2.0
50+
hooks:
51+
- id: doctoc
52+
args: [--update-only, --title, "## Table of Contents"]
53+
4754
ci:
4855
skip: [golangci-lint-full]

CONTRIBUTING.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,24 @@ are considering contributing!
55

66
## Table Of Contents
77

8-
[Ask a Question](#ask-a-question)
9-
10-
[Getting Started](#getting-started)
11-
12-
[Contributing](#contributing)
13-
14-
[Style Guides](#style-guides)
15-
16-
- [Git Style Guide](#git-style-guide)
17-
- [Go Style Guide](#go-style-guide)
18-
19-
[Code of Conduct](CODE_OF_CONDUCT.md)
8+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
9+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
10+
## Table of Contents
11+
12+
- [Ask a Question](#ask-a-question)
13+
- [Getting Started](#getting-started)
14+
- [Project Structure](#project-structure)
15+
- [Contributing](#contributing)
16+
- [Report a Bug](#report-a-bug)
17+
- [Suggest an Enhancement](#suggest-an-enhancement)
18+
- [Open a Pull Request](#open-a-pull-request)
19+
- [Issue lifecycle](#issue-lifecycle)
20+
- [F5 Contributor License Agreement (CLA)](#f5-contributor-license-agreement-cla)
21+
- [Style Guides](#style-guides)
22+
- [Git Style Guide](#git-style-guide)
23+
- [Go Style Guide](#go-style-guide)
24+
25+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2026

2127
## Ask a Question
2228

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,59 @@
1818

1919
NGINX Prometheus exporter makes it possible to monitor NGINX or NGINX Plus using Prometheus.
2020

21+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
22+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
23+
## Table of Contents
24+
25+
- [Overview](#overview)
26+
- [Getting Started](#getting-started)
27+
- [A Note about NGINX Ingress Controller](#a-note-about-nginx-ingress-controller)
28+
- [Prerequisites](#prerequisites)
29+
- [Running the Exporter in a Docker Container](#running-the-exporter-in-a-docker-container)
30+
- [Running the Exporter Binary](#running-the-exporter-binary)
31+
- [Usage](#usage)
32+
- [Command-line Arguments](#command-line-arguments)
33+
- [Exported Metrics](#exported-metrics)
34+
- [Common metrics](#common-metrics)
35+
- [Metrics for NGINX OSS](#metrics-for-nginx-oss)
36+
- [Stub status metrics](#stub-status-metrics)
37+
- [Metrics for NGINX Plus](#metrics-for-nginx-plus)
38+
- [Connections](#connections)
39+
- [HTTP](#http)
40+
- [SSL](#ssl)
41+
- [HTTP Server Zones](#http-server-zones)
42+
- [Stream Server Zones](#stream-server-zones)
43+
- [HTTP Upstreams](#http-upstreams)
44+
- [Stream Upstreams](#stream-upstreams)
45+
- [Stream Zone Sync](#stream-zone-sync)
46+
- [Location Zones](#location-zones)
47+
- [Resolver](#resolver)
48+
- [HTTP Requests Rate Limiting](#http-requests-rate-limiting)
49+
- [HTTP Connections Limiting](#http-connections-limiting)
50+
- [Stream Connections Limiting](#stream-connections-limiting)
51+
- [Cache](#cache)
52+
- [Worker](#worker)
53+
- [Troubleshooting](#troubleshooting)
54+
- [Releases](#releases)
55+
- [Docker images](#docker-images)
56+
- [Binaries](#binaries)
57+
- [Homebrew](#homebrew)
58+
- [Snap](#snap)
59+
- [Building the Exporter](#building-the-exporter)
60+
- [Building the Docker Image](#building-the-docker-image)
61+
- [Building the Binary](#building-the-binary)
62+
- [Grafana Dashboard](#grafana-dashboard)
63+
- [SBOM (Software Bill of Materials)](#sbom-software-bill-of-materials)
64+
- [Binaries](#binaries-1)
65+
- [Docker Image](#docker-image)
66+
- [Provenance](#provenance)
67+
- [Contacts](#contacts)
68+
- [Contributing](#contributing)
69+
- [Support](#support)
70+
- [License](#license)
71+
72+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
73+
2174
## Overview
2275

2376
[NGINX](https://nginx.org) exposes a handful of metrics via the [stub_status

examples/basic_auth/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ password `password`.
77
The full documentation for the web configuration can be found
88
[here](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).
99

10+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
11+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
12+
## Table of Contents
13+
14+
- [Prerequisites](#prerequisites)
15+
- [Running NGINX Prometheus Exporter with Web Configuration in Basic Authentication mode](#running-nginx-prometheus-exporter-with-web-configuration-in-basic-authentication-mode)
16+
- [Verification](#verification)
17+
18+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
19+
1020
## Prerequisites
1121

1222
- NGINX Prometheus Exporter binary. See the [main README](../../README.md) for installation instructions.

examples/kubernetes/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
This example shows how to run NGINX Prometheus Exporter in a Kubernetes cluster.
44

5+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
6+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7+
## Table of Contents
8+
9+
- [Prerequisites](#prerequisites)
10+
- [Create a kind cluster](#create-a-kind-cluster)
11+
- [Deploy the NGINX Hello application and NGINX Prometheus Exporter](#deploy-the-nginx-hello-application-and-nginx-prometheus-exporter)
12+
- [Configure port forwarding](#configure-port-forwarding)
13+
- [Verification](#verification)
14+
15+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
16+
517
## Prerequisites
618

719
- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) installed.

examples/systemd/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
This example shows how to run NGINX Prometheus Exporter with systemd-activated socket.
44

5+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
6+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7+
## Table of Contents
8+
9+
- [Prerequisites](#prerequisites)
10+
- [Customization](#customization)
11+
- [Installation](#installation)
12+
- [Verification](#verification)
13+
14+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
15+
516
## Prerequisites
617

718
- Linux machine with [systemd](https://www.freedesktop.org/wiki/Software/systemd/).

examples/tls/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ Additionally, there are two example TLS files `server.crt` and `server.key` that
77
The full documentation for the web configuration can be found
88
[here](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).
99

10+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
11+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
12+
## Table of Contents
13+
14+
- [Prerequisites](#prerequisites)
15+
- [Running NGINX Prometheus Exporter with Web Configuration in TLS mode](#running-nginx-prometheus-exporter-with-web-configuration-in-tls-mode)
16+
- [Verification](#verification)
17+
18+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
19+
1020
## Prerequisites
1121

1222
- NGINX Prometheus Exporter binary. See the [main README](../../README.md) for installation instructions.

grafana/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
We provide the official Grafana dashboard that visualizes the NGINX metrics exposed by the exporter. The dashboard
44
allows you to filter metrics per instance or see the metrics from all instances.
55

6+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
7+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
8+
## Table of Contents
9+
10+
- [Prerequisites](#prerequisites)
11+
- [Installing the Dashboard](#installing-the-dashboard)
12+
- [Graphs](#graphs)
13+
14+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
15+
616
## Prerequisites
717

818
The dashboard has been tested with the following software versions:

0 commit comments

Comments
 (0)