首页 > 代码库 > .NET开源MSSQL、Redis监控产品Opserver之MSSQL配置

.NET开源MSSQL、Redis监控产品Opserver之MSSQL配置

MSSQL的配置比较简单,主要包括三部分:

默认配置(defaultConnectionString)、集群配置(clusters)、单实例配置(instances)

defaultConnectionString 默认情况下节点不能删除,值可以为空。集群和实例必须存在其一,不然SQL监控页面不呈现,具体的配置细节可以查看Opserver.Core项目下setting文件夹的,sqlsetting.cs文件

{
  "defaultConnectionString": "Data Source=192.168.11.210;Initial Catalog=test;User ID=sa;Password=************",
  "clusters": [
    {
      "name": "192.168.11.210",
      "refreshIntervalSeconds": 20,
      "nodes": [
        {
          "name": "192.168.11.220",
          "connectionString": "Data Source=192.168.11.220;Initial Catalog=test;User ID=sa;Password=**********"
        },
        {
          "name": "192.168.11.210",
          "connectionString": "Data Source=192.168.11.210;Initial Catalog=test;User ID=sa;Password=**********"
        }
      ]
    }
  ],
  "instances": [
    {
      "name": "work",
      "connectionString": "Data Source=192.168.11.210;Initial Catalog=test;User ID=sa;Password=**********"
    }
  ]
}

就是这么简单方便,下面上一下效果图吧

技术分享

技术分享

技术分享

技术分享

 

就简单截图这几个,真是强大的很啊

 

.NET开源MSSQL、Redis监控产品Opserver之MSSQL配置