最近在搞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指标的更多相关文章

  1. 基于jmxtrans+influxdb+grafana实现对canal监控

    最近在调研canal数据同步系统的监控方案,网上关于jmxtrans+influxdb+grafana监控kafka的文档很多,没有监控canal的.通过几天的摸索,大致明白了来龙去脉.监控流程基本是 ...

  2. 使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况

    使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况 前言 本文在Debian9下采用Docker的方式安装Telegraf + Influxdb + ...

  3. 使用Collectd + InfluxDB + Grafana进行JMX监控

    我们已经看到使用Collectd监控CPU /内存利用率(本文).但它没有提供所有信息来确定性能问题的瓶颈.在本文中,我们将使用Collectd Java插件来使用其JMX技术来监视和管理Java虚拟 ...

  4. jmxtrans + influxdb + granafa 监控套件使用手册

    需求说明 随着大数据组件的日益完善,需要随时随地保持各个组件的日常运行,对各个组件的监控势在必行.为了减少运维部门的负担,通过筛选,我们使用 jmxtrans + influxdb + granafa ...

  5. JMXtrans + InfluxDB + Grafana实现Zookeeper性能指标监控

    一.总体效果图 这里是将集群全部放在一起,可以根据自己的审美看怎么放 二.监控指标 其中有些指标与第一篇Zookeeper通过四字命令基础监控(Zabbix)的四字命令的指标是有重复的,二者选一个则可 ...

  6. 使用cAdvisor+Influxdb+Grafana监控系统

      今天准备开始研究研究当前非常流行的Grafana+Influxdb监控系统,两者都是非常轻量级的应用但是功能却异常强大,可以说Grafana在作图显示方面真的毫不逊色与Cacti. 组件介绍 cA ...

  7. cAdvisor+InfluxDB+Grafana 监控Docker

    容器的监控方案其实有很多,有docker自身的docker stats命令.有Scout.有Data Dog等等,本文主要和大家分享一下比较经典的容器开源监控方案组合:cAdvisor+InfluxD ...

  8. 搭建 Telegraf + InfluxDB + Grafana 监控遇到几个小问题

    1:如果同一台服务器上安装有多个MongoDB实例,telegraf.conf 中关于 MongoDB 如何配置?配置数据在[INPUT PLUGINS的[[inputs.mongodb]]]部分. ...

  9. Collectd+InfluxDB+Grafana监控系统搭建

    环境配置 节点 配置 类型 操作系统 Sched 2G 2CPU 50GB ens3=>192.168.200.11 KVM虚拟机 CentOS 7 Nova 4G 2CPU 50GB ens3 ...

随机推荐

  1. 润乾填报页面导入excel后增加js动作

     当页面从excel中导入数据之后,自动加入js的检查功能,下面是如何在导入excel后直接引入js的功能实例: var _orgImportExcel = report1_importExcel ...

  2. Android使用ToolBar+DrawerLayout+NavigationView实现侧滑抽屉效果

    学会使用DrawerLayout 学会使用NavigationView 学会使用ToolBar+DrawerLayout+NavigationView实现侧滑抽屉效果 学会实现Toolbar在顶部以及 ...

  3. Django html标签make_safe

    from django.utils.safestring import mark_safe a = mark_safe("<a href='#'>test</a>&q ...

  4. Django settings介绍

    """ Django settings for macboy project. Generated by 'django-admin startproject' usin ...

  5. Windows 安装 python MySQLdb模块

    pip install wheel 去这个网站查找whl格式的MYSQL-python http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python ...

  6. 整理JavaScript循环数组和对象的方法

    众所周知,常用的循环语句有for.while.do-while.for-in,forEach以及jQuery中提供的循环的方法:以及ES6中提供的很多用来循环对象的方法如map, 在 Javascri ...

  7. python中的字符串编码问题——4.unicode编解码(以实际工作中遇到的韩文编码为例)

    韩文unicode编解码  问题是这样,工作中遇到有韩文数据出现乱码,说是unicode码. 类似这样: id name 323 52186863 149 63637538 314 65516863 ...

  8. springMVC结合AjaxForm上传文件

    最近在项目中需要上传文件文件,之前一直都是form提交的,尝试了一下AjaxForm,感觉还比较好用,写篇随笔mark下,供以后使用. 准备工作: 下载jquery-form.js 相关jar: co ...

  9. 搜索关键字自动更正 - Oracle Endeca Server

    做了几个Oracle Endeca 电商项目.每个项目都会有搜过关键字拼写错误更正(Spelling Correction)的需求.淘宝也有类似功能. Oracle Endeca Sever提供了关键 ...

  10. twemproxy源码分析

    twemproxy是twitter开源的redis/memcached 代理,数据分片提供取模,一致性哈希等手段,维护和后端server的长连接,自动踢除server,恢复server,提供专门的状态 ...