{"id":17908795,"url":"https://github.com/iequ1/system_monitor","last_synced_at":"2025-03-23T20:31:13.685Z","repository":{"id":41956477,"uuid":"436294046","full_name":"ieQu1/system_monitor","owner":"ieQu1","description":"\"htop\" for erlang / elixir processes","archived":false,"fork":false,"pushed_at":"2025-01-03T20:35:30.000Z","size":1054,"stargazers_count":14,"open_issues_count":1,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-18T23:41:20.700Z","etag":null,"topics":["elixir","erlang","grafana","performance","top"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ieQu1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-12-08T15:19:04.000Z","updated_at":"2025-02-12T15:43:29.000Z","dependencies_parsed_at":"2024-06-02T09:50:16.348Z","dependency_job_id":"611a2663-daec-4621-8f3d-cef3944384b6","html_url":"https://github.com/ieQu1/system_monitor","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ieQu1%2Fsystem_monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ieQu1%2Fsystem_monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ieQu1%2Fsystem_monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ieQu1%2Fsystem_monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ieQu1","download_url":"https://codeload.github.com/ieQu1/system_monitor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245164903,"owners_count":20571206,"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":["elixir","erlang","grafana","performance","top"],"created_at":"2024-10-28T19:17:54.108Z","updated_at":"2025-03-23T20:31:13.366Z","avatar_url":"https://github.com/ieQu1.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# system_monitor\n\u003e Erlang telemetry collector\n\n`system_monitor` is a BEAM VM monitoring and introspection application\nthat helps troubleshooting live systems. It collects various\ninformation about Erlang and Elixir processes and applications.\n\nUnlike `observer`, `system_monitor` it does not require connecting to\nthe monitored system via Erlang distribution protocol, and can be used\nto monitor systems with very tight access restrictions. It can happily\nmonitor systems with millions of processes.\n\nBy default the data is stored in a Postgres database, and visualized\nusing Grafana. Ready to use docker images of\n[Postgres](https://github.com/k32/grafana-dashboards/pkgs/container/sysmon-postgres)\nwith the necessary schema and\n[Grafana](https://github.com/k32/grafana-dashboards/pkgs/container/sysmon-grafana)\nwith the dashboards are provided. See\n[documentation](https://github.com/k32/grafana-dashboards).\n\n## Features\n\n### Process top\n\nInformation about top N Erlang processes consuming the most resources\n(such as reductions or memory), or have the longest message queues, is\npresented on process top dashboard:\n\n![Process top](doc/proc_top.png)\n\nHistorical data can be accessed via standard Grafana time\npicker. `status` panel can display important information about the\nnode state. Pids of the processes on that dashboard are clickable\nlinks that lead to the process history dashboard.\n\n### Process history\n![Process history](doc/proc_history.png)\n\nProcess history dashboard displays time series data about certain\nErlang process. Note that some data points can be missing if the\nprocess didn't consume enough resources to appear in the process top.\n\n### Application top\n![Application top](doc/app_top.png)\n\nApplication top dashboard contains various information aggregated per\nOTP application.\n\n## Usage example\n\nIn order to integrate `system_monitor` into your system, simply add it\nto the release apps. Add the following lines to `rebar.config`:\n\n```erlang\n{deps,\n [ {system_monitor, {git, \"https://github.com/k32/system_monitor\", {tag, \"3.0.2\"}}}\n ]}.\n\n{relx,\n [ {release, {my_release, \"1.0.0\"},\n    [kernel, sasl, ..., system_monitor]}\n ]}.\n```\n\nOr to `mix.exs` for Elixir:\n\n```elixir\ndefp deps() do\n    [\n        {:system_monitor, github: \"k32/system_monitor\", tag: \"3.0.2\"}\n    ]\nend\n```\n\nTo enable export to Postgres:\n\n```erlang\napplication:load(system_monitor),\napplication:set_env(system_monitor, callback_mod, system_monitor_pg)\n```\n\n### Custom node status\n\n`system_monitor` can export arbitrary node status information that is\ndeemed important for the operator. This is done by defining a callback\nfunction that returns an HTML-formatted string (or iolist):\n\n```erlang\n-module(foo).\n\n-export([node_status/0]).\n\nnode_status() -\u003e\n  [\"my node type\u003cbr/\u003e\",\n   case healthy() of\n     true  -\u003e \"\u003cfont color=#0f0\u003eUP\u003c/font\u003e\u003cbr/\u003e\"\n     false -\u003e \"\u003cmark\u003eDEGRADED\u003c/mark\u003e\u003cbr/\u003e\"\n   end,\n   io_lib:format(\"very important value=~p\", [very_important_value()])\n  ].\n```\n\nThis callback then needs to be added to the system_monitor application\nenvironment:\n\n```erlang\napplication:set_env(system_monitor, node_status_fun, {?MODULE, node_status})\n```\n\nMore information about configurable options and the defaults is found\n[here](src/system_monitor.app.src).\n\n### What are the preconfigured monitors\n\n* `check_process_count`\n  Logs if the process_count passes a certain threshold\n* `suspect_procs`\n  Logs if it detects processes with suspiciously high memory\n\n`system_monitor_pg` allows for Postgres being temporary down by storing the stats in its own internal buffer.\nThis buffer is built with a sliding window that will stop the state from growing too big whenever\nPostgres is down for too long. On top of this `system_monitor_pg` has a built-in load\nshedding mechanism that protects itself once the message length queue grows bigger than a certain level.\n\n## Release History\n\nSee our [changelog](CHANGELOG.md).\n\n## License\n\nCopyright © 2020 Klarna Bank AB\nCopyright © 2021-2022 k32\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiequ1%2Fsystem_monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiequ1%2Fsystem_monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiequ1%2Fsystem_monitor/lists"}