grafana

grafana可视化业务指标

元气小坏坏 提交于 2020-07-27 22:43:40
grafana可视化业务指标 grafana不仅可以结合https://prometheus.io/进行服务器监控,还可以访问mysql数据库,对各业务指标进行统计和分析,不失为快速报表分析的一种方法。 https://blog.csdn.net/weixin_34185512/article/details/87960955 来源: oschina 链接: https://my.oschina.net/swingcoder/blog/4410370

influxDB

和自甴很熟 提交于 2020-07-27 13:55:41
开源的分布式时序、时间和指标数据库,使用Go语言编写,无需外部依赖。其中,时间序列数据库是数据格式里包含Timestamp字段的数据,比如某一时间用户上网流量、通话详单等。但是,有什么数据不包含Timestamp呢?几乎所有的数据都可以打上一个Timestamp字段。时间序列数据更重要的一个属性是如何去查询它,包括数据的过滤、计算等。 它有三大特性: 时序性(Time Series):与时间相关的函数的灵活使用(例如最大、最小、求和等); 度量(Metrics):对实时大量数据进行计算; 事件(Event):支持任意的事件数据,换句话说,任意事件的数据我们都可以做操作。 个人认为InfluxDB的几个优点: 无特殊依赖,几乎开箱即用(如ElasticSearch需要Java) 自带数据过期功能; 自带权限管理,精细到“表”级别; 原生的HTTP支持,内置HTTP API 强大的类SQL语法,支持min, max, sum, count, mean, median 等一系列函数,方便统计。 自带管理界面(如下图),免插件配置。 InfluxDB基本概念 1、与传统数据库中的名词做比较 InfluxDB中的名词 传统数据库中的概念 database 数据库 measurement 数据库中的表 points 表里面的一行数据 2、InfluxDB中特有的概念 1)Point

QPS从1.4W暴增至65W,腾讯课堂是如何对海量请求进行监控的?

久未见 提交于 2020-07-27 09:26:56
疫情来势凶猛,腾讯课堂“停课不停学”专项为千万学子保驾护航。面对一个月内课堂流量的暴涨,监控体系如何在有限的时间内快速发现潜在问题并高效定位,进而保证服务稳定?本文是对腾讯课堂监控实践的总结,并且对未来监控体系提出一些思考。 一、遇到的挑战 腾讯课堂PCU从5w暴增到600w,接入层QPS从1.4w涨到65w,如何对海量请求进行监控,快速发现并解决问题成了很大的挑战。拆分到具体细节,主要有以下几点: 如何通过监控保障服务质量? 需要监控哪些指标?需要使用哪些监控工具? 需要对哪些指标进行告警?告警具体有哪些方法? 如何保证告警之后处理流程的高效? 除了监控、告警外,还有哪些方法可以用来保证服务的稳定? 二、应对策略 1. 明确思路:快速监控业务,后续逐步优化 随着极速版、公立校版陆续上线,PCU也迅速上涨到百万量级。各服务已经通过扩容来抗住了剧增的流量,但此时没有太多时间来推动各系统排查隐患进行优化,就需要通过监控系统来监测业务稳定,基于错误码维度的业务告警来发现问题,推动各系统针对性地进行处理优化,业务稳定后再将优化监控,覆盖到更多维度的指标,进一步提升服务稳定性。 2. 监控工具 作为管理基础设施和业务的核心工具,监控是公司各业务必不可少的能力 ,腾讯课堂也在公司和业界种类繁多的监控系统中选择了适合目前现状的监控工具。 (1)质量看板 作为从Kibana分化出来的Grafana

日志系统新贵 Loki,真香!!

心不动则不痛 提交于 2020-07-27 03:52:50
最近,在对公司容器云的日志方案进行设计的时候,发现主流的ELK或者EFK比较重,再加上现阶段对于ES复杂的搜索功能很多都用不上最终选择了Grafana开源的Loki日志系统,下面介绍下Loki的背景。 背景和动机 当我们的容器云运行的应用或者某个节点出现问题了,解决思路应该如下: 我们的监控使用的是基于prometheus体系进行改造的,prometheus中比较重要的是metric和alert,metric是来说明当前或者历史达到了某个值,alert设置metric达到某个特定的基数触发了告警,但是这些信息明显是不够的。 我们都知道,k8s的基本单位是pod,pod把日志输出到stdout和stderr,平时有什么问题我们通常在界面或者通过命令查看相关的日志 举个例子:当我们的某个pod的内存变得很大,触发了我们的alert,这个时候管理员,去页面查询确认是哪个pod有问题,然后要确认pod内存变大的原因,我们还需要去查询pod的日志,如果没有日志系统,那么我们就需要到页面或者使用命令进行查询了: 如果,这个时候应用突然挂了,这个时候我们就无法查到相关的日志了,所以需要引入日志系统,统一收集日志,而使用ELK的话,就需要在Kibana和Grafana之间切换,影响用户体验。 所以 ,loki的第一目的就是最小化度量和日志的切换成本,有助于减少异常事件的响应时间和提高用户的体验

.Net Core服务监控报警指标上报Prometheus+Grafana

左心房为你撑大大i 提交于 2020-07-25 19:44:01
前言 简单集成Prometheus+Grafana,指标的上报收集可视化。 Prometheus Prometheus 是一个监控平台,监控从HTTP端口收集受监控目标的指标。在微服务的架构里 Prometheus 多维度的数据收集是非常强大的 我们首先下载安装 Prometheus 和 node_exporter , node_exporter 用于监控CPU、内存、磁盘、I/O等信息 Prometheus下载地址 node_exporter下载地址 下载完成后解压以管理员运行 prometheus.exe 访问 http://localhost:9090/ 出现一下页面说明启动成功啦 .Net Core获取指标 有了 Prometheus ,我们还需要给 Prometheus 提供获取监控数据的接口,我们新建一个WebApi项目,并导入 prometheus-net.AspNetCore 包,在 Configure 中加入 UseMetricServer 中间件 public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseMetricServer(); } 启动项目访问 http://localhost:5000/metrics 就可以看基本的一些监控信息啦,包括线程数,句柄数

Multi-timeseries operations in Grafana

情到浓时终转凉″ 提交于 2020-07-20 07:24:02
问题 How do I subtract two timeseries in Grafana? Or add two together, divide one by another, etc...? I have found vague hints online about taking differences between timeseries, but nothing that actually tells me how to do so. I'm using Grafana v2.0.2 with Influxdb v0.8 and have played around with the graph controls enough to discover things like the difference operator I can apply, but I have no idea how to use it. I've attempted to find documentation on this, but the closest I can find is

Multi-timeseries operations in Grafana

假如想象 提交于 2020-07-20 07:23:11
问题 How do I subtract two timeseries in Grafana? Or add two together, divide one by another, etc...? I have found vague hints online about taking differences between timeseries, but nothing that actually tells me how to do so. I'm using Grafana v2.0.2 with Influxdb v0.8 and have played around with the graph controls enough to discover things like the difference operator I can apply, but I have no idea how to use it. I've attempted to find documentation on this, but the closest I can find is

How do we change the “precision:ms” setting in the Grafana Query Inspector?

被刻印的时光 ゝ 提交于 2020-07-08 11:12:08
问题 I have an InfluxDB database with only x11 data points in it. These data are not displaying correctly (or at least as I would expect) in Grafana when the time between them is shorter than 1ms. If I insert data points 1 ms apart, then everything works as expected and I see all x11 points at the correct times, as shown below.: However, if I delete these points and upload new ones but this time one point per 100 μs, then although the data displays correctly in InfluxDB, in Grafana I see only two

How to import custom dashboards to grafana using helm

我只是一个虾纸丫 提交于 2020-06-25 10:08:20
问题 I'm trying to understand helm and I wonder if someone could ELI5 to me something or help me with something. So i did run below: helm repo add coreos https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/ Then I installed kube-prometheus by using below: helm install coreos/kube-prometheus --name kube-prometheus -f values.yaml --namespace monitoringtest Everything works fine but I'm trying to add some custom dashboards from json files and I'm struggling to understand how to do it. I was