项目发布后,对于我们程序员来说,项目还不是真正的结束,保证项目的稳定运行也是非常重要的,而对于服务器的监控,就是保证稳定运行的手段之一。对数据库、Redis、ES等一些中间件的监控,也都是非常重要。
所以,今天给大家推荐一个轻量级的开源监控解决方案。.
项目简介
这是有 Stack Overflow 的开源监控产品,基于.Net Core开发的监控解决方案。它可以独立监控多个系统,监控信息包含CPU、内存、网络、硬件等有关信息,它为每个监控的系统提供一个总体监控信息,方便我们运维方便查看服务器情况与定位问题。
技术架构
1、跨平台:基于.NetCore开发,支持Windows、Mono、Liunx、Windows Azure、Docker。
2、技术栈 .Net Core 6.0 + Asp.Net Mvc。
可监控服务
-
服务器 / 交换机 -
SQL Server 单例与集群 -
Redis -
Elasticsearch -
HAProxy -
PagerDuty -
CloudFlare DNS

安全配置
{
"provider": "EveryonesAnAdmin",
"apiKey": "<Global API Key>",
"internalNetworks": [
{
"name": "My Internal",
"cidr": "10.0.0.0/8"
}
],
"viewEverythingGroups": "Opserver-View",
"adminEverythingGroups": "Opserver-Admins;Opserver-MoreAdmins",
"scopes": [ "openid", "email" ],
"clientId": "<Client ID>",
"clientSecret": "<Client Secret>",
"authorizationUrl": "https://example.org/oauth2/authorize",
"accessTokenUrl": "https://example.org/oauth2/token",
"userInfoUrl": "https://example.org/oauth2/token",
"nameClaim": "nameIdentifier",
"groupsClaim": "groups"
}
"Sql": {
"defaultConnectionString": "Data Source=127.0.0.1;Initial Catalog=master;User ID=sa;Password=123456",
"clusters": [
{
"name": "127.0.0.1",
"refreshIntervalSeconds": 20,
"nodes": [
{
"name": "127.0.0.1",
"connectionString": "Data Source=127.0.0.1;Initial Catalog=master;User ID=sa;Password=123456"
}
]
}
],
"instances": [
{
"name": "work",
"connectionString": "Data Source=127.0.0.1;Initial Catalog=master;User ID=sa;Password=123456"
}
]
},
监控主界面