Open pgassmann opened 2 years ago
Hi! This issue has been automatically marked as stale because it has not had any activity in the past 30 days.
We use a stalebot among other tools to help manage the state of issues in this project. A stalebot can be very useful in closing issues in a number of cases; the most common is closing issues or PRs where the original reporter has not responded.
Stalebots are also emotionless and cruel and can close issues which are still very relevant.
If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry.
We regularly sort for closed issues which have a stale
label sorted by thumbs up.
We may also:
revivable
if we think it's a valid issue but isn't something we are likely
to prioritize in the future (the issue will still remain closed).keepalive
label to silence the stalebot if the issue is very common/popular/important.We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, our sincere apologies if you find yourself at the mercy of the stalebot.
@dannykopping @slim-bean can you review this issue and tell me if it is feasible to implement?
@pgassmann apologies for the poor comms here! Yes, this seems like a worthwhile feature.
It seems to me that we could replace the existing 4 arguments (-label{name,value}
, -stream{name,value}
) with 3:
-instant-query
(to be used in the call to /loki/api/v1/query
)-range-query
(to be used in the call to /loki/api/v1/query_range
)-tail-query
(to be used in the call to /loki/api/v1/tail
)I can't see much value in keeping each of the existing 4 arguments as individual fields since we hardly use them separately (expect for https://github.com/grafana/loki/blob/main/pkg/canary/reader/reader.go#L419 AFAICS)
What do you think @slim-bean?
Is your feature request related to a problem? Please describe.
loki-canary needs a single label which uniquely identify its logs. This is not always the case if loki-canary is deployed on multiple hosts or namespaces.
Also, the message cannot be packed inside a json (e.g. from Pipeline pack or from vector.dev json encoding.
Describe the solution you'd like
it would be nice if we could configure a custom LogQL query instead of the fixed selectors. (label, stream).
Log QL Query
{category="dockerlogs", host="logserver1", container_name="loki-canary", source="stdout"} | json | line_format "{{.message}}"
Describe alternatives you've considered
Additional context
Example log message format when using vector.dev Loki sink with encoding=json
Related: #1435 #2259