{"id":16108662,"url":"https://github.com/itallix/go-metrics","last_synced_at":"2026-01-11T02:02:45.603Z","repository":{"id":236741606,"uuid":"793066464","full_name":"itallix/go-metrics","owner":"itallix","description":"A scalable metrics collection system for distributed environments, built in Go.","archived":false,"fork":false,"pushed_at":"2024-10-12T21:27:25.000Z","size":8649,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T09:46:20.182Z","etag":null,"topics":["development","devops","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itallix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-04-28T10:30:38.000Z","updated_at":"2024-10-12T21:27:27.000Z","dependencies_parsed_at":"2024-04-28T11:31:02.030Z","dependency_job_id":"107e5eb7-b615-42cb-9e11-b5b46c7480fb","html_url":"https://github.com/itallix/go-metrics","commit_stats":null,"previous_names":["itallix/go-metrics"],"tags_count":0,"template":false,"template_full_name":"Yandex-Practicum/go-musthave-metrics-tpl","purl":"pkg:github/itallix/go-metrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itallix%2Fgo-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itallix%2Fgo-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itallix%2Fgo-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itallix%2Fgo-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itallix","download_url":"https://codeload.github.com/itallix/go-metrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itallix%2Fgo-metrics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28269897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T01:49:32.096Z","status":"online","status_checked_at":"2026-01-11T02:00:07.090Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["development","devops","golang"],"created_at":"2024-10-09T19:27:44.113Z","updated_at":"2026-01-11T02:02:45.580Z","avatar_url":"https://github.com/itallix.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-metrics\n\nMy pet project to learn Golang with Yandex Practicum [Advanced Go Developer](https://practicum.yandex.ru/go-advanced/) course.\n\n## Overview\n\n`go-metrics` is a robust, scalable metrics collection system designed for distributed environments. It consists of two main components: an agent that collects and sends metrics in batches, and a server that receives, processes, and exposes these metrics through a RESTful API.\n\n![Server-Agent](./doc/server-agent.png)\n\n## Key Features\n\n- Efficient Metric Collection: Agents collect system and application metrics with minimal overhead.\n- Batch Processing: Metrics are sent in batches to optimize network usage and server processing.\n- Scalable Architecture: Designed to handle multiple agents sending data to a centralized server.\n- RESTful API: Server exposes collected metrics through a REST API.\n\n## Components\n### Agent\n\n- Lightweight process that runs on target systems\n- Collects various system metrics (CPU, memory, disk usage, network stats, etc.)\n- Aggregates metrics and sends them in configurable batches (with assymetric encryption support)\n- Implements retry logic\n\n### Server\n\n- Centralized metrics receiver and processor\n- Efficiently handles incoming batch metrics from multiple agents\n- Can store metrics in memory (with filesystem synchronization) or in PostgreSQL\n- Provides a RESTful API for querying and analyzing metrics\n\n## REST API Endpoints\n\n- GET / - list all metrics as an HTML page\n- POST /update { \"id\": \"cpu\", \"type\": \"gauge\", \"value\": 23.46 } - update one metric\n- POST /updates - update the batch of metrics\n- POST /value { \"id\": \"cpu\", \"type\": \"gauge\" } - get one metric\n- POST /update/gauge/cpu/23.46 - update one metric\n- GET /value/gauge/cpu - read metric value\n- GET /ping - check database status (if started in DB mode)\n\n## Tech Stack\n\n_TBD_\n\n## Development\n\n### To get updates from template\n\nAdd git remote:\n\n```\ngit remote add -m main template https://github.com/Yandex-Practicum/go-musthave-metrics-tpl.git\n```\n\nUpdate autotests:\n\n```\ngit fetch template \u0026\u0026 git checkout template/main .github\n```\n\n### Requirements to run autotests\n\n- Branch name should follow pattern `iter\u003cnumber\u003e`, where `\u003cnumber\u003e` — number of increment. E.g., branch `iter4` will trigger autotests for increments 1-4.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitallix%2Fgo-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitallix%2Fgo-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitallix%2Fgo-metrics/lists"}