Opserver配置Redis、SqlServer監控

來源:互聯網
上載者:User

標籤:

簡介

Opserver是Stack Overflow的開源監控解決方案,由Stack Exchange發布,基於.NET架構構建。開源地址:https://github.com/opserver/Opserver

使用

github下載原始碼編譯後,發布至IIS,需要先修改Opserver/Config目錄下配置資訊(根據模板修改):

首先是SecuritySettings.config(編輯後去掉.example尾碼):

1 <?xml version="1.0" encoding="utf-8"?>2 <!--配置為對所有人可訪問-->3 <SecuritySettings provider="alladmin">4     <InternalNetworks>5         <!--在此節點下的地址 無需身分識別驗證-->6         <Network name="SE Internal" cidr="127.0.0.1" />7     </InternalNetworks>8 </SecuritySettings>
啟用Redis監控

編輯RedisSettings.json,如下:

 1 { 2     "allServers": { 3         "name": "All", 4         "instances": [ 5             {"name":"所有Servers都有的執行個體","port":"99999"} 6         ] 7     }, 8     "Servers": [ 9         { 10             "name": "192.168.1.222" ,11             "instances": [ 12             { "name": "Redis_1", "port": "10001" },13            ]14         },15         {16           "name": "127.0.0.1",17           "instances": [ 18             { 19                 "name": "Redis_1", 20                 "port": "6379" 21             },22             { 23                 "name": "Redis_Master", 24                 "port": "6380",25                 "Password":"123456" //auth26             },27             { 28                 "name": "Redis_Slave_1", 29                 "port": "6381" },30             { 31                 "name": "Redis_Slave_2", 32                 "port": "6382" 33             },34            ]35         }36     ]37 }

這裡本機開啟了4個redisserver:6379-6382,6380(主)/6381/6382為主從叢集。

allservers內,是Servers節點下配置的執行個體中全域的執行個體資訊(配置內的redis實際為開啟,只示範用),監控:

點擊執行個體可查看Redis詳細監控資訊:

啟用SqlServer監控

編輯SQLSettings.json:

 1 { 2     //預設連接字串,執行個體未配置connectionString 的,將已name 替換 $ServerName$ 3     "defaultConnectionString": "Data Source=$ServerName$;Initial Catalog=master;Integrated Security=SSPI;", 4     "instances": [ 5         {  6             "name": "MYDB", 7             "connectionString": "Server=127.0.0.1;User ID=user;Password=123456;Trusted_Connection=false",  8         }, 9     ]10 }

 監控:

top中,可根據條件查看前幾位的查詢語句:

connections中,可查看當前活動連結,點擊可查看具體資訊:

可查看執行計畫:

 It‘s all

Opserver配置Redis、SqlServer監控

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.