Kafka使用jmxtrans+influxdb+grafana监控JMX指标
最近在搞Kafka集群监控,之前也是看了网上的很多资料。之所以使用jmxtrans+influxdb+grafana是因为界面酷炫,可以定制化,缺点是不能操作Kafka集群,可能需要配合Kafka Manager一起使用。
环境信息
- CentOS Linux release 7.6.1810 (Core)
- jdk1.8.0_201
- zookeeper-3.4.14
- kafka_2.11-2.2.0
开启Kafka JMX端口
JMX(Java Management Extensions,即Java管理扩展)是一个为应用程序、设备、系统等植入管理功能的框架。JMX可以跨越一系列异构操作系统平台、系统体系结构和网络传输协议,灵活的开发无缝集成的系统、网络和服务管理应用。Kafka做为一款Java应用,已经定义了丰富的性能指标,(可以参考Kafka监控指标),通过JMX可以轻松对其进行监控。
在${KAFKA_HOME}/bin/路径下修改kafka-server-start.sh脚本,第一行增加JMX_PORT=9999
即可。
JMX_PORT=
重启Kafka
./bin/kafka-server-stop.sh
./bin/kafka-server-start.sh -daemon ./config/server.properties
重启后查看Kafka以及JMX端口状态
ps -ef | grep kafka
root : pts/ :: /opt/jdk1..0_201/bin/java -Xmx1G -Xms1G -server -XX:+UseG1GC -XX:MaxGCPauseMillis= ...... kafka.Kafka ./config/server.properties netstat -anop | grep
tcp6 ::: :::* LISTEN /java off (0.00//)
安装InfluxDB
InfluxDB是一个时间序列数据库,用于处理海量写入与负载查询。InfluxDB旨在用作涉及大量时间戳数据的任何用例(包括DevOps监控,应用程序指标,物联网传感器数据和实时分析)的后端存储。
下载InfluxDB rpm安装包
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.5.x86_64.rpm
---- ::-- https://dl.influxdata.com/influxdb/releases/influxdb-1.7.5.x86_64.rpm
Resolving dl.influxdata.com (dl.influxdata.com)... 54.192.151.21, 54.192.151.81, 54.192.151.87, ...
Connecting to dl.influxdata.com (dl.influxdata.com)|54.192.151.21|:... connected.
HTTP request sent, awaiting response... OK
Length: (44M) [application/octet-stream]
Saving to: ‘influxdb-1.7..x86_64.rpm’ %[================================================================================================================================================================================>] ,, 440KB/s in 60s -- :: ( KB/s) - ‘influxdb-1.7..x86_64.rpm’ saved [/]
安装rpm包
rpm -ivh influxdb-1.7..x86_64.rpm
Preparing... ################################# [%]
Updating / installing...
:influxdb-1.7.- ################################# [%]
Created symlink from /etc/systemd/system/influxd.service to /usr/lib/systemd/system/influxdb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/influxdb.service to /usr/lib/systemd/system/influxdb.service.
启动InfluxDB
service influxdb start
Redirecting to /bin/systemctl start influxdb.service
查看InfluxDB状态
ps -ef | grep influxdb
influxdb : ? :: /usr/bin/influxd -config /etc/influxdb/influxdb.conf
root : pts/ :: grep --color=auto influxdb service influxdb status
Redirecting to /bin/systemctl status influxdb.service
● influxdb.service - InfluxDB is an open-source, distributed, time series database
Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
Active: active (running) since Wed -- :: EDT; 22s ago
Docs: https://docs.influxdata.com/influxdb/
Main PID: (influxd)
CGroup: /system.slice/influxdb.service
└─ /usr/bin/influxd -config /etc/influxdb/influxdb.conf Apr :: node1 influxd[]: ts=--10T07::.375804Z lvl=info msg="Starting precreation service" log_id=0EiWgWRl000 service=shard-precreation check_interval=10m advance_period=30m
Apr :: node1 influxd[]: ts=--10T07::.375810Z lvl=info msg="Starting snapshot service" log_id=0EiWgWRl000 service=snapshot
Apr :: node1 influxd[]: ts=--10T07::.375816Z lvl=info msg="Starting continuous query service" log_id=0EiWgWRl000 service=continuous_querier
Apr :: node1 influxd[]: ts=--10T07::.375826Z lvl=info msg="Starting HTTP service" log_id=0EiWgWRl000 service=httpd authentication=false
Apr :: node1 influxd[]: ts=--10T07::.375830Z lvl=info msg="opened HTTP access log" log_id=0EiWgWRl000 service=httpd path=stderr
Apr :: node1 influxd[]: ts=--10T07::.375936Z lvl=info msg="Listening on HTTP" log_id=0EiWgWRl000 service=httpd addr=[::]: https=false
Apr :: node1 influxd[]: ts=--10T07::.375949Z lvl=info msg="Starting retention policy enforcement service" log_id=0EiWgWRl000 service=retention check_interval=30m
Apr :: node1 influxd[]: ts=--10T07::.376138Z lvl=info msg="Listening for signals" log_id=0EiWgWRl000
Apr :: node1 influxd[]: ts=--10T07::.376389Z lvl=info msg="Storing statistics" log_id=0EiWgWRl000 service=monitor db_instance=_internal db_rp=monitor interval=10s
Apr :: node1 influxd[]: ts=--10T07::.376534Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0EiWgWRl000
使用InfluxDB客户端
influx
Connected to http://localhost:8086 version 1.7.5
InfluxDB shell version: 1.7.
Enter an InfluxQL query
>
创建用户和数据库
> CREATE USER "admin" WITH PASSWORD 'admin' WITH ALL PRIVILEGES
> create database "jmxDB"
创建完成InfluxDB的用户和数据库暂时就够用了,其它简单操作如下,后面会用到
#创建数据库
create database "db_name"
#显示所有的数据库
show databases
#删除数据库
drop database "db_name"
#使用数据库
use db_name
#显示该数据库中所有的表
show measurements
#创建表,直接在插入数据的时候指定表名
insert test,host=127.0.0.1,monitor_name=test count=1
#删除表
drop measurement "measurement_name"
#退出
quit
安装jmxtrans
jmxtrans的作用是自动去jvm中获取所有jmx格式数据,并按照某种格式(json文件配置格式)输出到其他应用程序(本例中的influxDB)。
下载jmxtrans rpm安装包
wget http://central.maven.org/maven2/org/jmxtrans/jmxtrans/270/jmxtrans-270.rpm
---- ::-- http://central.maven.org/maven2/org/jmxtrans/jmxtrans/270/jmxtrans-270.rpm
Resolving central.maven.org (central.maven.org)... 151.101.40.209
Connecting to central.maven.org (central.maven.org)|151.101.40.209|:... connected.
HTTP request sent, awaiting response... OK
Length: (18M) [application/x-rpm]
Saving to: ‘jmxtrans-.rpm’ %[================================================================================================================================================================================>] ,, 342KB/s in 43s -- :: ( KB/s) - ‘jmxtrans-.rpm’ saved [/]
安装rpm包
rpm -ivh jmxtrans-270.rpm
Preparing... ################################# [100%]
Updating / installing...
1:jmxtrans-270-1 ################################# [100%]
jmxtrans相关路径
jmxtrans安装目录:/usr/share/jmxtrans
json文件默认目录:/var/lib/jmxtrans/
日志路径:/var/log/jmxtrans/jmxtrans.log
配置json,jmxtrans的github上有一段示例配置
{
"servers" : [ {
"port" : "1099",
"host" : "w2",
"queries" : [ {
"obj" : "java.lang:type=Memory",
"attr" : [ "HeapMemoryUsage", "NonHeapMemoryUsage" ],
"resultAlias":"jvmMemory",
"outputWriters" : [ {
"@class" : "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url" : "http://127.0.0.1:8086/",
"username" : "admin",
"password" : "admin",
"database" : "jmxDB",
"tags" : {"application" : "kafka"}
} ]
} ]
} ]
}
- host:监控服务器
- port:jmx端口
- obj:对应jmx的ObjectName,就是我们要监控的指标
- attr:对应ObjectName的属性,可以理解为我们要监控的指标的值
- resultAlias:对应metric 的名称,在InfluxDB里面就是MEASUREMENTS名
- tags:对应InfluxDB的tag功能,对与存储在同一个MEASUREMENTS里面的不同监控指标可以做区分,我们在用Grafana绘图的时候会用到,建议对每个监控指标都打上tags
启动jmxtrans
service jmxtrans start
Starting JmxTrans...
查看日志没有报错即为成功
tail /var/log/jmxtrans/jmxtrans.log
INFO | jvm | // :: | Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with threads.
INFO | jvm | // :: | Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
INFO | jvm | // :: |
INFO | jvm | // :: | -- :: [WrapperSimpleAppMain] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler 'ServerScheduler' initialized from an externally opened InputStream.
INFO | jvm | // :: | -- :: [WrapperSimpleAppMain] INFO org.quartz.impl.StdSchedulerFactory - Quartz scheduler version: 1.8.
INFO | jvm | // :: | -- :: [WrapperSimpleAppMain] INFO org.quartz.core.QuartzScheduler - JobFactory set to: com.googlecode.jmxtrans.guice.GuiceJobFactory@
-- :: [WrapperSimpleAppMain] level com.googlecode.jmxtrans.JmxTransformer [JmxTransformer.java:] - Starting Jmxtrans on : /var/lib/jmxtrans
-- :: [WrapperSimpleAppMain] level org.quartz.core.QuartzScheduler [QuartzScheduler.java:] - Scheduler ServerScheduler_$_node11554885871753 started.
INFO | jvm | // :: | -- :: [WrapperSimpleAppMain] INFO c.googlecode.jmxtrans.JmxTransformer - Starting Jmxtrans on : /var/lib/jmxtrans
INFO | jvm | // :: | -- :: [WrapperSimpleAppMain] INFO org.quartz.core.QuartzScheduler - Scheduler ServerScheduler_$_node11554885871753 started.
附上两段通用的json文件
base_127.0.0.1.json
{
"servers": [{
"port": "",
"host": "127.0.0.1",
"queries": [{
"obj": "kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec",
"attr": ["Count", "OneMinuteRate"],
"resultAlias": "BytesInPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "BytesInPerSec"
}
}]
}, {
"obj": "kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec",
"attr": ["Count", "OneMinuteRate"],
"resultAlias": "BytesOutPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "BytesOutPerSec"
}
}]
}, {
"obj": "kafka.server:type=BrokerTopicMetrics,name=BytesRejectedPerSec",
"attr": ["Count", "OneMinuteRate"],
"resultAlias": "BytesRejectedPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "BytesRejectedPerSec"
}
}]
}, {
"obj": "kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec",
"attr": ["Count", "OneMinuteRate"],
"resultAlias": "MessagesInPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "MessagesInPerSec"
}
}]
}, {
"obj": "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=FetchConsumer",
"attr": ["Count"],
"resultAlias": "RequestsPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"request": "FetchConsumer"
}
}]
}, {
"obj": "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=FetchFollower",
"attr": ["Count"],
"resultAlias": "RequestsPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"request": "FetchFollower"
}
}]
}, {
"obj": "kafka.network:type=RequestMetrics,name=RequestsPerSec,request=Produce",
"attr": ["Count"],
"resultAlias": "RequestsPerSec",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"request": "Produce"
}
}]
}, {
"obj": "java.lang:type=Memory",
"attr": ["HeapMemoryUsage", "NonHeapMemoryUsage"],
"resultAlias": "MemoryUsage",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "MemoryUsage"
}
}]
}, {
"obj": "java.lang:type=GarbageCollector,name=*",
"attr": ["CollectionCount", "CollectionTime"],
"resultAlias": "GC",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "GC"
}
}]
}, {
"obj": "java.lang:type=Threading",
"attr": ["PeakThreadCount", "ThreadCount"],
"resultAlias": "Thread",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "Thread"
}
}]
}, {
"obj": "kafka.server:type=ReplicaFetcherManager,name=MaxLag,clientId=Replica",
"attr": ["Value"],
"resultAlias": "ReplicaFetcherManager",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "MaxLag"
}
}]
}, {
"obj": "kafka.server:type=ReplicaManager,name=PartitionCount",
"attr": ["Value"],
"resultAlias": "ReplicaManager",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "PartitionCount"
}
}]
}, {
"obj": "kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions",
"attr": ["Value"],
"resultAlias": "ReplicaManager",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "UnderReplicatedPartitions"
}
}]
}, {
"obj": "kafka.server:type=ReplicaManager,name=LeaderCount",
"attr": ["Value"],
"resultAlias": "ReplicaManager",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "LeaderCount"
}
}]
}, {
"obj": "kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer",
"attr": ["Count", "Max"],
"resultAlias": "TotalTimeMs",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "FetchConsumer"
}
}]
}, {
"obj": "kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchFollower",
"attr": ["Count", "Max"],
"resultAlias": "TotalTimeMs",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "FetchFollower"
}
}]
}, {
"obj": "kafka.network:type=RequestMetrics,name=TotalTimeMs,request=Produce",
"attr": ["Count", "Max"],
"resultAlias": "TotalTimeMs",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "Produce"
}
}]
}, {
"obj": "kafka.server:type=ReplicaManager,name=IsrShrinksPerSec",
"attr": ["Count"],
"resultAlias": "ReplicaManager",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "IsrShrinksPerSec"
}
}]
}]
}]
}
topicA_1.json
{
"servers": [{
"port": "9999",
"host": "127.0.0.1",
"queries": [{
"obj": "kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec,topic=topicA",
"attr": ["Count"],
"resultAlias": "topicA",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "BytesInPerSec"
}
}]
}, {
"obj": "kafka.server:type=BrokerTopicMetrics,name=BytesOutPerSec,topic=topicA",
"attr": ["Count"],
"resultAlias": "topicA",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "BytesOutPerSec"
}
}]
}, {
"obj": "kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec,topic=topicA",
"attr": ["Count"],
"resultAlias": "topicA",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "MessagesInPerSec"
}
}]
}, {
"obj": "kafka.log:type=Log,name=LogEndOffset,topic=topicA,partition=*",
"attr": ["Value"],
"resultAlias": "topicA",
"outputWriters": [{
"@class": "com.googlecode.jmxtrans.model.output.InfluxDbWriterFactory",
"url": "http://127.0.0.1:8086/",
"username": "admin",
"password": "admin",
"database": "jmxDB",
"tags": {
"application": "LogEndOffset"
}
}]
}]
}]
}
安装Grafana
Grafana是一个跨平台的开源的度量分析和可视化工具,可以通过将采集的数据查询然后可视化的展示,并及时通知。
下载jmxtrans rpm安装包
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-6.0.2-1.x86_64.rpm
---- ::-- https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-6.0.2-1.x86_64.rpm
Resolving s3-us-west-.amazonaws.com (s3-us-west-.amazonaws.com)... 52.218.144.92
Connecting to s3-us-west-.amazonaws.com (s3-us-west-.amazonaws.com)|52.218.144.92|:... connected.
HTTP request sent, awaiting response... OK
Length: (53M) [application/x-redhat-package-manager]
Saving to: ‘grafana-6.0.-.x86_64.rpm’ %[================================================================================================================================================================================>] ,, 177KB/s in 2m 52s -- :: ( KB/s) - ‘grafana-6.0.-.x86_64.rpm’ saved [/]
安装rpm包
rpm -ivh grafana-6.0.-.x86_64.rpm
warning: grafana-6.0.-.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 24098cb6: NOKEY
error: Failed dependencies:
fontconfig is needed by grafana-6.0.-.x86_64
urw-fonts is needed by grafana-6.0.-.x86_64
缺少依赖,下载依赖
yum install --downloadonly --downloaddir=./ fontconfig yum localinstall fontconfig-2.13.-4.3.el7.x86_64.rpm yum install --downloadonly --downloaddir=./ urw-fonts yum localinstall urw-fonts-2.4-.el7.noarch.rpm rpm -ivh grafana-6.0.-.x86_64.rpm
warning: grafana-6.0.-.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 24098cb6: NOKEY
Preparing... ################################# [%]
Updating / installing...
:grafana-6.0.- ################################# [%]
### NOT starting on installation, please execute the following statements to configure grafana to start automatically using systemd
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable grafana-server.service
### You can start grafana-server by executing
sudo /bin/systemctl start grafana-server.service
POSTTRANS: Running script
启动Grafana
service grafana-server start
Starting grafana-server (via systemctl): [ OK ]
打开浏览器
http://127.0.0.1:3000
先输入默认用户名密码admin/admin
设置新密码
点击Add data source
选择InfluxDB
输入连接信息后点击Save & Test
通过后点击Back返回
左侧 + 可以创建或引入仪表盘
类似于数据库SQL语句,查询相应的指标
计算平均每秒数值可以使用如上语法,用当前值减1分钟之前的值再除以60
具体展示效果就看各位的审美能力,这里就不贴出来了。至此,Kafka的JMX指标监控就完成了。
Kafka使用jmxtrans+influxdb+grafana监控JMX指标的更多相关文章
- 基于jmxtrans+influxdb+grafana实现对canal监控
最近在调研canal数据同步系统的监控方案,网上关于jmxtrans+influxdb+grafana监控kafka的文档很多,没有监控canal的.通过几天的摸索,大致明白了来龙去脉.监控流程基本是 ...
- 使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况
使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况 前言 本文在Debian9下采用Docker的方式安装Telegraf + Influxdb + ...
- 使用Collectd + InfluxDB + Grafana进行JMX监控
我们已经看到使用Collectd监控CPU /内存利用率(本文).但它没有提供所有信息来确定性能问题的瓶颈.在本文中,我们将使用Collectd Java插件来使用其JMX技术来监视和管理Java虚拟 ...
- jmxtrans + influxdb + granafa 监控套件使用手册
需求说明 随着大数据组件的日益完善,需要随时随地保持各个组件的日常运行,对各个组件的监控势在必行.为了减少运维部门的负担,通过筛选,我们使用 jmxtrans + influxdb + granafa ...
- JMXtrans + InfluxDB + Grafana实现Zookeeper性能指标监控
一.总体效果图 这里是将集群全部放在一起,可以根据自己的审美看怎么放 二.监控指标 其中有些指标与第一篇Zookeeper通过四字命令基础监控(Zabbix)的四字命令的指标是有重复的,二者选一个则可 ...
- 使用cAdvisor+Influxdb+Grafana监控系统
今天准备开始研究研究当前非常流行的Grafana+Influxdb监控系统,两者都是非常轻量级的应用但是功能却异常强大,可以说Grafana在作图显示方面真的毫不逊色与Cacti. 组件介绍 cA ...
- cAdvisor+InfluxDB+Grafana 监控Docker
容器的监控方案其实有很多,有docker自身的docker stats命令.有Scout.有Data Dog等等,本文主要和大家分享一下比较经典的容器开源监控方案组合:cAdvisor+InfluxD ...
- 搭建 Telegraf + InfluxDB + Grafana 监控遇到几个小问题
1:如果同一台服务器上安装有多个MongoDB实例,telegraf.conf 中关于 MongoDB 如何配置?配置数据在[INPUT PLUGINS的[[inputs.mongodb]]]部分. ...
- Collectd+InfluxDB+Grafana监控系统搭建
环境配置 节点 配置 类型 操作系统 Sched 2G 2CPU 50GB ens3=>192.168.200.11 KVM虚拟机 CentOS 7 Nova 4G 2CPU 50GB ens3 ...
随机推荐
- onInterceptTouchEvent与onTouchEvent默认返回值
其中Layout里的onInterceptTouchEvent默认返回值是false,这样touch事件会传递到View控件,Layout里的onTouch默认返回值是false, View里的onT ...
- java 中解析json步骤
一. JSON (JavaScript Object Notation)一种简单的数据格式,比xml更轻巧. Json建构于两种结构: 1.“名称/值”对的集合(A collection ...
- 灰度图的直方图均衡化(Histogram Equalization)原理与 Python 实现
原理 直方图均衡化是一种通过使用图像直方图,调整对比度的图像处理方法:通过对图像的强度(intensity)进行某种非线性变换,使得变换后的图像直方图为近似均匀分布,从而,达到提高图像对比度和增强图片 ...
- [控件] AngleGradientView
AngleGradientView 效果 说明 1. 用源码产生带环形渐变色的view 2. 可以配合maskView一起使用 (上图中的右下角图片的效果) 源码 https://github.com ...
- Linux 新建用户和组命令
用户的角色是通过UID和GID识别的. UID用户ID:相当于各为的身份证,在系统中是唯一的 GID组ID:相当于各为的家庭或者你们的学校. 1.新建用户及设置密码命令如下: useradd [参数] ...
- 铁乐学python_Day39_多进程和multiprocess模块2
铁乐学python_Day39_多进程和multiprocess模块2 锁 -- multiprocess.Lock (进程同步) 之前我们千方百计实现了程序的异步,让多个任务可以同时在几个进程中并发 ...
- 铁乐学python_Day38_多进程和multiprocess模块1
铁乐学python_Day38_多进程和multiprocess模块1 [进程] 运行中的程序就是一个进程. 所有的进程都是通过它的父进程来创建的. 因此,运行起来的python程序也是一个进程,那么 ...
- Ardunio led呼吸灯
#include <Adafruit_NeoPixel.h> #define PIN 9#define LED_NUM 16Adafruit_NeoPixel strip = Adafru ...
- 实践和感悟 - scala向下转型和减少穷举
工作中的问题总结: 问题一:scala 之向下转型 引言:假如在复杂的业务逻辑中,变量的类型不能确认,只能给个接口类型,这样数据类型推导不会错误,但是后面要使用实现类的类型时,你却发现转不过来了? 对 ...
- list(range())--------range创建一个list列表 遍历索引range(len()) 和 list(range())创建列表
lst = list(range(15,26)) #注,list(range())用的是小括号哦print(lst)