{"id":15066804,"url":"https://github.com/sile/magpies","last_synced_at":"2026-02-12T15:01:36.731Z","repository":{"id":257791257,"uuid":"859899347","full_name":"sile/magpies","owner":"sile","description":"Command-line tool for polling and visualizing JSON-formatted time series metrics","archived":false,"fork":false,"pushed_at":"2024-09-23T06:11:03.000Z","size":186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T23:40:55.259Z","etag":null,"topics":["command-line","json","rust","time-series","tui","visualization"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sile.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":"2024-09-19T13:25:27.000Z","updated_at":"2024-09-23T06:11:06.000Z","dependencies_parsed_at":"2024-09-29T11:24:34.363Z","dependency_job_id":null,"html_url":"https://github.com/sile/magpies","commit_stats":null,"previous_names":["sile/magpies"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sile/magpies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Fmagpies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Fmagpies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Fmagpies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Fmagpies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sile","download_url":"https://codeload.github.com/sile/magpies/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sile%2Fmagpies/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271215037,"owners_count":24720098,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"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":["command-line","json","rust","time-series","tui","visualization"],"created_at":"2024-09-25T01:12:23.290Z","updated_at":"2026-02-12T15:01:31.683Z","avatar_url":"https://github.com/sile.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"magpies\n=======\n\n[![magpies](https://img.shields.io/crates/v/magpies.svg)](https://crates.io/crates/magpies)\n[![Actions Status](https://github.com/sile/magpies/workflows/CI/badge.svg)](https://github.com/sile/magpies/actions)\n![License](https://img.shields.io/crates/l/magpies)\n\nA command-line tool for polling and visualizing JSON-formatted time series metrics.\n\nThis tool does not require any schema or query definitions, making it ideal for quickly understanding an overview of targets that provide JSON-formatted metrics.\n\nFor more detailed or complex analysis, it is recommended to use more feature-rich tools such as [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/).\n\n![magpies](https://github.com/user-attachments/assets/88818790-1837-4682-a722-601f3e759c92)\n\nExamples\n--------\n\n```console\n// Install.\n$ cargo install magpies\n\n// Print help.\n$ magpies -h\nCommand-line tool for polling and visualizing JSON-formatted time series metrics\n\nUsage: magpies \u003cCOMMAND\u003e\n\nCommands:\n  poll    Poll the metrics of the specified targets and output the results in JSON Lines format to stdout\n  view    Launch the TUI viewer to visualize the results of the `poll` command\n  target  Generate a JSON object that defines a polling target\n  help    Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help     Print help\n  -V, --version  Print version\n\n// Collect memory metrics via sysinfojson command.\n$ cargo install sysinfojson\n$ sysinfojson system memory | jq .\n{\n  \"memory\": {\n    \"available_memory\": 38591873024,\n    \"total_memory\": 68719476736,\n    \"total_swap\": 0,\n    \"used_memory\": 32941457408,\n    \"used_swap\": 0\n  }\n}\n\n$ LOCAL_TARGET=$(magpies target --name local -- sysinfojson system memory)\n$ REMOTE_TARGET=$(magpies target --name remote -- ssh foo@bar sysinfojson system memory)\n\n$ magpies poll $LOCAL_TARGET $REMOTE_TARGET | tee metrics.jsonl\n{\"target\":\"local\",\"timestamp\":1727066396.667561,\"metrics\":{\"memory\":{\"available_memory\":38727598080,\"total_memory\":68719476736,\"total_swap\":0,\"used_memory\":32796721152,\"used_swap\":0}}}\n{\"target\":\"remote\",\"timestamp\":1727066397.19239,\"metrics\":{\"memory\":{\"available_memory\":3853799424,\"total_memory\":11564953600,\"total_swap\":8589930496,\"used_memory\":7711154176,\"used_swap\":2966417408}}}\n{\"target\":\"local\",\"timestamp\":1727066397.68037,\"metrics\":{\"memory\":{\"available_memory\":38723633152,\"total_memory\":68719476736,\"total_swap\":0,\"used_memory\":32799850496,\"used_swap\":0}}}\n{\"target\":\"remote\",\"timestamp\":1727066398.052064,\"metrics\":{\"memory\":{\"available_memory\":3853238272,\"total_memory\":11564953600,\"total_swap\":8589930496,\"used_memory\":7711715328,\"used_swap\":2966417408}}}\n...\n\n// Launch the TUI viewer in a separate terminal.\n$ magpies view metrics.jsonl --interval 5 --portable-chart\n┏Status━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┏Help━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃Time:    120s ~ 124s (between 0s ~ 124s)                  ┃┃Quit: \u003cQ\u003e                                                ┃\n┃Targets: 2                                                ┃┃Time: \u003cP\u003erev, \u003cN\u003eext, \u003cS\u003etart, \u003cE\u003end                     ┃\n┃Metrics: 5 (filter=.*)                                    ┃┃Move: \u003cLeft\u003e, \u003cRight\u003e, \u003cUp\u003e, \u003cDown\u003e, \u003cPageUp\u003e, \u003cPageDown\u003e┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n┏Aggregated Metrics━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┏Metrics of \"memory.used_memory\"━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃           Name                  Value         Delta/s   ║┃┃       Target               Value            Delta/s    █┃\n┃memory.available_memory      42,546,443,605     -353,293 ║┃┃local                    32,797,085,696        -747,601 █┃\n┃memory.total_memory          80,284,430,336            0 █┃┃remote                    7,746,992,810       1,172,493 █┃\n┃memory.total_swap             8,589,930,496            0 █┃┃                                                        █┃\n┃memory.used_memory           40,544,078,506      424,891 █┃┃                                                        █┃\n┃memory.used_swap              2,955,407,360            0 █┃┃                                                        █┃\n┃                                                         █┃┃                                                        ║┃\n┃                                                         █┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n┃                                                         █┃┏Delta/s Chart of \"memory.used_memory\"━━━━━━━━━━━━━━━━━━━━┓\n┃                                                         █┃┃ 2,629,345│   •••    ••      ••      •••           ••••  ┃\n┃                                                         █┃┃          │  •   ••••  •    •  ••  ••   ••      •••    ••┃\n┃                                                         █┃┃          │ •           •   •    ••       ••  ••         ┃\n┃                                                         █┃┃          │•             • •                ••           ┃\n┃                                                         █┃┃-3,064,996│               •                              ┃\n┃                                                         █┃┃          └──────────────────────────────────────────────┃\n┃                                                         ║┃┃        60s                                          120s┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛\n```\n\nViewer Terms\n------------\n\n- `Aggregated Metrics` table:\n  - `Name` column:\n    - The name of the metric.\n  - `Value` column:\n    - The aggregated value of the metric.\n    - For numeric metrics, the sum of the metric values of the targets is displayed.\n    - For non-numeric metrics, the union of the metric values of the targets is displayed.\n  - `Delta/s` column:\n    - If the metric is numeric, `({{ CURRENT_VALUE }} - {{ PREVIOUS_VALUE }}) / {{ INTERVAL_SECONDS }}` is displayed.\n- `Metrics of \"{{ METRIC_NAME }}\"` table:\n  - `Target` column:\n    - The target name.\n  - `Value` column:\n    - The metric value of the target.\n    - If multiple values are collected within the same interval:\n      - For numeric metrics, the average of the values is displayed.\n      - For non-numeric metrics, the union of the values is displayed.\n  - `Delta/s` column:\n    - If the metric is numeric, `({{ CURRENT_VALUE }} - {{ PREVIOUS_VALUE }}) / {{ INTERVAL_SECONDS }}` is displayed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsile%2Fmagpies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsile%2Fmagpies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsile%2Fmagpies/lists"}