当前位置:网站首页>《Kubernetes监控篇:Grafana通过自动化方式添加datasource和dashboard》
《Kubernetes监控篇:Grafana通过自动化方式添加datasource和dashboard》
2022-06-22 12:42:00 【东城绝神】
一、背景信息
由于业务性质原因,我们需要将业务系统部署在多个客户本地机房,由于客户没有一个统一的监控系统,所以我们需要在客户机房部署监控系统,主要监控主机、接口、端口等方面。
针对业务系统部署及维护场景,我们开发了运维工具,主要包括前期部署、后期维护两大核心要点,监控作为部署环节比较重要的一项指标,所以我们需要将这些监控模块融合到运维工具中,这里的监控系统组件包括:node-exporter+blackbox-exporter+alertmanager+prometheus+grafana。
grafana作为监控组件中比较重要的一个模块,要想实现自动化部署其实是很简单,除了部署完之后还有很多其它操作,比如添加数据源、导入监控模板,这些需要人工手动来操作。如果这些无法实现自动化的话,那么你这个运维工具就很难称得上是自动化工具。
这里就着重介绍一下如何通过自动化的方式来添加datasource和dashboard?
二、操作步骤
方法一:通过http api接口
1、创建API令牌
curl -X POST -H "Content-Type: application/json" -d '{"name":"apikeycurl", "role": "Admin"}' http://lolaage:[email protected]:3000/api/auth/keys
如下图所示:
说明:将此处返回的密钥保存在您的密码管理器中,因为将来无法再次获取它。
总结:整理不易,如果对你有帮助,可否点赞关注一下?
更多详细内容请参考:Ansible自动化运维实战
边栏推荐
- leetcode LCP 10. Binary tree task scheduling
- [Nacos cloud native] the first step of reading the source code is to start Nacos locally
- Interpretation of the thesis -- factorization meets the neighborhood: a multifaceted collaborative filtering model
- Redis+Caffeine两级缓存的实现
- Microservice test efficiency governance
- Triggers in MySQL
- MySQL中的视图
- 190. Reverse Bits
- PHP deserialization & Magic method
- 342. Power of Four
猜你喜欢

测试组的任务职责和测试的基本概念

Stop using system Currenttimemillis() takes too long to count. It's too low. Stopwatch is easy to use!

openGauss数据库源码解析系列文章—— 密态等值查询技术详解

769. Max Chunks To Make Sorted

数据库 就业咨询系统求各位帮下忙
![[Nacos cloud native] the first step of reading the source code is to start Nacos locally](/img/f8/d9b848593cf7380a6c99ee0a8158f8.png)
[Nacos cloud native] the first step of reading the source code is to start Nacos locally

leetcode-子序列/子串问题

My suggestions on SAP ABAP transformation

Leetcode math problems

leetcode-并查集
随机推荐
Locks in MySQL
934. Shortest Bridge
Triggers in MySQL
"Dare not doubt the code, but have to doubt the code" a network request timeout analysis
MySQL中触发器
Interpretation of the paper -- scalable collaborative filtering with jointly derived neighborhood interpolation weights
Nine good programming habits for 10 years
Customer member value analysis
SSM based community garbage classification and transportation management system, high-quality graduation thesis example (can be used directly), source code, database script, project introduction and o
Leetcode daily question 202110
SQL functions -- converting a one to many relationship to a one to one relationship
leetcode-子序列/子串问题
Opengauss database source code analysis series articles -- detailed explanation of dense equivalent query technology
STM32F1与STM32CubeIDE编程实例-光断续传感器驱动
448. Find All Numbers Disappeared in an Array
leetcode 834. Sum of distances in the tree
Redis+Caffeine两级缓存的实现
Acwing game 55
Implementation of connecting SQL server to Oracle server_ Including query implementation
别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!