Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using rate() with VictoriaLogs and LogsQL in Grafana #120

Closed
arseny-zinchenko opened this issue Nov 25, 2024 · 2 comments
Closed

Using rate() with VictoriaLogs and LogsQL in Grafana #120

arseny-zinchenko opened this issue Nov 25, 2024 · 2 comments

Comments

@arseny-zinchenko
Copy link

Trying to understand is it possible to have something similar to the rate() function in Loki?
For example, I have the following query for Loki in Grafana to get a per-second traffic rate from VPC Flow Logs:

topk(5,
  sum by (pkt_src_addr) (
    rate(
      (
        {logtype="flow", logger_type="loki"}
        | pattern `<region> <vpc_id> <az_id> <subnet_id> <instance_id> <interface_id> <flow_direction> <src_addr> <dst_addr> <src_port> <dst_port> <pkt_src_addr> <pkt_dst_addr> <pkt_src_aws_service> <pkt_dst_aws_service> <traffic_path> <packets> <bytes> <action>`
        | interface_id="eni-0352f8c82da6aa229"
        | action="ACCEPT"
        | pkt_src_addr=ip("10.0.32.0/20")
        | pkt_src_addr=~"${kubernetes_pod_ip}"
        | pkt_dst_addr=~"${remote_svc_ip}"
        | unwrap bytes
        | __error__=""
      )[15m]
    )
  )
)

image

How can I achieve something similar with VMLogs and its LogsQL?

@dmitryk-dk
Copy link
Contributor

dmitryk-dk commented Nov 25, 2024

Hi @arseny-zinchenko ! This issue should be opened in the main repository of the VictoriaMetrics

Created the issue in the main repository VictoriaMetrics/VictoriaMetrics#7646

@valyala
Copy link

valyala commented Nov 26, 2024

Closing this issue as duplicate of VictoriaMetrics/VictoriaMetrics#7646

@valyala valyala closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants