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

How to use app-metrics+Grafana + InfluxDB to realize high-end performance monitoring interface under AspNet Core

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

How to use app-metrics+Grafana + InfluxDB to achieve a high-end performance monitoring interface under AspNet Core. In view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

In the daily system work, in order to gain insight into the problems and operation of the system, we usually record the log for analysis, but in many cases we passively check the log after something goes wrong. In many cases, we may need to know the operation of the whole system or a certain period of time in relatively real time, such as the frequency of system errors and response time and so on. These dynamic quasi-real-time information is very important for monitoring the operation and health of the whole system, and the protagonists of this article can help you achieve this goal through good cooperation, and it is a high-end way to achieve it. Think of making a cup of tea with its legs crossed and looking at the huge screen with a bunch of gorgeous meters and graphs, even if you don't understand it, it looks like B! Who knows if I can read it or not, do I? )

Q: then what is App-Metrics?

A: App Metrics is an open source and cross-platform. NET library that records metrics in an application. It can be run on the .NET Core or on the full .NET framework that supports .NET 4.5.2.

App Metrics abstracts the underlying data sources well to support many types of databases, such as:

InfluxDb, Prometheus, ElasticSearch and so on.

At the same time, he also provided a lot of Measurements, such as Apdex, Gauges, Counters, Meters, Histograms and so on.

1. Install Grafana

Q: what is Grafana?

A: a visual data open source program similar to Kibana, generally cooperate with time series database to display data

Here to facilitate the use of docker to run Grafana

Docker run-d-- name=grafana-p 3000UR 3000 grafana/grafana

Cymbal

Then let's make sure it's working properly.

Docker ps-a

Cymbal

two。 Install InfluxDB

InfluxDb is a popular time series database, which can be replaced with Prometheus as needed. For convenience, we still use docker to run it.

If you want to keep the data collected by the previous docker run every time, you can map the directory to the local directory with the-v option of docker to persist the data.

= = notice that influxdb has two ports, one is admin, one is database==docker run-d-p 8083 database==docker run-p 8086 database==docker run-- expose 8090-- expose 8099 tutum/influxdb

As shown in the picture, open another console and we can see that 2 containers have already been run in the background.

Cymbal

Enter http://127.0.0.1:8083/ to access the control interface of InfluxDb to create a database

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

Servers

Wechat

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

12
Report