开源地址:https://github.com/opserver/Opserver
SecuritySettings配置AllAdmin登录:
<?xml version="1.0" encoding="utf-8"?> <!--<SecuritySettings provider="AD" apiKey="myKey"> --><!-- Optional, these networks can see the overview dashboard without authentication --><!-- <InternalNetworks> <Network name="SE Internal" cidr="10.0.0.0/8" /> </InternalNetworks> </SecuritySettings>--> <SecuritySettings provider="alladmin" /> <!-- Example of global access for everyone: <SecuritySettings provider="alladmin" /> -->
SQLSettings 配置连接SQL Server数据库
/* Configuration for the SQL Server dashboard */ { // The default connection string used unless specifically provided on a node // $ServerName$ gets replaces with the name property of the instance "defaultConnectionString": "Data Source=$ServerName$;Initial Catalog=master;Integrated Security=SSPI;", // How often to poll all servers (defaults to 60 seconds if not configured) "refreshIntervalSeconds": 30, // Always On Availability Group Clusters //"clusters": [ // { // // Used purely for display // "name": "NY-SQLCL03", // // How often to poll the server // "refreshIntervalSeconds": 20, // // The list of nodes (servers) in this AG setup // "nodes": [ // { "name": "NY-SQL01" }, // { "name": "NY-SQL02" }, // { "name": "CO-SQL01" } // ] // } //], // Standalone instances "instances": [ // An example with all the options configured { "name": "192.168.200.30", "connectionString": "Data Source=192.168.200.30;Initial Catalog=CheersLifeNew;User ID=lifescreen;Password=123456;", "refreshIntervalSeconds": 200 }, // Some standalone servers (default instance) using default refresh and connection strings: //{ "name": "NY-DESQL01" }, //{ "name": "NY-RESTORESQL01" }, //{ "name": "NY-UTILSQL01" }, // Example of a named instance { "name": "192.168.200.30" } ] }
RedisSettings配置连接Redis
/* Configuration for the Redis dashboard */ { /* If a server doesn't specify any instances, then these will be used as a fallback. For most simple setups, this is a single :6379 instance */ "defaults": { "instances": [ { "name": "Default", // Name to use in the UI "port": 6379 // Port the instance runs on } ] }, /* (DEPRECATED) - will remove this in favor of defaults in 2.0 Instances that appear on *all* servers (even if they *also* specify their own) Useful for environments where most servers have the same setup, like a master + replica configuration. Or, in a simple setup you'd just declare the 6379 (redis default port) instance here. */ "allServers": { "instances": [ { "name": "JYJ_Master", "port": 6379, /* Regexes to use in memory analysis Each key is evaluated against these and they're use for bucketing. This helps find out what the heavy key patterns are. */ "analysisRegexes": { "**local**": "^local-", "**dev**": "^dev-", "**local:**": "^local:", "**dev:**": "^dev:" } } //, //{ // "name": "Careers", // "port": 6380 //}, //{ // "name": "Gossip (Q&A)", // "port": 6381 //}, //{ // "name": "Analytics (Careers)", // "port": 6382 //}, //{ // "name": "CoreML (Q&A)", // "port": 6383, // "analysisRegexes": { // "ltah-home-pred": "^ltah-home-pred-", // "ltal-home-pred": "^ltal-home-pred-", // "ml-ltap-cache": "^ml-ltap-cache-", // "is-ml-elligible": "^is-ml-elligible-", // "is-lowml-elligible": "^is-lowml-elligible-" // } //} ] }, /* Individually specified servers (DNS entries or IPs) Each of these may specify their own instances. If they don't, each will inherit the instances configured in allServers above. */ "Servers": [ // Simple server, inheriting the instances from allServers { "name": "192.168.200.145" }, //{ "name": "ny-redis02" }, //{ "name": "co-redis01" }, //{ "name": "co-redis02" }, // Server specifying it's own instance list, NOT inheriting from allServers above { "name": "192.168.200.145", "instances": [ { "name": "192.168.200.145", "port": 6379, //"password": "superSecret", // Instance has a password "useSSL": "true" // Connect via SSL (not built into redis itself - default is false) } ] } ] }
源码:https://github.com/jiangyanjun/Opserver/tree/master/Opserver