-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1473 from grafana/prepare-2.0.0-rc.3
Prepare 2.0.0-rc.3
- Loading branch information
Showing
187 changed files
with
3,868 additions
and
2,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0-rc.2 | ||
2.0.0-rc.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
docs/sources/contributing/_index.md → docs/internal/contributing/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
docs/internal/contributing/design-patterns-and-conventions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: "Design patterns and code conventions" | ||
description: "" | ||
weight: 10 | ||
--- | ||
|
||
# Design patterns and code conventions | ||
|
||
Grafana Mimir adopts some design patterns and code conventions that we ask you to follow when contributing to the project. These conventions have been adopted based on the experience gained over the time and aim to enforce good coding practices and keep a consistent UX (ie. config). | ||
|
||
## Go coding style | ||
|
||
Grafana Mimir follows the [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) styleguide and the [Formatting and style](https://peter.bourgon.org/go-in-production/#formatting-and-style) section of Peter Bourgon's [Go: Best Practices for Production Environments](https://peter.bourgon.org/go-in-production/). | ||
|
||
## No global variables | ||
|
||
- Do not use global variables | ||
|
||
## Prometheus metrics | ||
|
||
When registering a metric: | ||
|
||
- Do not use a global variable for the metric | ||
- Create and register the metric with `promauto.With(reg)` | ||
- In any internal Grafana Mimir component, do not register the metric to the default prometheus registerer, but take the registerer in input (ie. `NewComponent(reg prometheus.Registerer)`) | ||
|
||
Testing metrics: | ||
|
||
- When writing using tests, test exported metrics using `testutil.GatherAndCompare()` | ||
|
||
## Config file and CLI flags conventions | ||
|
||
Naming: | ||
|
||
- Config file options should be lowercase with words `_` (underscore) separated (ie. `memcached_client`) | ||
- CLI flags should be lowercase with words `-` (dash) separated (ie. `memcached-client`) | ||
- When adding a new config option, look if a similar one already exists within the [config](../configuration/config-file-reference.md) and keep the same naming (ie. `addresses` for a list of network endpoints) | ||
|
||
Documentation: | ||
|
||
- A CLI flag mentioned in the documentation or changelog should be always prefixed with a single `-` (dash) |
2 changes: 0 additions & 2 deletions
2
...ontributing/how-integration-tests-work.md → ...ontributing/how-integration-tests-work.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ributing/how-to-upgrade-golang-version.md → ...ributing/how-to-upgrade-golang-version.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,44 @@ | ||
--- | ||
title: "Tenant injector" | ||
title: "Trafficdump" | ||
description: "" | ||
weight: 100 | ||
--- | ||
|
||
# Trafficdump | ||
|
||
Trafficdump tool can read packets from captured tcpdump output, reassemble them into TCP streams | ||
and parse HTTP requests and responses. It then prints requests and responses as json (one request/response per line) | ||
Trafficdump is a tool that can read packets from captured `tcpdump` output, reassemble them into TCP streams | ||
and parse HTTP requests and responses. It then prints requests and responses as JSON (one request/response per line) | ||
for further processing. Trafficdump can only parse "raw" HTTP requests and responses, and not HTTP requests and responses | ||
wrapped in gRPC, as used by Mimir between some components. Best place to capture such traffic is on the entrypoint to Mimir | ||
(eg. authentication gateway/proxy). | ||
wrapped in gRPC, as used by Grafana Mimir between some components. The best place to capture such traffic is on the entrypoint to Grafana Mimir | ||
(e.g. authentication gateway/proxy). | ||
|
||
It has some Mimir-specific and generic HTTP features: | ||
It has some Grafana Mimir-specific and generic HTTP features: | ||
|
||
- filter requests based on Tenant (in Basic or X-Scope-OrgId header) | ||
- filter requests based on URL path | ||
- filter requests based on status code of the response | ||
- decode Mimir push requests | ||
- decode Grafana Mimir push requests | ||
- filter requests based on matching series in push requests | ||
|
||
Trafficdump can be used to inspect both remote-write requests and queries. | ||
|
||
Note that trafficdump currently cannot decode `LINUX_SSL2` link type, which is used when doing `tcpdump -i any` on Linux. | ||
## Installation | ||
|
||
Trafficdump requires that the pcap library be installed prior to tool compilation. The following are examples for | ||
installing the prerequisite pcap library: | ||
|
||
- `sudo apt install libpcap-dev` : Ubuntu and its derivatives | ||
- `dnf install libpcap-devel` : Fedora, CentOS, Red Hat | ||
|
||
Once libpcap is installed, build the `trafficdump` binary in the `tools/trafficdump` directory: | ||
|
||
```shell | ||
cd mimir/tools/trafficdump | ||
make | ||
``` | ||
|
||
If the build is successful the `trafficdump` binary will be in the same directory. You can list the tool's options with | ||
`./trafficdump -h`. | ||
|
||
Note that Trafficdump currently cannot decode `LINUX_SSL2` link type, which is used when doing `tcpdump -i any` on Linux. | ||
Capturing traffic with `tcpdump -i eth0` (and link type ETHERNET / EN10MB) works fine. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,31 @@ | ||
--- | ||
title: "Mimir technical documentation" | ||
linkTitle: "Documentation" | ||
title: "Grafana Mimir technical documentation" | ||
weight: 1 | ||
menu: | ||
main: | ||
weight: 1 | ||
--- | ||
|
||
Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for [Prometheus](https://prometheus.io). | ||
Grafana Mimir provides horizontally scalable, highly available, multi-tenant, long-term storage for [Prometheus](https://prometheus.io). | ||
|
||
- **Horizontally scalable:** Mimir can run across multiple machines in a cluster, exceeding the throughput and storage of a single machine. This enables you to send the metrics from multiple Prometheus servers to a single Mimir cluster and run "globally aggregated" queries across all data in a single place. | ||
- **Highly available:** When run in a cluster, Mimir can replicate data between machines. This allows you to survive machine failure without gaps in your graphs. | ||
- **Multi-tenant:** Mimir can isolate data and queries from multiple different independent | ||
- **Horizontally scalable:** Grafana Mimir can run across multiple machines in a cluster, exceeding the throughput and storage of a single machine. This enables you to send the metrics from multiple Prometheus servers to a single Grafana Mimir cluster and run globally aggregated queries across all data in a single place. | ||
- **Highly available:** When run in a cluster, Grafana Mimir replicates data between machines. | ||
This makes Grafana Mimir resilient to machine failure, which ensures that there is no data missing in your graphs. | ||
- **Multi-tenant:** Grafana Mimir can isolate data and queries from multiple independent | ||
Prometheus sources in a single cluster, allowing untrusted parties to share the same cluster. | ||
- **Long term storage:** Mimir supports S3, GCS, Swift and Microsoft Azure for long term storage of metric data. This allows you to durably store data for longer than the lifetime of any single machine, and use this data for long term capacity planning. | ||
- **Long-term storage:** Grafana Mimir supports S3, GCS, Swift, and Microsoft Azure for long-term storage of metric data. This enables you to durably store data for longer than the lifetime of a single machine, and use this data for long-term capacity planning. | ||
|
||
## Documentation | ||
|
||
If you’re new to Mimir, read the [Getting started guide](getting-started/_index.md). | ||
If you’re new to Grafana Mimir, read [Getting started with Grafana Mimir]({{< relref "./getting-started/_index.md" >}}). | ||
|
||
Before deploying Mimir with a permanent storage backend, read: | ||
Before deploying Grafana Mimir, read: | ||
|
||
1. [An overview of Mimir’s architecture](architecture.md) | ||
1. [Getting started with Mimir](getting-started/_index.md) | ||
1. [Configuring Mimir](configuring/_index.md) | ||
1. [Grafana Mimir architecture]({{< relref "architecture.md" >}}) | ||
1. [Getting started with Grafana Mimir]({{< relref "getting-started/_index.md" >}}) | ||
1. [Configuring Grafana Mimir]({{< relref "configuring/_index.md" >}}) | ||
|
||
There are also individual [guides](guides/_index.md) to many tasks. | ||
Before deploying, review the important [security advice](guides/security.md). | ||
## Hosted Grafana Mimir (Prometheus as a service) | ||
|
||
## Contributing | ||
|
||
To contribute to Mimir, see the [contributor guidelines](contributing/). | ||
|
||
## Hosted Mimir (Prometheus as a service) | ||
|
||
Mimir is used in [Grafana Cloud](https://grafana.com/cloud), and is primarily used as a [remote write](https://prometheus.io/docs/operating/configuration/#remote_write) destination for Prometheus via a Prometheus-compatible query API. | ||
Grafana Mimir is used in [Grafana Cloud](https://grafana.com/cloud), and is primarily used as a [remote write](https://prometheus.io/docs/operating/configuration/#remote_write) destination for Prometheus via a Prometheus-compatible query API. | ||
|
||
### Grafana Cloud | ||
|
||
As the creators of [Grafana](https://grafana.com/oss/grafana/), [Loki](https://grafana.com/oss/loki/), and [Tempo](https://grafana.com/oss/tempo/), Grafana Labs can offer you the most wholistic Observability-as-a-Service stack out there. | ||
As the creators of [Grafana](https://grafana.com/oss/grafana/), [Grafana Loki](https://grafana.com/oss/loki/), and [Grafana Tempo](https://grafana.com/oss/tempo/), Grafana Labs can offer you the most holistic Observability-as-a-Service stack out there. |
Oops, something went wrong.