Loki Stack Flashcards

1
Q

What is Logstash Encoder?

A

Logstash encoder is a tool to provide encoders, layouts, and appenders to store logs in JSON or other formats. It can customize the output of logging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is JSON logging useful?

A

Text data is unstructured, so it may be harder and slower to query. The structure of a JSON log allows it to be more machine readable, as it allows logs to be searched by using key-value pairs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Promtail?

A

Promtail is an agent which ships the contents of local logs to a private Grafana Loki instance or Grafana Cloud. Promtail is usually deployed to every machine with applications that need to be monitored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Promtail can tail logs from what two sources?

A
  • Local log files.

- Systemd journal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is log file discovery?

A

A Promtail feature. Discovering the applications that are emitting log lines to files that need to be monitored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Loki Push API?

A

A Promtail feature which allows Promtail to be configured to receive logs from another Promtail or any Loki client. It can be configured with the loki_push_api scrape config.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the Labeling and Parsing feature of Promtail?

A

Promtail determines metadata that can be attached to a log line that may allow for easier identification in log querying.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Shipping in Promtail?

A

Shipping is when Promtail tails a log, continuously reading the data as it is added to log files, and automatically sends batches of log data to Loki.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are two api endpoints that Promtail provides?

A
  • GET /ready
    Returns 200 when Promtail is running and there is at least one working target.
  • GET /metrics
    Returns Promtail metrics for Prometheus.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Loki?

A

A log aggregation system designed to store and query logs from all your applications and infrastructure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True or False: Prometheus was inspired by Loki.

A

False: Loki was inspired by Prometheus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

True or False: Promtail is deployed as a daemon to every local machine.

A

True. This limits Promtail’s service discovery mechanism, as it cannot discover labels from other machines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does it mean for Loki to be a “multi-tenant” log aggregation system?

A

Multiple tenants (authenticated users) can use the same Loki instance. Tenant data is kept separate. This allows multiple development teams to use the same pool of logs without the sharing of confidential information across tenants.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does it mean for Loki to be horizontally scalable?

A

All of Loki’s components can be run as separate microservices. These microsevices can be individually configured to scale-up.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which part of the logs does Loki index?

A

Loki only indexes the labels/metadata of the logs. Loki does not index the log content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

True or False: Loki is open source.

A

True. More specifically, Loki is released under the AGPLv3 license. (copyleft)

17
Q

How can you search for logs with Loki?

A

LogQL. You can run LogQL queries directly within Grafana.

18
Q

Can you set up alerts for Loki?

A

Yes. You can configure Loki to send the resulting alerts to a Prometheus Alertmanager.

19
Q

True or False: Loki can receive logs from Docker.

A

True. Docker has a plugin that allows Docker to send logs to Loki.

20
Q

What software can you use to explore the logs aggregated by Loki?

A

Grafana.

21
Q

What do Loki and Jazlyn have in common?

A

They are both highly-available ;)