grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.83k stars 3.44k forks source link

Ready-made matchers #3405

Open RichiH opened 3 years ago

RichiH commented 3 years ago

https://github.com/grafana/loki/issues/2722 has some context.

Other matches which seem immediately useful are

RichiH commented 3 years ago

https://docs.graylog.org/en/3.3/pages/extractors.html

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

RichiH commented 3 years ago

@slim-bean given security effort, should we keep this open?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

RichiH commented 3 years ago

Bubbling up for @slim-bean once more, will let go stale then.

RichiH commented 3 years ago

2722 with ip() matching got implemented.

Sent by mobile; please excuse my brevity.

On Tue, Jul 13, 2021, 14:01 Richard Hartmann @.***> wrote:

Bubbling up for @slim-bean https://github.com/slim-bean once more, will let go stale then.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/grafana/loki/issues/3405#issuecomment-879027112, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYII5LYLS7QWEYEJ5JGUTTXQTIRANCNFSM4YMLRNXA .

shreyanshp commented 3 years ago

@RichiH Thank you so much for adding this!

Just a query, any help for email address' regex/ matching functions?

I tried with the below regexes, however they could not extract them, when I can get results by searching for gmail.com, makes me wonder may be those regexes are not working

The ones I tried

(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$

Javascript one from here - https://emailregex.com/

stale[bot] commented 3 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:

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.

shreyanshp commented 3 years ago

Keep alive!

slim-bean commented 3 years ago

Very similar to #3986 which may be a good issue for anyone interested in attempting to add these.