{"id":15178870,"url":"https://github.com/lmangani/vlogql","last_synced_at":"2025-10-26T17:31:23.998Z","repository":{"id":43080095,"uuid":"469325426","full_name":"lmangani/vLogQL","owner":"lmangani","description":"Loki/LogQL CLI Client in V for qryn","archived":false,"fork":false,"pushed_at":"2024-03-14T14:45:19.000Z","size":99,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-31T21:52:46.895Z","etag":null,"topics":["client","grafana","logql","logs","loki","qryn","query","search","v","vlang"],"latest_commit_sha":null,"homepage":"https://qryn.dev","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lmangani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-13T09:31:00.000Z","updated_at":"2024-09-14T06:25:45.000Z","dependencies_parsed_at":"2024-05-03T03:01:08.999Z","dependency_job_id":"e04f09a8-600f-48d0-8b05-ad5005622c2f","html_url":"https://github.com/lmangani/vLogQL","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2FvLogQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2FvLogQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2FvLogQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmangani%2FvLogQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmangani","download_url":"https://codeload.github.com/lmangani/vLogQL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238375210,"owners_count":19461569,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","grafana","logql","logs","loki","qryn","query","search","v","vlang"],"created_at":"2024-09-27T15:40:49.490Z","updated_at":"2025-10-26T17:31:23.649Z","avatar_url":"https://github.com/lmangani.png","language":"V","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src='https://user-images.githubusercontent.com/1423657/218816262-e0e8d7ad-44d0-4a7d-9497-0d383ed78b83.png' style=\"margin-left:-10px\" width=200\u003e\n\n[![vlang-build-pipeline](https://github.com/lmangani/vLogQL/actions/workflows/vlang.yml/badge.svg?branch=main)](https://github.com/lmangani/vLogQL/actions/workflows/vlang.yml)\n\n# vLogQL\nTiny, portable, static LogQL CLI Client in [vlang](https://vlang.io/)\n\n\n### Instructions\nDownload a [binary release](https://github.com/lmangani/vLogQL/releases/) or build from source\n\n\n#### 📦 Download Binary\n```\ncurl -fsSL github.com/lmangani/vLogQL/releases/latest/download/vlogql -O \u0026\u0026 chmod +x vlogql\n```\n\n#### Build Source\n##### 📦 Install V\n```bash\ngit clone https://github.com/vlang/v\n(cd v \u0026\u0026 make \u0026\u0026 v symlink)\n```\n##### 📖 Compile\n```bash\ngit clone https://github.com/lmangani/vlogql\n(cd vlogql \u0026\u0026 v -o vlogql -prod vlogql.v)\n```\n\n\n### 🔎 Usage\n```\nUsage: vlogql [options] [ARGS]\n\nOptions:\n  -l, --limit \u003cint\u003e         logql query limit [LOGQL_LIMIT]\n  -a, --api \u003cstring\u003e        logql api [LOGQL_API]\n  -q, --query \u003cstring\u003e      logql query [LOGQL_QUERY]\n  -t, --labels              get labels\n  -v, --label \u003cstring\u003e      get label values\n  -z, --timestamp           get timestamp\n  -s, --start \u003cstring\u003e      start nanosec timestamp\n  -e, --end \u003cstring\u003e        end nanosec timestamp\n  -x, --tail                tail mode\n  -c, --canary              canary mode\n  -h, --help                display this help and exit\n```\n\n#### ⭐ Examples \n##### Query w/o Labels\n```bash\n# LOGQL_API=\"https://qryn:3100\" ./vlogql --query '{type=\"clickhouse\"} |~ \"MiB\"' --limit 5\n\n---------- Logs for: {type=\"clickhouse\"} |~ \"MiB\"\n2022.03.13 10:39:19.765860 [ 29849 ] {} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 8.11 MiB.\n2022.03.13 10:39:19.761259 [ 29849 ] {115c1357-81d3-4277-ab04-882306f76e9d} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 4.12 MiB.\n2022.03.13 10:39:19.761288 [ 29849 ] {} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 4.12 MiB.\n2022.03.13 10:39:19.765798 [ 29849 ] {f050f9e5-f919-4680-b826-ea84be9542e0} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 8.11 MiB.\n2022.03.13 10:39:19.759982 [ 29849 ] {115c1357-81d3-4277-ab04-882306f76e9d} \u003cDebug\u003e DiskLocal: Reserving 1.00 MiB on disk `default`, having unreserved 2.63 TiB.\n```\n\n##### Query w/ Labels\n```bash\n# LOGQL_API=\"https://qryn:3100\" ./vlogql --query '{type=\"clickhouse\"} |~ \"MiB\"' --limit 4 --labels\n\n---------- Logs for: {type=\"clickhouse\"} |~ \"MiB\"\nLog Labels: {'pid': '19639', 'level': 'Debug', 'call': 'MemoryTracker', 'type': 'clickhouse'}\n2022.03.14 09:53:31.017408 [ 19639 ] {} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 4.14 MiB.\n2022.03.14 09:53:31.021778 [ 19639 ] {} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 8.18 MiB.\n2022.03.14 09:53:31.021759 [ 19639 ] {785ba1fa-3be3-4023-8a95-de4b92c096a4} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 8.18 MiB.\n2022.03.14 09:53:31.017389 [ 19639 ] {a34cbcc9-d11a-4a0a-8c7a-634e00322900} \u003cDebug\u003e MemoryTracker: Peak memory usage (for query): 4.14 MiB.\n```\n##### Query Labels\n```bash\n# LOGQL_API=\"https://qryn:3100\" ./vlogql --labels\n\n---------- Labels:\n['response', 'host', 'type']\n```\n##### Query Label Values\n```bash\n# LOGQL_API=\"https://qryn:3100\" ./vlogql --label type\n\n---------- Values for: type\n['clickhouse', 'prometheus']\n```\n\n##### Tail Logs by Tag _(websocket)_\n```bash\n# LOGQL_API=\"https://qryn:3100\" ./vlogql --query '{type=\"clickhouse\"}' --tail\n\n---------- Logs Tail\nLog Labels: {'pid': '1658', 'level': 'Debug', 'type': 'clickhouse'}\n2022.03.18 16:54:47.634586 [ 1658 ] {} \u003cDebug\u003e system.query_views_log (2bbc858b-05df-49d1-abbc-858b05df69d1): Removing part from filesystem 202203_405891_405891_0\n2022.03.18 16:54:51.704528 [ 1658 ] {} \u003cDebug\u003e cloki.time_series (bfb2e93e-f78d-4692-bfb2-e93ef78d8692): Removing part from filesystem 20220318_22425079_22559905_26963\n2022.03.18 16:54:51.704730 [ 1658 ] {} \u003cDebug\u003e cloki.time_series (bfb2e93e-f78d-4692-bfb2-e93ef78d8692): Removing part from filesystem 20220318_22559906_22559906_0\n2022.03.18 16:54:51.704910 [ 1658 ] {} \u003cDebug\u003e cloki.time_series (bfb2e93e-f78d-4692-bfb2-e93ef78d8692): Removing part from filesystem 20220318_22559907_22559907_0\n2022.03.18 16:54:51.705140 [ 1658 ] {} \u003cDebug\u003e cloki.time_series (bfb2e93e-f78d-4692-bfb2-e93ef78d8692): Removing part from filesystem 20220318_22559908_22559908_0\n```\n\n##### Canary Logs _(push + websocket)_\n```bash\n# LOGQL_API=\"https://qryn:3100\" CANARY_TIMER=10 ./vlogql --canary --labels\n\n---------- Tail Canary Logs\nPUSH Successful: {\"streams\":[{\"stream\": {\"canary\":\"canary_9cwAkBFDlrcA\",\"type\":\"canary\"}, \"values\":[ [\"1649007076406000000\", \"ts=1649007076406000000 count=3 type=canary tag=canary_9cwAkBFDlrcA\"] ]}]}\nSleeping 10 seconds...\nLog Labels: {'canary': 'canary_9cwAkBFDlrcA', 'type': 'canary'}\nts=1649007076406000000 count=3 type=canary tag=canary_9cwAkBFDlrcA\nPUSH Successful: {\"streams\":[{\"stream\": {\"canary\":\"canary_9cwAkBFDlrcA\",\"type\":\"canary\"}, \"values\":[ [\"1649007086482000000\", \"ts=1649007086482000000 count=4 type=canary tag=canary_9cwAkBFDlrcA\"] ]}]}\nSleeping 10 seconds...\nLog Labels: {'canary': 'canary_9cwAkBFDlrcA', 'type': 'canary'}\nts=1649007086482000000 count=4 type=canary tag=canary_9cwAkBFDlrcA\n```\n\n-----\n\n### License\nLicensed under MIT, sponsored by [qxip](https://metrico.in) as part of the [metrico/qryn](https://metrico.in) project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmangani%2Fvlogql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmangani%2Fvlogql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmangani%2Fvlogql/lists"}