Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

.net open source MSSQL and Redis monitor the Redis configuration of the product Opserver

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about the Redis configuration of .NET open source MSSQL and Redis monitoring product Opserver. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

You can view the RedisModule.cs under the data/Redis folder of the Opserver.Core project by loading the Redis monitoring data instance. I added some comments.

/ load Redis connection / private static List LoadRedisConnections () {var result = new List (); / / default instance var defaultServerInstances = Current.Settings.Redis.Defaults.Instances; / / subset of the Servers node var allServerInstances = Current.Settings.Redis.AllServers.Instances Foreach (var s in Current.Settings.Redis.Servers) {var count = result.Count; / / Add instances that belong to any servers add a subset allServerInstances?.ForEach for the Servers instance (gi = > result.Add (new RedisConnectionInfo (s.Name, gi) / / Add instances defined on this server add the instance if (s.Instances.Count > 0) s.Instances.ForEach (I = > result.Add (new RedisConnectionInfo (s.Name, I)) defined in Servers; / / If we have no instances added at this point, defaults it is! If there are no instances, add the default if (defaultServerInstances! = null & & count = = result.Count) defaultServerInstances.ForEach (gi = > result.Add (new RedisConnectionInfo (s.Name, gi));} return result;}

The instance configuration under allservers and default will affect the configuration under servers. The instances of allservers and default are added to each node of servers. It is understandable that the configuration of allservers and default is a common configuration. In addition, if there are instances under allservers,servers, the instances under default will not work. If you want to customize instance loading, you can modify this code. In the actual configuration, all we have to do is configure servers.

{"Servers": [{"name": "127.0.0.1", "instances": [{"name": "localhost"

"port": "6379"

"password": "zoulu19900206"}}, {"name": "192.168.11.220", "instances": [{"name": "work", "port": "6379"

"password": "Lz+18518095396+zL"}]}]}

All right, here are some effect pictures.

The properties displayed on the panel can be obtained through the redis info command, and opserver shows it more clearly.

Ops (/ sec) processing capacity per second

Memory (used) is used_memory_rss (used_memory)

Used_memory_rss: returns the total amount of memory allocated by Redis (commonly known as resident set size) from an operating system perspective. This value is consistent with the output of top, ps, and so on.

Used_memory_peak: peak memory consumption of Redis (in bytes)

Used_memory: the total amount of memory allocated by the Redis allocator in byte

Summary is the overall overview section.

Memory is important for memory usage.

Persistence is the state of RDB and AOF.

In the case of keyspace key storage, analyze can view the detailed distribution.

Key hit ratio and processing capacity of stats client commands

It is important for clients to check which ip (or machine name) has a large number of connections, and it is very convenient to locate that application machine without releasing the connection for a long time.

The command log accepted by the slow command log server.

This is how the Redis configuration of the .NET open source MSSQL and Redis monitoring product Opserver is shared by Xiaobian. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report