-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document how to get promtail running locally.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
- Loading branch information
Showing
10 changed files
with
110 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ mixin/vendor/ | |
cmd/tempo/tempo | ||
cmd/promtail/promtail | ||
/tempo | ||
/promtail |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
## API | ||
|
||
*nb* Authentication is out of scope for this project. You are expected to run an | ||
authenticating reverse proxy in front of our services, such as an Nginx with basic | ||
auth or a OAuth2 proxy. | ||
|
||
There are 4 API endpoints: | ||
|
||
- `POST /api/prom/push` | ||
|
||
For sending log entries, expects a snappy compresses proto in the HTTP Body. | ||
|
||
- `GET /api/prom/query` | ||
|
||
For doing queries, accepts the following paramters in the query-string: | ||
- `query`: a logQL query | ||
- `limit`: max number of entries to return | ||
- `start`: the start time for the query, as a nanosecond Unix epoch (nanoseconds since 1970) | ||
- `end`: the end time for the query, as a nanosecond Unix epoch (nanoseconds since 1970) | ||
- `direction`: `forward` or `backward`, useful when specifying a limit | ||
- `regexp`: a regex to filter the returned results, will eventually be rolled into the query language | ||
|
||
Responses looks like this: | ||
``` | ||
{ | ||
"streams": [ | ||
{ | ||
"labels": "{instance=\"...\", job=\"...\", namespace=\"...\"}", | ||
"entries": [ | ||
{ | ||
"timestamp": "2018-06-27T05:20:28.699492635Z", | ||
"line": "..." | ||
}, | ||
... | ||
] | ||
}, | ||
... | ||
] | ||
} | ||
``` | ||
|
||
- `GET /api/prom/label` | ||
|
||
For retrieving the names of the labels one can query on. | ||
|
||
Responses looks like this: | ||
``` | ||
{ | ||
"values": [ | ||
"instance", | ||
"job", | ||
... | ||
] | ||
} | ||
``` | ||
|
||
- `GET /api/prom/label/<name>/values` | ||
For retrieving the label values one can query on. | ||
|
||
Responses looks like this: | ||
``` | ||
{ | ||
"values": [ | ||
"default", | ||
"cortex-ops", | ||
... | ||
] | ||
} | ||
``` |
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,9 @@ | ||
scrape_configs: | ||
- job_name: system | ||
|
||
static_configs: | ||
- targets: | ||
- localhost | ||
labels: | ||
job: system | ||
__path__: /var/log/system.log |
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
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