Docs - update links, readme (#2398)

* docs - update links

* update readme
pull/2400/head
Robby Milo 5 years ago committed by GitHub
parent ae33258aca
commit e2f1581313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 37
      docs/README.md
  2. 4
      docs/sources/best-practices/current-best-practices.md
  3. 2
      docs/sources/clients/aws/ec2/_index.md
  4. 2
      docs/sources/clients/aws/ecs/_index.md
  5. 6
      docs/sources/clients/aws/eks/_index.md
  6. 2
      docs/sources/design-documents/2020-02-Promtail-Push-API.md
  7. 2
      docs/sources/getting-started/logcli.md

@ -60,3 +60,40 @@ simplifies the operation and significantly lowers the cost of Loki.
3. [Contributing to Loki](sources/community/contributing.md)
12. [Loki Maintainers Guide](sources/./maintaining/_index.md)
1. [Releasing Loki](sources/./maintaining/release.md)
## Updating docs
### Building the docs locally
When you contribute to documentation, it is a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
#### Requirements
Docker >= 2.1.0.3
### Build the doc site
1. In the command line, make sure you are in the docs folder: `cd docs`.
2. Run `make docs`. This launches a preview of the docs website at `http://localhost:3002/docs/loki/latest/` which will refresh automatically when changes to content in the `sources` directory are made.
---
### Content guidelines
Edit content in the `sources` directory.
### Edit the side menu
The side menu is built automatically from the folder structure. Ordering is done with the `weight` front matter param.
### Add images
Images are sourced in this repo alonside content. They will sync to the website repo just like markdown files.
---
## Deploy changes to grafana.com
When a PR is merged to master with changes in the `docs/sources` directory, those changes are automatically synched to the grafana/website repo and published to the staging site.
Generally, someone from marketing will publish to production each day, so as long as the sync is successful your docs edits will be published. Alternatively, you can refer to [publishing to production](https://github.com/grafana/website#publishing-to-production-grafanacom) if you'd like to do it yourself.

@ -35,7 +35,7 @@ Try to keep values bounded to as small a set as possible. We don't have perfect
Loki has several client options: [Promtail](https://github.com/grafana/loki/tree/master/docs/clients/promtail) (which also supports systemd journal ingestion and TCP-based syslog ingestion), [Fluentd](https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-grafana-loki), [Fluent Bit](https://github.com/grafana/loki/tree/master/cmd/fluent-bit), a [Docker plugin](https://grafana.com/blog/2019/07/15/lokis-path-to-ga-docker-logging-driver-plugin-support-for-systemd/), and more!
Each of these come with ways to configure what labels are applied to create log streams. But be aware of what dynamic labels might be applied. Use the Loki series API to get an idea of what your log streams look like and see if there might be ways to reduce streams and cardinality. Details of the Series API can be found [here](https://github.com/grafana/loki/blob/master/docs/api.md#series), or you can use [logcli](https://github.com/grafana/loki/blob/master/docs/getting-started/logcli/) to query Loki for series information.
Each of these come with ways to configure what labels are applied to create log streams. But be aware of what dynamic labels might be applied. Use the Loki series API to get an idea of what your log streams look like and see if there might be ways to reduce streams and cardinality. Details of the Series API can be found [here](https://grafana.com/docs/loki/latest/api/#series), or you can use [logcli](https://grafana.com/docs/loki/latest/getting-started/logcli/) to query Loki for series information.
## 5. Configure caching
@ -72,7 +72,7 @@ What can we do about this? What if this was because the sources of these logs we
{job=”syslog”, instance=”host2”} 00:00:02 i’m a syslog! <- Accepted, still in order for stream 2
```
But what if the application itself generated logs that were out of order? Well, I'm afraid this is a problem. If you are extracting the timestamp from the log line with something like [the promtail pipeline stage](https://github.com/grafana/loki/blob/master/docs/clients/promtail/stages/timestamp/), you could instead _not_ do this and let Promtail assign a timestamp to the log lines. Or you can hopefully fix it in the application itself.
But what if the application itself generated logs that were out of order? Well, I'm afraid this is a problem. If you are extracting the timestamp from the log line with something like [the promtail pipeline stage](https://grafana.com/docs/loki/latest/clients/promtail/stages/timestamp/), you could instead _not_ do this and let Promtail assign a timestamp to the log lines. Or you can hopefully fix it in the application itself.
But I want Loki to fix this! Why can’t you buffer streams and re-order them for me?! To be honest, because this would add a lot of memory overhead and complication to Loki, and as has been a common thread in this post, we want Loki to be simple and cost-effective. Ideally we would want to improve our clients to do some basic buffering and sorting as this seems a better place to solve this problem.

@ -291,5 +291,5 @@ Let's head back to Grafana and verify that your Promtail logs are available in G
[live tailing]: https://grafana.com/docs/grafana/latest/features/datasources/loki/#live-tailing
[systemd]: https://github.com/grafana/loki/tree/master/production/helm/promtail#run-promtail-with-systemd-journal-support
[journald]: https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html
[final config]: https://github.com/grafana/loki/blob/master/docs/clients/aws/ec2/promtail-ec2-final.yaml
[final config]: https://github.com/grafana/loki/blob/master/docs/sources/clients/aws/ec2/promtail-ec2-final.yaml
[relabeling]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

@ -233,7 +233,7 @@ That's it ! Make sure to checkout the [LogQL][logql] to learn more about Loki po
[fluentbit]: https://fluentbit.io/
[fluentd]: https://www.fluentd.org/
[fluentbit loki image]: https://hub.docker.com/r/grafana/fluent-bit-plugin-loki
[logql]: https://github.com/grafana/loki/blob/master/docs/logql.md
[logql]: https://grafana.com/docs/loki/latest/logql/
[alpine]:https://hub.docker.com/_/alpine
[fluentbit ouput]: https://fluentbit.io/documentation/0.14/output/
[routing]: https://fluentbit.io/documentation/0.13/getting_started/routing.html

@ -251,12 +251,12 @@ If you want to push this further you can check out [Joe's blog post][blog annota
[grafana logs namespace]: namespace-grafana.png
[relabel_configs]:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
[syslog]: https://github.com/grafana/loki/tree/master/production/helm/promtail#run-promtail-with-syslog-support
[Filters]: https://github.com/grafana/loki/blob/master/docs/logql.md#filter-expression
[Filters]: https://grafana.com/docs/loki/latest/logql/#filter-expression
[kubelet]: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/#:~:text=The%20kubelet%20works%20in%20terms,PodSpecs%20are%20running%20and%20healthy.
[LogQL]: https://github.com/grafana/loki/blob/master/docs/logql.md
[LogQL]: https://grafana.com/docs/loki/latest/logql/
[blog events]: https://grafana.com/blog/2019/08/21/how-grafana-labs-effectively-pairs-loki-and-kubernetes-events/
[labels post]: https://grafana.com/blog/2020/04/21/how-labels-in-loki-can-make-log-queries-faster-and-easier/
[pipeline]: https://github.com/grafana/loki/blob/master/docs/clients/promtail/pipelines.md
[pipeline]: https://grafana.com/docs/loki/latest/clients/promtail/pipelines/
[final config]: values.yaml
[blog annotations]: https://grafana.com/blog/2019/12/09/how-to-do-automatic-annotations-with-grafana-and-loki/
[kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/

@ -62,7 +62,7 @@ rejected pushes. Users are recommended to do one of the following:
## Implementation
As discussed in this document, this feature will be implemented by copying the
existing [Loki Push API](https://github.com/grafana/loki/blob/master/docs/api.md#post-lokiapiv1push)
existing [Loki Push API](https://grafana.com/docs/loki/latest/api/#post-lokiapiv1push)
and exposing it via Promtail.
## Considered Alternatives

@ -132,7 +132,7 @@ Commands:
For more information about log queries and metric queries, refer to the LogQL documentation:
https://github.com/grafana/loki/blob/master/docs/logql.md
https://grafana.com/docs/loki/latest/logql/
labels [<flags>] [<label>]
Find values for a given label.

Loading…
Cancel
Save