{"id":29572206,"url":"https://github.com/swaggymacro/fanx","last_synced_at":"2025-08-12T01:06:39.233Z","repository":{"id":304950471,"uuid":"1020665057","full_name":"SwaggyMacro/FanX","owner":"SwaggyMacro","description":"Web platform for intelligent fan control and monitoring on Dell servers, built with .NET 8 and Blazor. Features real-time monitoring, smart fan speed adjustment, multi-channel notifications, permission management, and multilingual UI. 基于 .NET 8 和 Blazor 的戴尔服务器风扇智能监控与控制平台，支持实时监控、智能调速、多通知渠道、权限管理与多语言界面。","archived":false,"fork":false,"pushed_at":"2025-07-17T07:58:38.000Z","size":4503,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-17T11:11:05.134Z","etag":null,"topics":["blazor","bmc","dell","fan","fan-control","idrac","ipmitool","server"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwaggyMacro.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,"zenodo":null}},"created_at":"2025-07-16T08:00:48.000Z","updated_at":"2025-07-17T07:58:42.000Z","dependencies_parsed_at":"2025-07-17T15:42:30.828Z","dependency_job_id":"6fc2dd07-62f9-448a-bd5f-9f31058a44a7","html_url":"https://github.com/SwaggyMacro/FanX","commit_stats":null,"previous_names":["swaggymacro/fanx"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/SwaggyMacro/FanX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwaggyMacro%2FFanX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwaggyMacro%2FFanX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwaggyMacro%2FFanX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwaggyMacro%2FFanX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwaggyMacro","download_url":"https://codeload.github.com/SwaggyMacro/FanX/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwaggyMacro%2FFanX/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269982061,"owners_count":24507301,"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-11T02:00:10.019Z","response_time":75,"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":["blazor","bmc","dell","fan","fan-control","idrac","ipmitool","server"],"created_at":"2025-07-19T05:00:20.916Z","updated_at":"2025-08-12T01:06:39.224Z","avatar_url":"https://github.com/SwaggyMacro.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# ![.NET](https://img.shields.io/badge/.NET-8.0-blue) ![Version](https://img.shields.io/badge/version-1.0.0-brightgreen) [![English](https://img.shields.io/badge/EN-README-blue)](README_EN.md)\n# FanX\n\nJump to: [English Version](README_EN.md)\n\nFanX 是一款基于 .NET 8 和 Blazor 的风扇控制与监控平台，主要用于戴尔服务器（支持 BMC 的理论上应该也可以用），能够实时监控设备运行状态，并根据自定义或智能规则动态调节风扇转速，在确保系统温度和功率在安全范围内可降低一定的噪音。  \n\n**iDrac `3.30.30.30` 版本以上不再支持手动调速**，唯一方法只有降级**iDrac**，降级有风险。\n## 核心功能\n\n- 实时监控：\n  - 功率（Power）\n  - 风扇转速（Fan Speed）\n  - CPU 温度\n  - 主板进出口温度（Inlet/Outlet Temperature）\n\n- 自定义规则通知：\n  - 当温度或转速达到设定阈值时，触发通知\n  - 支持单个或多个风扇目标监控和通知\n  - 通知渠道支持：企业微信机器人、Webhook、Telegram 机器人、邮箱\n\n- 智能风扇控制：\n  - 根据温度自动调整一个或多个风扇的转速\n  - 规则示例：当 CPU 温度 ≥ 70℃ 时，将风扇 A 转速设置为 80%，风扇 B 转速设置为 60%\n  - 支持多级温度—转速映射曲线，精细化控制\n\n- IPMI 接口支持（Linux/Windows）：\n  - 通过 ipmitool 与 BMC 通信（Windows 环境自带 ipmitool，Linux 需手动安装），获取传感器数据或下发控制指令\n  - 支持 Red Hat、Ubuntu 等常见发行版一键安装依赖（Linux）\n\n- 日志与历史数据：\n  - 支持日志保留天数设置和传感器数据保留策略\n  - 可视化历史曲线展示温度、转速和功率变化趋势\n\n- 用户及权限管理：\n  - 管理员与普通用户分级权限\n  - 支持注册、登录、重置密码等功能\n\n- 多语言支持：\n  - 支持中文和英文界面切换\n\n- 深色/浅色主题切换\n- 支持 Docker 部署\n\n\n## 依赖要求\n- .NET 8 SDK 或运行时\n  - Linux 用户可以通过包管理器安装：\n    ```bash\n    # Ubuntu/Debian\n    sudo apt-get update \u0026\u0026 sudo apt-get install -y dotnet-sdk-8.0\n    # RHEL/CentOS/Fedora\n    sudo dnf install -y dotnet-sdk-8.0\n    ```\n  - Windows 用户可以从 [.NET 官网](https://dotnet.microsoft.com/download/dotnet/8.0) 下载安装程序。\n- ipmitool（Linux 用户需要手动安装，Windows 用户自带）\n    - Linux 用户可以通过包管理器安装 ipmitool：\n    ```bash\n        # Ubuntu/Debian\n        sudo apt-get update \u0026\u0026 sudo apt-get install -y ipmitool\n        # RHEL/CentOS/Fedora\n        sudo dnf install -y ipmitool\n    ```\n\n## 快速上手\n### 从 Release 下载\n1. 前往 [Release 页面](https://github.com/SwaggyMacro/FanX/releases) 下载最新版本的压缩包。\n2. 解压缩下载的文件。\n3. 运行应用程序：\n   Linux 用户可以使用以下命令运行：\n   ```bash\n    dotnet FanX.dll\n    ```\n   Windows 用户可以直接双击 `FanX.exe` 运行。\n4. 在浏览器中访问以下地址，使用管理员账号登录并开始配置：\n    - http://localhost:5136\n    - 默认管理员账号：\n      - 账号：`admin`\n      - 密码：`admin123`\n\n### Docker 部署\n你可以使用项目中提供的 [docker-compose.yml](docker-compose.yml) 文件进行 Docker 部署，这样可以在容器化环境中运行 FanX，所有依赖都将自动管理。\n或者你也可以直接使用 Docker 命令部署：\n```bash\ndocker run -d \\\n  --name fanx \\\n  -p 5136:5136 \\\n  -v /docker/fanx/data:/app/data \\\n  -v /docker/fanx/logs:/app/logs \\\n  -v /etc/timezone:/etc/timezone:ro \\\n  -v /etc/localtime:/etc/localtime:ro \\\n  realswaggymacro/fanx:latest\n```\n   \n### 克隆并运行\n1. 克隆仓库：\n   ```bash\n   git clone https://github.com/SwaggyMacro/FanX.git\n   cd FanX\n   ```\n2. 安装依赖（Linux）：\n   ```bash\n   # Ubuntu/Debian\n   sudo apt-get update \u0026\u0026 sudo apt-get install -y ipmitool\n\n   # RHEL/CentOS/Fedora\n   sudo dnf install -y ipmitool\n   ```\n3. 无需手动编辑配置文件，系统提供默认配置并支持在界面中调整通知和数据库连接等设置。\n4. 编译并运行：\n   ```bash\n   dotnet build\n   dotnet run --project FanX/FanX.csproj\n   ```\n5. 在浏览器访问以下地址，使用管理员账号登录并开始配置：\n    - http://localhost:5136\n    - 默认管理员账号：\n      - 账号：`admin`\n      - 密码：`admin123`\n\n## 如何使用\n- 登录后，您可以在 `/ipmi-config` 页面配置 BMC(iDrac) 地址、用户名和密码。\n- 在 `/fan-control` 页面定义自定义或智能风扇控制规则。\n- 在 `/notifications` 页面配置通知渠道和规则，包括企业微信机器人、Webhook、Telegram 机器人、邮箱等。\n- 在 `/settings` 页面设置日志保留天数、传感器数据保留策略等。(默认30天)\n\u003e 如果你需要手动调控风扇，可以在 `/fan-control` 页面设置为手动控制，然后前往 `/debug` 页面手动调节风扇转速，支持单个风扇手动调节。\n\n## 配置说明\n\n- `/ipmi-config` 页面：配置 BMC(iDrac) 地址、用户名、密码\n- `/fan-control` 页面：定义自定义或智能风扇控制规则\n- `/notifications` 页面：配置通知渠道和规则，包括企业微信机器人、Webhook、Telegram 机器人、邮箱等\n- `/settings` 页面：设置日志保留天数、传感器数据保留策略等\n\n\n## 玩法\n\n比如你可以设置一个智能规则，规则如下图，可实现内容：\n- CPU1 \u003e 80度 给 123号风扇 80% 转速, CPU2 \u003e 80度 给 456号风扇 80% 转速\n- CPU1 \u003e 70度 给 123号风扇 50% 转速, CPU2 \u003e 70度 给 456号风扇 50% 转速\n- CPU1 \u003e 60度 给 123号风扇 30% 转速, CPU2 \u003e 60度 给 456号风扇 30% 转速\n- CPU1 \u003e 50度 给 123号风扇 20% 转速, CPU2 \u003e 50度 给 456号风扇 15% 转速\n  - 因为我这 CPU1 温度会比 CPU2 高，所以我设置了在 CPU1 侧的123号风扇转速更高\n- CPU1 \u003c 50度 给 123号风扇 10% 转速, CPU2 \u003c 50度 给 456号风扇 10% 转速\n\n\u003e 同时你也可以根据进风口温度和出风口温度来设置风扇转速，或者根据功率来设置风扇转速。\n\n![玩法示例](Screenshot/screenshot_smart_rule_example.png)\n\n## 已测试设备\n- Dell PowerEdge R720xd\n\n理论上支持BMC的服务器都可以使用，如 T640, R510, R720, R720xd, R730, R730xd, R740, R740xd 等。\n\n## 贡献与反馈\n\n欢迎提 Issue 或 Pull Request，或在项目主页上讨论交流！\n\n## 使用截图\n![控制台](Screenshot/screenshot_dashboard_cn.png)\n![控制台图表](Screenshot/screenshot_dashboard_chart_cn.png)\n![风扇控制](Screenshot/screenshot_fancontrol_cn.png)\n![智能规则](Screenshot/screenshot_smart_rule_cn.png)\n![通知配置](Screenshot/screenshot_notification_cn.png)\n![Telegram 通知](Screenshot/screenshot_tg.png)\n![企业微信机器人](Screenshot/screenshot_wecom.png)\n\n---\n\n© 2025 SwaggyMacro\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswaggymacro%2Ffanx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswaggymacro%2Ffanx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswaggymacro%2Ffanx/lists"}