当前位置:网站首页>Prometheus and grafana
Prometheus and grafana
2022-07-29 07:29:00 【jjt_!!】
A set of monitoring processes ,Prometheus Used to store monitoring data ,Grafana Display various data in the form of charts in the form of icons .
| plug-in unit | Default port | dashboard ID | remarks |
|---|---|---|---|
| Node Exporter | 9100 | 11074 | Monitoring server data |
| process exporter | 9256 | 249 | Data monitoring in the process dimension |
| redis_exporter | 9121 | monitor redis | |
| mysqld_exporter | 9104 | 7362 | monitor mysql |
Basic way to view data : curl localhost:port/metricsprometheus Original page of :http:ip:9090, Input the index quantity and other information to query the original data . In general use grafana Display the index quantity 
prometheus Configuration file for prometheus.yml, The basic format is shown in Figure .job_name Corresponding to one job, Multiple... Can be configured below targets,target Information about the machine where the corresponding plug-in is deployed ;
Use grafana Under the circumstances : install dashboard The way , Enter id that will do .id No. can be found on the official website 【https://grafana.com/grafana/dashboards】 Search for :
Node Exporter
Deploy on node machines , start-up : ./node_exporter
stay
Monitoring links : https://www.ipcpu.com/2021/04/prometheus-node_exporter/
stay prometheus Configuration on
- job_name: '44_141_pro'
static_configs:
- targets: ['10.130.44.141:9100']
process exporte
Official website address
https://github.com/ncabatoff/process-exporter/
Deploy
Monitor in the process dimension , Deploy on the nodes allowed by the process
Starting mode : ./process-exporter -config.path config.yml
Configuration mode :
process_names:
- name: "{
{.Comm}}"
cmdline:
- 'go-call-distrib'
name: Adapt to various matching rules
- { {.Comm}} Contains the basic name of the original executable , The second field in /proc//stat
- { {.ExeBase}} Contains the basic name of the executable { {.ExeFull}} The fully qualified path that contains the executable file
- { {.Username}} Contains the user name of a valid user { {.Matches}}map Contains applications cmdline regexps All matches generated
- { {.PID}} Contains the PID. Please note that , Use PID This means that the group will contain only one process .
- { {.StartTime}} Contains the start time of the process . This can be done with PID Use a combination of , because PID It will be reused over time .
- { {.Cgroups}} contain ( If the support ) Process cgroup (
/proc/self/cgroup). This is particularly useful for identifying which container the process belongs to .
process_names Must contain one or more selectors (comm,exe
or cmdline); If there are multiple selectors , They must all match . Each selector is a list of strings , For matching processes comm, argv[0], Or in
Under the circumstances cmdline, Is a regular expression applied to the command line .
stay prometheus Configuration on
- job_name: '44_141_pro'
static_configs:
- targets: ['10.130.44.141:9256']
redis_exporte
stay redis Deployed machine deployment
Start command (redis The connection of ip And password )./redis_exporter -redis.addr 10.130.44.103:6380 -redis.password 123456
stay prometheus Configuration on
- job_name: 'redis_exporter_targets'
static_configs:
- targets:
- redis://10.130.44.103:6380
- redis://10.130.44.103:6381
- redis://10.130.44.103:6382
- redis://10.130.44.141:6383
- redis://10.130.44.141:6384
- redis://10.130.44.141:6385
metrics_path: /scrape
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 10.130.44.103:9121
## config for scraping the exporter itself
- job_name: 'redis_exporter'
static_configs:
- targets:
- 10.130.44.103:9121
mysqld_exporter
stay mysql Machine deployment
Start command : ./mysqld_exporter --config.my-cnf=.mysqld_exporter.cnf
Where monitoring is required mysql Create users on the database :
grant select,replication client, process on *.* to 'mysql_monitor'@'localhost' identified by '123456';
flush privileges;
The configuration file ( Hide file formats ):
[client]
user=mysql_monitor
password=123456

stay prometheus Configuration on
- job_name: '44_103_mysql'
static_configs:
- targets: ['10.130.44.103:9104']
边栏推荐
- 1-后台项目搭建
- 小D的刺绣
- Clock tree synthesis (I)
- [100 cases of unity practice] the single choice multiple choice judgment questions of unity universal question answering system are all common
- Calculate program run time demo
- 暑期总结(二)
- Female graduate students do "mind mapping" and quarrel with their boyfriend! Netizen: the "king of infighting" in the quarrel
- Gin routing, parameters, output
- 3-global exception handling
- leetcode力扣经典问题——4.寻找两个正序数组的中位数
猜你喜欢

女研究生做“思维导图”与男友吵架!网友:吵架届的“内卷之王”....
![Explanation of suffix automata (SAM) + Luogu p3804 [template] suffix automata (SAM)](/img/8b/f68503e09f218c26e34453b1b7fcd5.png)
Explanation of suffix automata (SAM) + Luogu p3804 [template] suffix automata (SAM)

Thinkphp6 realizes database backup

JS chicken laying eggs and egg laying chickens. Who appeared earlier, object or function? Is function an instance of function?

新生代公链再攻「不可能三角」

Prometheus与Grafana

1 - background project construction

QT专题:基础部件(按钮类,布局类,输出类,输入类,容器类)
![【暑期每日一题】洛谷 P7760 [COCI2016-2017#5] Tuna](/img/9a/f857538c574fb54bc1accb737d7aec.png)
【暑期每日一题】洛谷 P7760 [COCI2016-2017#5] Tuna
Scala 高阶(十):Scala中的异常处理
随机推荐
logback appender简介说明
在线问题反馈模块实战(十七):实现excel模板在线下载功能
BeanUtils.setProperty()
0 9 布隆过滤器(Bloom Filter)
受欢迎的牛 G
Gin template
新生代公链再攻「不可能三角」
MySQL 使用客户端以及SELECT 方式查看 BLOB 类型字段内容总结
Explanation of suffix automata (SAM) + Luogu p3804 [template] suffix automata (SAM)
[MySQL] - [subquery]
计算程序运行时间 demo
关于大龄读博的几点回答?
I, 28, a tester, was ruthlessly dismissed in October: I want to remind people who are still learning to test
Nodejs installation tutorial
Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
Spingboot integrates the quartz framework to realize dynamic scheduled tasks (support real-time addition, deletion, modification and query tasks)
小D的刺绣
【Unity实战100例】Unity万能答题系统之单选多选判断题全部通用
OA项目之会议通知(查询&是否参会&反馈详情)
请问flink支持sqlServer数据库么?获取sqlServer数据库的变化