Questions tagged [loki]
Loki is a C++ library of designs, containing flexible implementations of common design patterns and idioms.
101
questions
0
votes
0
answers
51
views
Loki Ruler not sending alerts to alert Manager
I have loki + grafana + prometheus running in EKS using official helm charts.
I want to send alerts based on error log messages and for that i'm trying to use the loki ruler.
following is the ruler ...
0
votes
0
answers
25
views
how to see all log data in loki?
i'm using Loki as log management system , and i send log like this :
logger = logging.getLogger("loki")
logger.info(
"download_file",
extra={"...
0
votes
1
answer
67
views
Drop logs from promtail
I have prometheus + loki + grafana + promtail setup.
I need to drop the logs which have the words healthcheck or health-check.
My values.yaml file: https://github.com/grafana/helm-charts/blob/main/...
0
votes
0
answers
44
views
How to add custom labels in Promtail
I want to add a custom/ new label in Loki Grafana. I basically added "log_level" parameter to server section in the ConfigMap. But the log_level label is not showing on Loki Grafana. ...
0
votes
0
answers
67
views
How to use S3 as storage for Loki logs?
I am fairly new to Kubernetes, Helm and Loki.
I have deployed Loki-stack on my minikube cluster using Helm charts and I am trying to use S3 storage as storage for Loki logs.
I tried adding the ...
1
vote
0
answers
184
views
"No logs found" in grafana
I installed Loki, grafana and promtail and all three runing. on http://localhost:9080/targets Ready is True, but the logs are not displayed in Grafana and show in the explore section "No logs ...
1
vote
0
answers
85
views
Injected traces data into Logs is not showing on Loki-Grafana
SETUP:
i'm using the python-logging-loki library to manually instrument my code for logs. I have a single running instance of Loki (promtail not used, i'm pushing directly to loki).
On Grafana i have ...
0
votes
1
answer
29
views
Authorization errors when starting a Loki pod
This morning I discovered that Loki stopped working in the EKS cluster
In the loki pod logs I see the following:
level=error ts=2022-04-07T10:44:43.298418416Z caller=table_manager.go:233 msg="...
0
votes
0
answers
27
views
dynamic logging path with grafana loki
I am using Grafana Loki for logging.
I've set up Loki with an AWS-S3 bucket but I want to change Loki's path as per the client's request.
example:
Let's say there are two clients A and B and I have ...
1
vote
0
answers
53
views
Restore loki compactor data
I have configured the compactor for loki and then I archive the files produced by it. I have files like compactor.gz and loki-stack.gz.
However I cannot read these files directly and I cannot find ...
0
votes
0
answers
32
views
How to implement Grafana-Agent with Loki
I am required to implement Grafana-Agent with Loki. I have set up Loki. I can't find documentation to implement Grafana-Agent binary.
If you have implemented Grafana-Agent with Loki, do share the ...
0
votes
0
answers
67
views
how to reload Loki yaml config file
I deployed Loki 2.4.2 with helm chart on kubernetes cluster version 1.23
how can i reload Loki yaml config file after changes with time period or api request without any pod restarting ?
1
vote
1
answer
79
views
How to sort 500-511 HTTP errors in a file produced daily on Grafana using Loki as Datasource
How to grep for only 500 errors (500-511) in a file that is created daily with date stamp in file name. These files are configured to be pushed by promtail agent to Loki server so I can visualize them ...
0
votes
1
answer
68
views
Grafana & Loki agents not deployed in Tainted nodes
We are running our workloads on AKS. Basically we have Two Node-Pools.
1. System-Node-Pool: Where all system pods are running
2. Apps-Node-Pool: Where our actual workloads/ apps run in.
In fact, our ...
0
votes
0
answers
27
views
Transfering syslog-ng config from systemd to initd system
Our team have changed linux distro from arch to crux, and I have a problem moving the logging setup, which was done on the old distro. I think the issue is mainly with template-functions and rewrite ...
0
votes
1
answer
82
views
How to slice the string using logql?
I have values in my logs in grafana loki something like this
data 1234-02-01,12:30,1
data 1234-03-02,11:30,12
I am able to slice these values and separate date and time from this using trunc but I ...
1
vote
3
answers
328
views
Helm Grafana/Loki chart installation error. Rendered manifests contain a resource that already exists
I need to install Grafana Loki with Prometheus in my Kubernetes cluster. So I followed the below to install them. It basically uses Helm to install it. Below is the command which I executed to install ...
0
votes
1
answer
346
views
Regex for promtail config
I've been struggling to get a regex string working. It's being used for Promtail to parse labels from my logs. The problem I'm having is it's not working with positive lookahead (because I think ...
0
votes
0
answers
58
views
Use bucket per tenant option for multi tenant Loki with s3 backend storage
the current architecture of multi-tenant Loki is a directory for each tenant ID under the existing bucket if we are using s3 backend storage.
Is there a way to configure the Loki to create a bucket ...
0
votes
0
answers
52
views
query by unique filename ordered by last modified time in Loki
My web application creates new log files per request. I would like to show a table of these files in Loki to be able to click on and see the log entries themselves.
I was able to use count_over_time ...
1
vote
1
answer
47
views
What is the need for MaxAlign trick when creating static singleton?
Following a snippet of code from Loki singleton implementation which shows what it calls "MaxAlign Trick". I assume it has something to do with alignment (duh!), but what's the purpose of ...
0
votes
0
answers
182
views
Use Persistent Volume with loki installed with helm
Do you know how to use the AWS EBS volume prepared in advance as the Persistent Volume of the pod when installing loki with helm?
Should I create a PersistentVolume like the one below and specify the ...
0
votes
0
answers
79
views
How to get the full log error message from Grafana into Alertmanager for alerting?
I can get the labels from the log messages on Grafana for which I am alerting through alertmanager. However, I want to get the full log message into the alert message that gets sent to slack or email. ...
0
votes
0
answers
15
views
how to search cyrillic rune with logql ib Grafana
i've got grafana, and loki docker driver.
I need to search in json logs with cyrillic symbols (names, surnames).
example:
{"data_sample": { "calculation_no": "иванов-...
1
vote
0
answers
238
views
Correct way to parse docker JSON logs in promtail
I've created some monitoring with grafana, loki and promtail. The container i'm getting the logs from outputs them in JSON format i.e.
{"level":"info","ts":"2022-02-...
0
votes
0
answers
238
views
How parse logfile with Promtail?
I want to use Promtail > Loki > Grafana.
My logfile look like that:
{"asctime": "2006-01-02T15:04:05.999999999-07:00", "levelname": "INFO", "module&...
0
votes
0
answers
82
views
stream load balancing is not working on loki ingester
I'm beginner to loki, and I need some help.
I am running loki-distributed on EKS.
chart version : 0.43.0
loki version : 4.2.4
Log flow is : logstash(4 node) is consuming log from kafka and push the ...
0
votes
1
answer
249
views
Loki LogQL topk aggregate function
I've started shipping traefik access logs (in JSON) to Grafana Loki and wanted to visualize the top 3 ClientHosts.
This is the LogQL I have written for this but it returns all ClientHosts for the ...
-1
votes
1
answer
361
views
How to force open a file in linux as a normal user [closed]
"/etc/docker/daemon.json"
"/etc/docker/daemon.json" E212: Can't open file for writing
I’m currently trying to set up a Loki server, Promtail, and Grafana as docker images
I ...
0
votes
1
answer
168
views
Loki connection refused on Grafana
caller=client.go:349 component=client host=loki:3100 msg="error sending batch, will retry" status=-1 error="Post "http://loki:3100/loki/api/v1/push": dial tcp 172
Please help
0
votes
1
answer
454
views
How to build a Loki server Docker image using Docker-compose
I have created a directory and mounted all the required files in each directory but when I try to create the docker image, It creates Promtail and Grafana but the LOKI wouldn't create. I get the error ...
4
votes
1
answer
2k
views
Loki json logs filter by detected fields from grafana
I am sending json logs to loki and visualizing in grafana. Initially, my logs looked like as following.
{
"log": "{\"additionalDetails\":{\"body\":{},\&...
0
votes
0
answers
354
views
Restore loki from kubernetes persistent volume
We have deployed loki using helm chart. I have the loki persistent volume. How can I figure out what was the schema config used so that I can retain the logs.
Chart loki-2.1.1
Below is the value.yaml
...
0
votes
0
answers
126
views
grafana/loki-stack how can i add grafana tempo
I'm trying to customize the trace display using Grafana Tempo. I use helm grafana/loki-stack https://grafana.com/docs/loki/latest/installation/helm/. Installing command helm upgrade --install loki ...
0
votes
0
answers
36
views
Config multi tenant Loki storage for store data in seperate directories (filesystem)
how can we backup data of each tanentID? can we set up separate PVC for each tenant ?
0
votes
0
answers
56
views
what is the substitute of splunk eval in logql?
I have this expression in my splunk query eval A = A + '/' + B where A is the new variable (column name) to which I am assigning the values of A and B from my log line and I need to replace the same ...
1
vote
1
answer
79
views
grafana loki operator logs all come prepended with 'stderr f'
Picture below, why is it stderr f appears here? My logs are all in json format as expected. This is very annoying
3
votes
1
answer
1k
views
Loki query to show all logs
I'm trying to test our Loki log data source. From the Queries I've been executing nothing is returned.
It's possible that the logs are in a different format to what I'm expecting, or that no Logs are ...
0
votes
1
answer
74
views
Get a number from JSON by Promtail
I use Promtail+Loki to collect my logs.
Input logs are JSON strings that look like this:
{ "severity":"error", "msg":"very bad error", "duration":20 }...
1
vote
1
answer
468
views
Kubernetes promtail sidecar: how to get labels from the parent pod metadata
I have some kubernetes applications that log to files rather than stdout/stderr, and I collect them with Promtail sidecars. But since the sidecars execute with "localhost" target, I don't ...
2
votes
1
answer
175
views
How to send logs from a heroku app to grafana cloud?
Grafana-Loki is a nice logging service and I want to deploy it for an app on Heroku. I've looked around and there doesn't seem to be too much information about this. I found this twitter thread which ...
1
vote
1
answer
336
views
Is there a way to use inferred values in a regex based LOKI query?
I do have the following log lines in our Loki data source:
Trace_MSG_IN: 933a1425-5e62-545d-9947-274c5b870607
Trace_MSG_IN: 933a1425-5e62-545d-9947-274c5b870607
Trace_MSG_CR: 933a1425-5e62-545d-9947-...
1
vote
1
answer
575
views
configure loki as prometheus data source not working
I wanted to create an alert if there is an error in the logs.
I have added Loki as a Prometheus data source in Grafana. Appended Loki to the end of your URL, like this: http://ipaddress:3100/loki with ...
1
vote
1
answer
489
views
loki: "error at least one label pair is required per stream"
I am running loki, pomtrail, grafana locally in docker per these instructions
When I try to run the following test to send data directly to loki:
curl -i -H "Content-type: application/json" -...
5
votes
1
answer
2k
views
Loki display log message and extra fields separately
In https://github.com/grafana/loki/issues/4249 I found interesting screenshot.
On this screenshot I see that log level and message are displayed bold with white text and other metadata (collected ...
0
votes
0
answers
118
views
In Loki/Kibana, see all requests which ended in error
Every time there's a problem, I go through the annoying work of looking at the cluster of error logs in Loki and/or Kibana, and in order to find out what went wrong, I have to look through the ...
1
vote
0
answers
197
views
nginx basic auth not working in docker-compose
i'm setting up basic authentication(credential) for loki and promtail using nginx in docker-compose. i have created htpasswd to set the password for loki and promtail andcreated seperate config file ...
0
votes
0
answers
400
views
Write log messages to Grafana Loki via Fluentd
We have .NET WebAPI services (C#) that use Serilog for logging application trace messages. We use only one Serilog sink, TCPSink, to squirt out messages to Fluentd sidecar containers so we can easily ...
1
vote
1
answer
585
views
Helm chart ignoring config file or given key value
I am not sure if the issue is related to promtail (helm chart used) or to helm itself.
I want to update the default host value for loki chart to a local host used on kubernetes, so I tried with this:
...
1
vote
1
answer
1k
views
Loki Distributed with S3 backend - Timestamp and Grafana connection issues
I have set up Loki Distributed using the official helm charts.
nameOverride: null
# -- Overrides the chart's computed full name
fullnameOverride: null
# -- Image pull secrets for Docker images
...