{"id":19390778,"url":"https://github.com/einstore/systemator","last_synced_at":"2025-04-24T00:31:34.770Z","repository":{"id":39677738,"uuid":"196258046","full_name":"Einstore/Systemator","owner":"Einstore","description":"System information and monitoring for local and remote mac/ubuntu servers","archived":true,"fork":false,"pushed_at":"2023-03-16T00:35:29.000Z","size":705,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T07:10:51.137Z","etag":null,"topics":["macos","monitoring","nio","nio2","server","ssh","swift","ubuntu","vapor-4"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Einstore.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":"2019-07-10T18:42:28.000Z","updated_at":"2025-04-14T12:07:31.000Z","dependencies_parsed_at":"2024-11-10T10:37:10.375Z","dependency_job_id":null,"html_url":"https://github.com/Einstore/Systemator","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"16f1289353b9f0adcc783993e71fa39204b73fb7"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FSystemator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FSystemator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FSystemator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Einstore%2FSystemator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Einstore","download_url":"https://codeload.github.com/Einstore/Systemator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250539435,"owners_count":21447307,"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":["macos","monitoring","nio","nio2","server","ssh","swift","ubuntu","vapor-4"],"created_at":"2024-11-10T10:23:16.920Z","updated_at":"2025-04-24T00:31:31.647Z","avatar_url":"https://github.com/Einstore.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Systemator\n\nSystem information and monitoring for local and remote macOS and Ubuntu servers\n\n### Overview\n\nSystemator is made of three separate components\n\n- [x] a lower level code API which will allow you to integrate monitoring to any of your `NIO` apps called `SystemManager`\n- [x] a higher level `SystemController` which is built on the top of Vapor framework and gives you two ready to go endpoints\n- [x] a launchable app called `Systemator` which will launch a full Vapor app and makes it's API's available\n\n### Run whole monitoring app on it's own!\n\n```bash\nbrew tap einstore/homebrew-tap\nbrew install systemator\nsystemator\n```\n\nTo define a custom port or host do\n\n``` bash\nsystemator --hostname 0.0.0.0 --port 12345\n```\n\nor ...\n\n* Compile `Systemator` in *Xcode* and run!\n* Default address is `http://127.0.0.1:8080/info`\n\n### Integrate endpoints in an Vapor 4 app\n\nIntegrate `SystemController.Controller` in your routes method\n\n```swift\nimport Vapor\nimport SystemController\n\n/// Register your application's routes here.\npublic func routes(_ r: Routes, _ c: Container) throws {\n    try Controller().routes(r, c)\n}\n```\n\n### Endpoints\n\n`SystemController` will give you two endpoints\n\n* `[GET]  /info` - for a local system monitoring\n* `[POST] /info` - for a remote system monitoring\n\nThe output should look somehow like this:\n```json\n{\n    \"cpu\": {\n        \"clock\": 2900000000,\n        \"cores\": 4,\n        \"logicalCpu\": 8\n    },\n    \"usage\": {\n        \"hdd\": [\n            {\n                \"size\": 1000240963584,\n                \"use\": 3,\n                \"filesystem\": \"/dev/disk1s1\",\n                \"mounted\": \"/\",\n                \"available\": 442482974720,\n                \"used\": 10488909824\n            },\n            ...\n            {\n                \"size\": 1000240963584,\n                \"use\": 55,\n                \"filesystem\": \"/dev/disk1s5\",\n                \"mounted\": \"/System/Volumes/Data\",\n                \"available\": 442482974720,\n                \"used\": 540546445312\n            }\n        ],\n        \"memory\": {\n            \"total\": 67108864,\n            \"free\": 103,\n            \"used\": 67108761\n        },\n        \"cpu\": {\n            \"system\": 19.670000000000002,\n            \"user\": 22.420000000000002,\n            \"idle\": 57.890000000000001\n        },\n        \"processes\": []\n    }\n}\n```\n\u003e All data should be in units, bytes or percentages where it makes sense\n\nFor remote connection you will need to `POST` connection details in the body of the request and make sure the `Content-Type` is set to `application/json`\n```json\n{\n\t\"host\": \"172.16.217.131\",\n\t\"port\": 22,\n\t\"login\": \"pro\",\n\t\"password\": \"aaaaaa\"\n}\n```\n\u003e Please don't connect to the IP, it's a real server!!!\n\n### Swift level API\n\nThrough `SystemManager` library you can access monitoring from any Swift server side app that can support Apple `NIO` version 2\n\nThe basic usage is:\n\n```swift\nlet eventLoop = EmbeddedEventLoop()\nlet manager = try SystemManager(\n    .ssh(\n        host: \"ippppp\",\n        port: 22,\n        username: \"root\",\n        password: \"sup3rS3cr3t\"\n    ),\n    on: eventLoop\n)\nlet output = try manager.info().wait()\n```\n\n### Author\n\nOndrej Rafaj - @rafiki270\n*Did your try to connect to my server?!?! :D*\n\n\n### License\n\nMIT; Copyright 2019 - Einstore\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinstore%2Fsystemator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feinstore%2Fsystemator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feinstore%2Fsystemator/lists"}