-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c431580
commit 642464c
Showing
49 changed files
with
537 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
+++ | ||
title = "Contact" | ||
date = 2020-04-01T20:23:37-04:00 | ||
weight = 7 | ||
chapter = true | ||
pre = "<b>7. </b>" | ||
+++ | ||
|
||
### Section 7 | ||
|
||
# Contact Us | ||
|
||
|
||
Slack | ||
|
||
Gitter | ||
|
||
GitHub | ||
|
||
|
||
|
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,18 @@ | ||
+++ | ||
title = "FAQ's" | ||
date = 2020-04-01T20:22:51-04:00 | ||
weight = 8 | ||
chapter = true | ||
pre = "<b>8. </b>" | ||
+++ | ||
|
||
### Section 8 | ||
|
||
# FAQ's | ||
|
||
|
||
1. How do I ....? | ||
|
||
2. | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
+++ | ||
title = "Getting Started" | ||
date = 2020-04-01T19:26:56-04:00 | ||
weight = 2 | ||
chapter = true | ||
pre = "<b>2. </b>" | ||
+++ | ||
|
||
### Section 2 | ||
|
||
# Getting Started | ||
|
||
|
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...-beta/content/gettingstarted/multinode.md → .../getting_started/multi_node_deployment.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: "Multinode" | ||
title: "Multi Node Deployment" | ||
date: 2020-03-30T18:33:53-04:00 | ||
draft: true | ||
--- | ||
|
File renamed without changes.
146 changes: 146 additions & 0 deletions
146
docs-beta/content/getting_started/single_node_deployment.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,146 @@ | ||
--- | ||
title: "Single Node Deployment" | ||
date: 2020-03-30T18:33:46-04:00 | ||
draft: true | ||
--- | ||
|
||
### M3DB Single Node Deployment | ||
|
||
Deploying a single-node cluster is a great way to experiment with M3DB and get a feel for what it | ||
has to offer. Our Docker image by default configures a single M3DB instance as one binary | ||
containing: | ||
|
||
- An M3DB storage instance (`m3dbnode`) for timeseries storage. This includes an embedded tag-based | ||
metrics index, as well as as an embedded etcd server for storing the above mentioned cluster | ||
topology and runtime configuration. | ||
- A "coordinator" instance (`m3coordinator`) for writing and querying tagged metrics, as well as | ||
managing cluster topology and runtime configuration. | ||
|
||
To begin, first start up a Docker container with port `7201` (used to manage the cluster topology), port `7203` which is where Prometheus scrapes metrics produced by `M3DB` and `M3Coordinator`, and port `9003` (used to read and write metrics) exposed. We recommend you create a persistent data | ||
directory on your host for durability: | ||
|
||
``` | ||
docker pull quay.io/m3db/m3dbnode:latest | ||
docker run -p 7201:7201 -p 7203:7203 -p 9003:9003 --name m3db -v $(pwd)/m3db_data:/var/lib/m3db quay.io/m3db/m3dbnode:latest | ||
``` | ||
|
||
**Note:** For the single node case, we use this [sample config file](https://github.com/m3db/m3/blob/master/src/dbnode/config/m3dbnode-local-etcd.yml). If you inspect the file, you'll see that all the configuration is namespaced by `coordinator` or `db`. That's because this setup runs `M3DB` and `M3Coordinator` as one application. While this is convenient for testing and development, you'll want to run clustered `M3DB` with a separate `M3Coordinator` in production. You can read more about that [here.](cluster_hard_way.md). | ||
|
||
Next, create an initial namespace for your metrics in the database using the cURL below. Keep in mind that the provided `namespaceName` must match the namespace in the `local` section of the `M3Coordinator` YAML configuration, and if you choose to [add any additional namespaces](../operational_guide/namespace_configuration.md) you'll need to add them to the `local` section of `M3Coordinator`'s YAML config as well. | ||
|
||
```json | ||
curl -X POST http://localhost:7201/api/v1/database/create -d '{ | ||
"type": "local", | ||
"namespaceName": "default", | ||
"retentionTime": "12h" | ||
}' | ||
``` | ||
|
||
**Note**: The `api/v1/database/create` endpoint is abstraction over two concepts in M3DB called [placements](../operational_guide/placement.md) and [namespaces](../operational_guide/namespace_configuration.md). If a placement doesn't exist, it will create one based on the `type` argument, otherwise if the placement already exists, it just creates the specified namespace. For now it's enough to just understand that it creates M3DB namespaces (tables), but if you're going to run a clustered M3 setup in production, make sure you familiarize yourself with the links above. | ||
|
||
Placement initialization may take a minute or two and you can check on the status of this by running the following: | ||
|
||
``` | ||
curl http://localhost:7201/api/v1/placement | jq . | ||
``` | ||
|
||
Once all of the shards become `AVAILABLE`, you should see your node complete bootstrapping! Don't worry if you see warnings or errors related to a local cache file, such as `[W] could not load cache from file | ||
/var/lib/m3kv/m3db_embedded.json`. Those are expected for a local instance and in general any | ||
warn-level errors (prefixed with `[W]`) should not block bootstrapping. | ||
|
||
``` | ||
02:28:30.008072[I] updating database namespaces [{adds [default]} {updates []} {removals []}] | ||
02:28:30.270681[I] node tchannelthrift: listening on 0.0.0.0:9000 | ||
02:28:30.271909[I] cluster tchannelthrift: listening on 0.0.0.0:9001 | ||
02:28:30.519468[I] node httpjson: listening on 0.0.0.0:9002 | ||
02:28:30.520061[I] cluster httpjson: listening on 0.0.0.0:9003 | ||
02:28:30.520652[I] bootstrap finished [{namespace metrics} {duration 55.4µs}] | ||
02:28:30.520909[I] bootstrapped | ||
``` | ||
|
||
The node also self-hosts its OpenAPI docs, outlining available endpoints. You can access this by | ||
going to `localhost:7201/api/v1/openapi` in your browser. | ||
|
||
![OpenAPI Doc](redoc_screenshot.png) | ||
|
||
Now you can experiment with writing tagged metrics: | ||
```json | ||
curl -sS -X POST http://localhost:9003/writetagged -d '{ | ||
"namespace": "default", | ||
"id": "foo", | ||
"tags": [ | ||
{ | ||
"name": "__name__", | ||
"value": "user_login" | ||
}, | ||
{ | ||
"name": "city", | ||
"value": "new_york" | ||
}, | ||
{ | ||
"name": "endpoint", | ||
"value": "/request" | ||
} | ||
], | ||
"datapoint": { | ||
"timestamp": '"$(date "+%s")"', | ||
"value": 42.123456789 | ||
} | ||
} | ||
' | ||
``` | ||
|
||
**Note:** In the above example we include the tag `__name__`. This is because `__name__` is a | ||
reserved tag in Prometheus and will make querying the metric much easier. For example, if you have | ||
[M3Query](query.md) setup as a Prometheus datasource in Grafana, you can then query for the metric | ||
using the following PromQL query: | ||
|
||
``` | ||
user_login{city="new_york",endpoint="/request"} | ||
``` | ||
|
||
And reading the metrics you've written using the M3DB `/query` endpoint: | ||
```json | ||
curl -sS -X POST http://localhost:9003/query -d '{ | ||
"namespace": "default", | ||
"query": { | ||
"regexp": { | ||
"field": "city", | ||
"regexp": ".*" | ||
} | ||
}, | ||
"rangeStart": 0, | ||
"rangeEnd": '"$(date "+%s")"' | ||
}' | jq . | ||
|
||
{ | ||
"results": [ | ||
{ | ||
"id": "foo", | ||
"tags": [ | ||
{ | ||
"name": "__name__", | ||
"value": "user_login" | ||
}, | ||
{ | ||
"name": "city", | ||
"value": "new_york" | ||
}, | ||
{ | ||
"name": "endpoint", | ||
"value": "/request" | ||
} | ||
], | ||
"datapoints": [ | ||
{ | ||
"timestamp": 1527039389, | ||
"value": 42.123456789 | ||
} | ||
] | ||
} | ||
], | ||
"exhaustive": true | ||
} | ||
``` | ||
|
||
Now that you've got the M3 stack up and running, take a look at the rest of our documentation to see how you can integrate with [Prometheus](../integrations/prometheus.md) and [Graphite](../integrations/graphite.md) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
+++ | ||
title = "How To Guides" | ||
date = 2020-04-01T19:26:56-04:00 | ||
weight = 3 | ||
chapter = true | ||
pre = "<b>3. </b>" | ||
+++ | ||
|
||
### Section 3 | ||
|
||
# How To Guides | ||
|
||
Aggregation, Sending Metrics (for Prometheus and Graphite), and Querying (for Prometheus and Graphite) | ||
|
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,6 @@ | ||
--- | ||
title: "Aggregation" | ||
date: 2020-04-02T12:41:51-04:00 | ||
draft: true | ||
--- | ||
|
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,7 @@ | ||
--- | ||
title: "R2 Rules" | ||
date: 2020-04-02T12:36:33-04:00 | ||
draft: true | ||
--- | ||
|
||
Guide for how to aggregate metrics using R2 Rules. |
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,7 @@ | ||
--- | ||
title: "Querying" | ||
date: 2020-04-02T12:36:50-04:00 | ||
draft: true | ||
--- | ||
|
||
How to guides for querying metrics using Prometheus and Graphite. |
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,6 @@ | ||
--- | ||
title: "Graphite" | ||
date: 2020-04-02T12:36:57-04:00 | ||
draft: true | ||
--- | ||
|
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,6 @@ | ||
--- | ||
title: "Prometheus" | ||
date: 2020-04-02T12:37:03-04:00 | ||
draft: true | ||
--- | ||
|
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,7 @@ | ||
--- | ||
title: "Sending Metrics" | ||
date: 2020-04-02T12:37:16-04:00 | ||
draft: true | ||
--- | ||
|
||
How to guide for sending metrics using Prometheus and Graphite. |
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,6 @@ | ||
--- | ||
title: "Graphite" | ||
date: 2020-04-02T12:37:26-04:00 | ||
draft: true | ||
--- | ||
|
6 changes: 6 additions & 0 deletions
6
docs-beta/content/how_to_guides/sending_metrics/prometheus.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,6 @@ | ||
--- | ||
title: "Prometheus" | ||
date: 2020-04-02T12:37:22-04:00 | ||
draft: true | ||
--- | ||
|
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,11 @@ | ||
+++ | ||
title = "M3DB" | ||
date = 2020-04-01T19:44:54-04:00 | ||
weight = 5 | ||
chapter = true | ||
pre = "<b>5. </b>" | ||
+++ | ||
|
||
### Section 5 | ||
|
||
# M3DB Overview |
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,6 @@ | ||
--- | ||
title: "Architecture" | ||
date: 2020-04-01T19:45:24-04:00 | ||
draft: true | ||
--- | ||
|
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,6 @@ | ||
--- | ||
title: "Configuration Guide" | ||
date: 2020-04-01T19:46:32-04:00 | ||
draft: true | ||
--- | ||
|
Oops, something went wrong.