SA (OPS), who is in the Internet, always lamented the hardship of his profession, why? I come to tell you: App crash, website can't open, website 502, search slow, apply to find operations, operation, project manager, boss and so on around operations, see its fire. Some operations are even subject to various accusations, such as poor technology, inadequate preparation, server optimization, and so on. In the face of thousands of projects, operation and maintenance is always in the fire and wronged, and research and development is constantly manufacturing bugs.
Problem Locator
In the event of a malfunction, the log is usually checked first, and the log analysis is used to locate some servers and projects, and then to narrow down to a project, finally, the SA and the development of the various cooperation between the end to identify problems and repair.
After each emergency fire, the OPS always asks: Why can't we find the problem in advance? Is there a tool that allows operations/development to identify problems and eliminate them in advance, or to be able to quickly locate stability when a fault occurs? It is important to realize that it is very inefficient to locate code problems in a conventional way, and that it is very challenging for the technical staff to be familiar with the business and personal skills.
Solution Solutions
In the daily work, people often consult my system for some problems or occasional problems how to find the reason, in addition to the solution, I will always tell him: to try APM Bar, can help you quickly identify problems, locate the cause of the problem. Today I would like to introduce to SA a domestic purely self-developed APM products---perspective treasure.
Perspective Treasure function
APM is an acronym for Application Performance Management (Application Performance Management), which enables real-time monitoring and analysis of IT systems to detect system bottlenecks and alarms and alerts to help operations and develop rapid positioning system problems. The Perspective Treasure contains APM (Application performance Management), mobile, browser, host four features:
Installation of the Perspective treasure
The installation of the perspective treasure is relatively simple, the official document of the perspective treasure is also very clear.
Please read the document directly: Http://portal.toushibao.com/app/create
Perspective Treasure's host management
After the smart agent is installed, you can see the newly added hosts in the background of the login perspective treasure, such as:
Today's theme is not "host", since the mention, then I would like to show you a perspective treasure under the basic monitoring of the host.
Server CPU, memory, process, network card, TCP monitoring entries all have. If these basic monitoring can meet you, then you can completely abandon Zabbix and other difficult open source monitoring products. Look at the monitoring effect:
Perspective Treasure's APM
Perspective PO APM currently supports mainstream Java, PHP, Python, and more. NET four languages code performance monitoring, PHP monitoring has supported the latest PHP7 official version, we mainly take PHP as an example to feel the power of APM.
Note: Originally prepared to take ttlsa.com to experience, for a variety of reasons, eventually replaced with another test site, the request is slightly less, but the way to track PHP performance problem is the same, can help us find code performance problems.
Click Apply, and select the domain you want to track, through the three projects of request, database, error to find out the PHP performance problem
APM Requests
First look at the overview chart, focusing on slow, very slow, wrong ratio, if relatively high, then to attract attention.
Normal: <500 MS, slow: 500-2000 MS, very slow: >2000 ms
The Perspective Treasure Lists all request URLs, as well as the response time and the number of requests that correspond to the URI.
Sort by response time, click a URL with a longer response time, and the following record appears on the right
Click on the record to track, you can see the entire request time-consuming TOP5 method, and can be code tracking, get request parameters, SQL statements, the most realistic restore environment.
It is important here that the longer time-consuming (MS) function/method illustrates the worse the performance. Thus, basically has been positioned to the performance problem code, the corresponding method to develop it. Did you find it? You can also catch PHP performance code if you don't know the code.
The most realistic restore site through the current request parameters
A slow response request is partly caused by inappropriate code writing, and partly by inefficient slow SQL. The perspective treasure can trace all the SQL statements contained in a request, so we can quickly locate the SQL problem and submit it to the research and development/DBA optimization.
APM's Database
Perspective PO APM is able to "request" to find poor performance code, low performance slow SQL. The perspective treasure is able to find slow SQL with poor performance through the database and find out the requests for slow SQL. The "Database" section suggests that DBAs often browse and optimize slow SQL on a regular basis.
Perspective Treasure provides a very clear and understandable SQL performance chart that gives developers a clear understanding of current SQL usage, such as SQL Operation response Time (TOPS), throughput (with SELECT, delete, insert, update)
The Perspective Treasure Lists all SQL operations lists, sorts the average response time, selects the SQL records that need to be addressed, and locates the interface/page that corresponds to the request time and the corresponding slow SQL statement.
Slow SQL Tracing
APM Error
In addition to discovering problems through requests and databases, we should always be concerned about "errors".
Appendix: Perspective Treasure Plugin
The Sendproxy, Discover, and osagent plugins are the default base plug-ins for smart agents, and the plug-ins provided by the Smart agent are shown in the following table.