Skip to content

Commit e9b7fe9

Browse files
authored
docs: Fix links master -> main (#2138)
There are a few repos which have migrated from `master` to `main` this reflects that change for the ones which have made the transition. Additionally cleanup some End of Line whitespace. Signed-off-by: Harold Dost <[email protected]>
1 parent 6569b34 commit e9b7fe9

12 files changed

+65
-65
lines changed

MAINTAINERS.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Documentation that refers to a specific project within the Prometheus ecosystem
22
is maintained by the maintainers of the respective project. For example, refer
33
to the maintainers specified in Alertmanager's
4-
[MAINTAINERS.md](https://github.com/prometheus/alertmanager/blob/master/MAINTAINERS.md)
4+
[MAINTAINERS.md](https://github.com/prometheus/alertmanager/blob/main/MAINTAINERS.md)
55
file for documentation about the Alertmanager.
66

77
Note that the documentation for the Prometheus server is located in the
88
[prometheus/prometheus
9-
repository](https://github.com/prometheus/prometheus/tree/master/docs) itself.
9+
repository](https://github.com/prometheus/prometheus/tree/main/docs) itself.
1010

1111
For anything that is not documentation for a specific project, refer to the
1212
following maintainers with their focus areas:

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for general instructions for new Promet
99

1010
The main documentation contents of this website are located in the [`content/docs`](content/docs) directory.
1111

12-
Documentation concerning the Prometheus server is [maintained in the Prometheus server repository](https://github.com/prometheus/prometheus/tree/master/docs) and cloned into the website at build time.
12+
Documentation concerning the Prometheus server is [maintained in the Prometheus server repository](https://github.com/prometheus/prometheus/tree/main/docs) and cloned into the website at build time.
1313

1414
As a guideline, please keep the documentation generally applicable and avoid use-case-specific changes.
1515

@@ -61,7 +61,7 @@ If you have the prerequisite access rights, you can view the Netlify settings he
6161
* GitHub webhook notifying Netlify of branch changes: https://github.com/prometheus/docs/settings/hooks
6262
* Netlify project: https://app.netlify.com/sites/prometheus-docs
6363

64-
Changes to the `master` branch are deployed to the main site at https://prometheus.io.
64+
Changes to the `main` branch are deployed to the main site at https://prometheus.io.
6565

6666
Netlify also creates preview deploys for every pull request. To view these for a PR where all checks have passed:
6767

content/blog/2015-06-01-advanced-service-discovery.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mechanisms to Prometheus.
1616

1717
Aside from many smaller fixes and improvements, you can now also reload your configuration during
1818
runtime by sending a `SIGHUP` to the Prometheus process. For a full list of changes, check the
19-
[changelog for this release](https://github.com/prometheus/prometheus/blob/master/CHANGELOG.md#0140--2015-06-01).
19+
[changelog for this release](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md#0140--2015-06-01).
2020

2121
In this blog post, we will take a closer look at the built-in service discovery mechanisms and provide
2222
some practical examples. As an additional resource, see

content/blog/2017-06-21-prometheus-20-alpha3-new-rule-format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Alerting and recording rules are one of the critical features of Prometheus. But
2525

2626
* All rules ran with the same interval. We could have some heavy rules that are better off being run at a 10-minute interval and some rules that could be run at 15-second intervals.
2727

28-
* All rules were evaluated concurrently, which is actually Prometheus’ oldest [open bug](https://github.com/prometheus/prometheus/blob/master/rules/manager.go#L267). This has a couple of issues, the obvious one being that the load spikes every eval interval if you have a lot of rules. The other being that rules that depend on each other might be fed outdated data. For example:
28+
* All rules were evaluated concurrently, which is actually Prometheus’ oldest [open bug](https://github.com/prometheus/prometheus/blob/main/rules/manager.go#L267). This has a couple of issues, the obvious one being that the load spikes every eval interval if you have a lot of rules. The other being that rules that depend on each other might be fed outdated data. For example:
2929

3030
```
3131
instance:network_bytes:rate1m = sum by(instance) (rate(network_bytes_total[1m]))

content/blog/2018-07-05-implementing-custom-sd.md

+17-17
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ outside the team and then not maintained or tested well. We want to commit to on
1616
integration with service discovery mechanisms that we know we can maintain, and that work as intended.
1717
For this reason, there is currently a moratorium on new SD integrations.
1818

19-
However, we know there is still a desire to be able to integrate with other SD mechanisms, such as
20-
Docker Swarm. Recently a small code change plus an example was committed to the documentation
21-
[directory](https://github.com/prometheus/prometheus/tree/master/documentation/examples/custom-sd)
19+
However, we know there is still a desire to be able to integrate with other SD mechanisms, such as
20+
Docker Swarm. Recently a small code change plus an example was committed to the documentation
21+
[directory](https://github.com/prometheus/prometheus/tree/main/documentation/examples/custom-sd)
2222
within the Prometheus repository for implementing a custom service discovery integration without having
2323
to merge it into the main Prometheus binary. The code change allows us to make use of the internal
2424
Discovery Manager code to write another executable that interacts with a new SD mechanism and outputs
2525
a file that is compatible with Prometheus' file\_sd. By co-locating Prometheus and our new executable
2626
we can configure Prometheus to read the file\_sd-compatible output of our executable, and therefore
2727
scrape targets from that service discovery mechanism. In the future this will enable us to move SD
2828
integrations out of the main Prometheus binary, as well as to move stable SD integrations that make
29-
use of the adapter into the Prometheus
30-
[discovery](https://github.com/prometheus/prometheus/tree/master/discovery) package.
29+
use of the adapter into the Prometheus
30+
[discovery](https://github.com/prometheus/prometheus/tree/main/discovery) package.
3131

32-
Integrations using file_sd, such as those that are implemented with the adapter code, are listed
32+
Integrations using file_sd, such as those that are implemented with the adapter code, are listed
3333
[here](https://prometheus.io/docs/operating/integrations/#file-service-discovery).
3434

3535
Let’s take a look at the example code.
3636

3737
## Adapter
38-
First we have the file
39-
[adapter.go](https://github.com/prometheus/prometheus/blob/master/documentation/examples/custom-sd/adapter/adapter.go).
38+
First we have the file
39+
[adapter.go](https://github.com/prometheus/prometheus/blob/main/documentation/examples/custom-sd/adapter/adapter.go).
4040
You can just copy this file for your custom SD implementation, but it's useful to understand what's
4141
happening here.
4242

@@ -70,25 +70,25 @@ from our SD mechanism.
7070
Labels map[string]string `json:"labels"`
7171
}
7272

73-
This `customSD` struct exists mostly to help us convert the internal Prometheus `targetgroup.Group`
73+
This `customSD` struct exists mostly to help us convert the internal Prometheus `targetgroup.Group`
7474
struct into JSON for the file\_sd format.
7575

7676
When running, the adapter will listen on a channel for updates from our custom SD implementation.
7777
Upon receiving an update, it will parse the targetgroup.Groups into another `map[string]*customSD`,
7878
and compare it with what’s stored in the `groups` field of Adapter. If the two are different, we assign
79-
the new groups to the Adapter struct, and write them as JSON to the output file. Note that this
79+
the new groups to the Adapter struct, and write them as JSON to the output file. Note that this
8080
implementation assumes that each update sent by the SD implementation down the channel contains
8181
the full list of all target groups the SD knows about.
8282

8383
## Custom SD Implementation
8484

8585
Now we want to actually use the Adapter to implement our own custom SD. A full working example is in
8686
the same examples directory
87-
[here](https://github.com/prometheus/prometheus/blob/master/documentation/examples/custom-sd/adapter-usage/main.go).
87+
[here](https://github.com/prometheus/prometheus/blob/main/documentation/examples/custom-sd/adapter-usage/main.go).
8888

89-
Here you can see that we’re importing the adapter code
89+
Here you can see that we’re importing the adapter code
9090
`"github.com/prometheus/prometheus/documentation/examples/custom-sd/adapter"` as well as some other
91-
Prometheus libraries. In order to write a custom SD we need an implementation of the Discoverer interface.
91+
Prometheus libraries. In order to write a custom SD we need an implementation of the Discoverer interface.
9292

9393
// Discoverer provides information about target groups. It maintains a set
9494
// of sources from which TargetGroups can originate. Whenever a discovery provider
@@ -110,13 +110,13 @@ We really just have to implement one function, `Run(ctx context.Context, up chan
110110
This is the function the manager within the Adapter code will call within a goroutine. The Run function
111111
makes use of a context to know when to exit, and is passed a channel for sending it's updates of target groups.
112112

113-
Looking at the [Run](https://github.com/prometheus/prometheus/blob/master/documentation/examples/custom-sd/adapter-usage/main.go#L153-L211)
113+
Looking at the [Run](https://github.com/prometheus/prometheus/blob/main/documentation/examples/custom-sd/adapter-usage/main.go#L153-L211)
114114
function within the provided example, we can see a few key things happening that we would need to do
115115
in an implementation for another SD. We periodically make calls, in this case to Consul (for the sake
116-
of this example, assume there isn’t already a built-in Consul SD implementation), and convert the
116+
of this example, assume there isn’t already a built-in Consul SD implementation), and convert the
117117
response to a set of `targetgroup.Group` structs. Because of the way Consul works, we have to first make
118118
a call to get all known services, and then another call per service to get information about all the
119-
backing instances.
119+
backing instances.
120120

121121
Note the comment above the loop that’s calling out to Consul for each service:
122122

@@ -149,7 +149,7 @@ Prometheus as Docker containers via docker-compose when working with the example
149149
container_name: consul
150150
ports:
151151
- 8300:8300
152-
- 8500:8500
152+
- 8500:8500
153153
volumes:
154154
- ${PWD}/consul.json:/consul/config/consul.json
155155
prometheus:

0 commit comments

Comments
 (0)