Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Analysis Tools Awards #27

Open
Open

Description

@mre

Now that we get quite a bit of traffic on the website, we could start to provide a badge for the top N tools that we calculate from our webserver monitoring every month.

Posting the query here for future reference:

topk(20, sum(count_over_time({domain=~"(analysis-tools\\.dev|www\\.analysis-tools\\.dev)", path=~"/tool/.*"} [$__range])) by (path))

Activity

  1. jakubsacha commented on Nov 23, 2020

    @jakubsacha
    Collaborator

    Where do you invoke that query? In the cloudflare?

  2. mre commented on Nov 23, 2020

    @mre
    MemberAuthor

    On https://dash.jorgelbg.me. It's not publicly accessible, but I think we can query the Loki endpoint. My idea was to write a cronjob that fetches the information once per week and renders a static JSON with the top N tools which can then be used by Gatsby during the build process. We might have an optional top-badge, field for each node that points to a pre-rendered image. This way we can also show it on Github if we wanted (e.g. on our static-analysis repo or send a PR to the top tools).

  3. mre commented on Dec 2, 2020

    @mre
    MemberAuthor

    Posting my progress here so that I don't forget.

    curl -G -s "http://loki.jorgelbg.me/loki/api/v1/query_range" --data-urlencode 'query=topk(20, sum(count_over_time({domain=~"(analysis-tools\\.dev|www\\.analysis-tools\\.dev)", path=~"/tool/.*"} [6d])) by (path))' --data-urlencode 'step=300' -H 'X-Scope-OrgID: xxxxx' | jq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions