{"id":26678223,"url":"https://github.com/telexintegrations/windows_server_health_checker","last_synced_at":"2025-03-26T05:15:14.876Z","repository":{"id":279064140,"uuid":"937203119","full_name":"telexintegrations/Windows_Server_Health_Checker","owner":"telexintegrations","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-23T14:13:43.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T15:23:01.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/telexintegrations.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":"2025-02-22T15:27:18.000Z","updated_at":"2025-02-23T14:13:47.000Z","dependencies_parsed_at":"2025-02-23T15:23:07.603Z","dependency_job_id":"889aeabf-e128-48df-b2b1-580c301460f3","html_url":"https://github.com/telexintegrations/Windows_Server_Health_Checker","commit_stats":null,"previous_names":["telexintegrations/windows_server_health_checker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2FWindows_Server_Health_Checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2FWindows_Server_Health_Checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2FWindows_Server_Health_Checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2FWindows_Server_Health_Checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telexintegrations","download_url":"https://codeload.github.com/telexintegrations/Windows_Server_Health_Checker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245591533,"owners_count":20640692,"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":[],"created_at":"2025-03-26T05:15:14.401Z","updated_at":"2025-03-26T05:15:14.856Z","avatar_url":"https://github.com/telexintegrations.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Windows Server Health Checker\n\nThis project is a FastAPI-based application that connects to a Windows Server using SSH and retrieves various health metrics such as CPU usage, memory usage, disk usage, and network usage. The results are then sent to [Telex](https://telex.im/).\n\n## Table of Contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Setup](#setup)\n- [Usage](#usage)\n- [Testing](#testing)\n- [Deployment](#deployment)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Connects to a Windows Server using SSH\n- Retrieves CPU usage, memory usage, disk usage, and network usage\n- Sends the results to a specified channel on [Telex](https://telex.im/)\n- Asynchronous processing using FastAPI and BackgroundTasks\n\n## Requirements\n\n- Python 3.8+\n- FastAPI\n- Paramiko\n- HTTPX\n- Pytest (for testing)\n\n## Periquisites\n\n- Create a [Telex](https://telex.im/) account\n- Create an organization\n- Create a channel\n- Note channel ID\n\n## Setup\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/yourusername/Windows_Server_Health_Checker.git\n   cd Windows_Server_Health_Checker\n   ```\n\n2. **Create a virtual environment:**\n\n   ```sh\n   python -m venv venv\n   source venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n   ```\n\n3. **Install the dependencies:**\n\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\n1. **Run the FastAPI application:**\n\n   ```sh\n   uvicorn main:app --reload\n   ```\n\n2. **Add /integration to your integrations on Telex:**\n\n   ![add_integration_to_telex](image.png)\n\n   NB: /integration should return a json as seen below\n\n   ```json\n        {\n        \"date\": {\n                \"created_at\": \"2025-02-18\",\n                \"updated_at\": \"2025-02-18\"\n            },\n            \"descriptions\": {\n                \"app_name\": \"Windows Server Health Checker\",\n                \"app_description\": \"Monitor the performance of a Windows Server\",\n                \"app_logo\": \"https://i.imgur.com/bRoRB1Y.png\",\n                \"app_url\": \"base_url\",\n                \"background_color\": \"#fff\"\n            },\n            \"is_active\": false,\n            \"integration_type\": \"interval\",\n            \"key_features\": [\n                \"- Monitor the performance of a Windows Server\",\n                \"- NB: This integration is only for Windows Servers\"\n                \"- NB: Ensure that SSH is enabled on the Windows Server\"\n            ],\n            \"integration_category\": \"Monitoring \u0026 Logging\",\n            \"author\": \"Chidubem Nwabuisi\",\n            \"website\": \"base_url\",\n            \"settings\": [\n                {\n                    \"label\": \"Server_IP\",\n                    \"type\": \"text\",\n                    \"required\": true,\n                    \"default\": \"\",\n                },\n                {\n                    \"label\": \"username\",\n                    \"type\": \"text\",\n                    \"required\": true,\n                    \"default\": \"\",\n                },\n                {\n                    \"label\": \"password\",\n                    \"type\": \"text\",\n                    \"required\": true,\n                    \"default\": \"\",\n                },\n                {\n                    \"label\": \"interval\",\n                    \"type\": \"text\",\n                    \"required\": true,\n                    \"default\": \"* * * * *\",\n                }\n            ],\n            \"tick_url\": \"\u003chost_base_url\u003e/api/v1/health\",\n    }\n\n   ```\n\n3. **Send a POST request to the `/api/v1/health` endpoint to test integration to call to Telex:**\n\n   You can use tools like `curl`, `Postman`, or any HTTP client to send a POST request to the `/health` endpoint with the required payload.\n\n   Example payload:\n\n   ```json\n   {\n   \t\"channel_id\": \"telex_channel_id\",\n   \t\"return_url\": \"https://ping.telex.im/v1/return/\u003ctelex-channel-id\u003e\",\n   \t\"settings\": [\n   \t\t{\n   \t\t\t\"label\": \"server_ip\",\n   \t\t\t\"type\": \"string\",\n   \t\t\t\"required\": true,\n   \t\t\t\"default\": \"127.0.0.1\"\n   \t\t},\n   \t\t{\n   \t\t\t\"label\": \"username\",\n   \t\t\t\"type\": \"string\",\n   \t\t\t\"required\": true,\n   \t\t\t\"default\": \"your_username\"\n   \t\t},\n   \t\t{\n   \t\t\t\"label\": \"password\",\n   \t\t\t\"type\": \"string\",\n   \t\t\t\"required\": true,\n   \t\t\t\"default\": \"your_password\"\n   \t\t},\n   \t\t{\n   \t\t\t\"label\": \"interval\",\n   \t\t\t\"type\": \"text\",\n   \t\t\t\"required\": true,\n   \t\t\t\"default\": \"* * * * *\"\n   \t\t}\n   \t]\n   }\n   ```\n\n   On Telex you should expect the following response upon successful connection to the server\n![Telex Successful integration](https://github.com/user-attachments/assets/f3e6b36c-1335-4df0-a01b-56c083cc1a99)\n\nIf there are problems while connecting to the server, you will get notified on Telex as seen below\n![Error Messages from Telex](https://github.com/user-attachments/assets/5e871332-bb17-4d35-bb57-8061d068775a)\n\n\n## Testing\n\n1. Ensure SSH is installed on the windows server. Follow guide [here](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui\u0026pivots=windows-server-2025)\n2. Ensure Windows Server is on the same network with you.\n3. Alternatively you can setup a windows server on any Virtualbox or VMware then test locally.\n4. Ensure user has administrative privileges.\n\n## Deployment\n\n1. Deployement was done to render.com for HTTPs communication\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fwindows_server_health_checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelexintegrations%2Fwindows_server_health_checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fwindows_server_health_checker/lists"}