注:我是在Centos7上安装的,下面是我的安装过程,对于Ubuntu 15.04+给了对应的参照。

influxdb 安装

wget https://dl.influxdata.com/influxdb/releases/influxdb-1.0.2.x86_64.rpm
yum localinstall influxdb-1.0.2.x8664.rpm
systemctl start influxd

在Ubuntu上

wget https://dl.influxdata.com/influxdb/releases/influxdb_1.0.2_amd64.deb
sudo dpkg -i influxdb_1.2.4_amd64.deb
sudo systemctl start influxdb

telegraf 安装

wget http://get.influxdb.org/telegraf/telegraf-0.11.1-1.x86_64.rpm
yum localinstall telegraf-0.11.1-1.x86_64.rpm

在Ubuntu上

wget https://dl.influxdata.com/telegraf/releases/telegraf_0.11.1-1_amd64.deb
sudo dpkg -i telegraf_0.11.1-1_amd64.deb
sudo systemctl start telegraf

创建 Influxdb数据库

[root@VM_172_102_centos tools]# influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 1.0.2
InfluxDB shell version: 1.0.2
> create database telegraf
> show databases
name: databases
---------------
name
_internal
telegraf> exit

配置Telegraf

[root@VM_172_102_centos tools]# vim /etc/telegraf/telegraf.conf
## 修改内容如下
[[outputs.influxdb]]urls = ["http://localhost:8086"]  #infulxdb地址database = "telegraf" #数据库precision = "s"timeout = "5s"username = "admin" #帐号password = "admin" #密码retention_policy = ""[root@VM_172_102_centos tools]# systemctl restart telegraf

检查Telegraf配置

## 转态是running说明配置加载成功
[root@VM_172_102_centos tools]# service telegraf status
Redirecting to /bin/systemctl status telegraf.service
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDBLoaded: loaded (/usr/lib/systemd/system/telegraf.service; enabled; vendor preset: disabled)Active: active (running) since Tue 2018-03-27 18:50:40 CST; 2s agoDocs: https://github.com/influxdata/telegrafMain PID: 3243 (telegraf)CGroup: /system.slice/telegraf.service└─3243 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.dMar 27 18:50:40 VM_172_102_centos systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Mar 27 18:50:40 VM_172_102_centos systemd[1]: Starting The plugin-driven server agent for reporting metrics into InfluxDB...
Mar 27 18:50:40 VM_172_102_centos telegraf[3243]: 2018/03/27 18:50:40 Starting Telegraf (version 0.11.1)
Mar 27 18:50:40 VM_172_102_centos telegraf[3243]: 2018/03/27 18:50:40 Loaded outputs: influxdb
Mar 27 18:50:40 VM_172_102_centos telegraf[3243]: 2018/03/27 18:50:40 Loaded inputs: processes swap system cpu disk diskio kernel mem
Mar 27 18:50:40 VM_172_102_centos telegraf[3243]: 2018/03/27 18:50:40 Tags enabled: host=VM_172_102_centos
Mar 27 18:50:40 VM_172_102_centos telegraf[3243]: 2018/03/27 18:50:40 Agent Config: Interval:10s, Debug:false, Quiet:false, Hostname:"VM_172_102_centos", Flush Interval:10s

Active: failed: 附上由retention policy not found: default引起的配置错误。这里实在的坑,下载后的默认配置是default要改成""。( retention_policy = "")

[root@VM_172_102_centos tools]# service telegraf status
Redirecting to /bin/systemctl status telegraf.service
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDBLoaded: loaded (/usr/lib/systemd/system/telegraf.service; enabled; vendor preset: disabled)Active: failed (Result: exit-code) since Tue 2018-03-27 18:47:56 CST; 5min agoDocs: https://github.com/influxdata/telegrafProcess: 2768 ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d ${TELEGRAF_OPTS} (code=exited, status=2)Main PID: 2768 (code=exited, status=2)Mar 27 18:47:40 VM_172_102_centos telegraf[2768]: 2018/03/27 18:47:40 ERROR: {"error":"retention policy not found: default"}
Mar 27 18:47:40 VM_172_102_centos telegraf[2768]: 2018/03/27 18:47:40 Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
Mar 27 18:47:50 VM_172_102_centos telegraf[2768]: 2018/03/27 18:47:50 Gathered metrics, (10s interval), from 8 inputs in 21.135525ms
Mar 27 18:47:50 VM_172_102_centos telegraf[2768]: 2018/03/27 18:47:50 ERROR: {"error":"retention policy not found: default"}
Mar 27 18:47:50 VM_172_102_centos telegraf[2768]: 2018/03/27 18:47:50 Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
Mar 27 18:47:56 VM_172_102_centos systemd[1]: Stopping The plugin-driven server agent for reporting metrics into InfluxDB...
Mar 27 18:47:56 VM_172_102_centos systemd[1]: telegraf.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 27 18:47:56 VM_172_102_centos systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Mar 27 18:47:56 VM_172_102_centos systemd[1]: Unit telegraf.service entered failed state.

查看数据

打开 Influxdb 查询界面:http://你的ip地址:8083 , 输入查询语句seclect * from cpu可查询到 CPU 相关信息。

安装Grafana

wget https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.1-1470047149.x86_64.rpm
yum install initscripts fontconfig -y
rpm -ivh grafana-3.1.1-1470047149.x86_64.rpm
systemctl start grafana-server

在Ubuntu上

wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.1-1470047149_amd64.deb
sudo apt-get install -y adduser libfontconfig
sudo dpkg -i grafana_3.1.1-1470047149_amd64.deb
systemctl start grafana-server

配置Grafana

http://你的ip地址:3000 进入配置窗口配置 (略)

资料链接

  • InfluxDB github

  • InfluxDB 官方文档

  • Grafana 官方文档

转载于:https://www.cnblogs.com/renqiqiang/p/8659772.html

grafana + influxdb + telegraf , 构建性能监控平台相关推荐

  1. 性能测试从入门到高级进阶之路(二):小白教程influxdb+grafana+jmeter性能监控平台

    先看效果:  一.背景:         公司要办第二阶段的架构师选拔,所以需要搞个性能比赛.本人是公司公司测试工程师,负责现场比赛压测,因为有公司外的评委,所以需要搭建一套influxdb+graf ...

  2. ubuntu上 grafana + influxdb + telegraf 安装配置

    apt安装 Grafana 一个纯粹的HTML/JS应用,其功能非常强大,访问InfluxDB时不会有跨域访问的限制.只要配置好数据源为InfluxDB之后就可以,剩下的工作就是配置图表. Influ ...

  3. 在微服务架构下基于 Prometheus 构建一体化监控平台的最佳实践

    欢迎关注方志朋的博客,回复"666"获面试宝典 随着 Prometheus 逐渐成为云原生时代的可观测事实标准,那么今天为大家带来在微服务架构下基于 Prometheus 构建一体 ...

  4. 美团性能分析框架和性能监控平台

    2019独角兽企业重金招聘Python工程师标准>>> 美团性能分析框架和性能监控平台 美团的性能小组在过去1年的时间,成功将项目详情页.首页.搜索和筛选页的加载时间从10秒左右降到 ...

  5. 技术实践第四期|解读移动开发者日常-性能监控平台应用

    简介:应用性能监控平台是用来帮助客户提升应用性能质量和稳定性的重要环节,本人作为一名移动端开发者有着丰富的使用和运维经验,希望通过本文分享过往的心得和使用经验,让我参与开发的U-APM这款产品中,作为 ...

  6. 为什么九大头部APP都选择U-APM 应用性能监控平台?

    01 贝乐虎 02 车来了 03 墨迹天气 04 猎豹移动 05 小伴龙 06 虎扑 07 薄荷健康 08 小天才 09 某音视频APP  U-APM核心技术与优势 为什么选择U-APM 应用性能监控 ...

  7. 360重磅开源性能监控平台ArgusAPM

    12月16日,在360移动性能开放日上,360手机卫士技术架构负责人卜云涛向我们介绍了360最新开源的性能监控平台ArgusAPM.ArgusAPM是360手机卫士客户端团队继RePlugin之后开源 ...

  8. 360 重磅开源性能监控平台 ArgusAPM

    12 月 16 日,在 360 移动性能开放日上,360 手机卫士技术架构负责人卜云涛向我们介绍了 360 最新开源的性能监控平台 ArgusAPM.ArgusAPM 是 360 手机卫士客户端团队继 ...

  9. linux 查看目录拓扑图,Linux服务篇之九:构建Cacti监控平台

    Linux服务篇之九:构建Cacti监控平台 作为一名Linux SA,日常最重要的就是保证网站正常稳定的运行,我们需要实时监控网站.服务器的运行状态,这时需要借助开源软件(cacti.nagios. ...

最新文章

  1. 深度linux创建微信图标,Deepin Linux 下基于deepin-wine的微信图标不见的问题解决
  2. 对称密码获取(OJ)
  3. 从源码角度深入分析ant
  4. 计算机d盘无法格式化,电脑D盘无法格式化怎么办 D盘无法格式化问题解决办法...
  5. GetItemValue、Itemname使用方法
  6. less学习三---父选择器
  7. C语言 BMP24位变单色,怎么将24位色BMP图片改为单色或16色?(2)
  8. viewState 与session[转]
  9. 计算机操作系统学习笔记_6_进程管理 --死锁
  10. selenium2.0(WebDriver) API - 转载自:http://www.cnblogs.com/puresoul/p/3477918.html
  11. Python利用结巴模块统计《水浒传》词频
  12. 【月径流预测】基于matlab未来搜索算法算法优化BP神经网络月径流预测【含Matlab源码 2001期】
  13. STM32F103C8T6最小系统
  14. 80psi等于多少kpa_1kpa等于多少psi
  15. 如何用python自动改试卷_利用python爬取软考试题之ip自动代理
  16. 开涛老师对Java的全部理解,很透彻。
  17. MRP计算之计划展望期、需求时界、计划时界及关系
  18. C/C++动态数组delete时卡死或报错解决
  19. pytorch小知识点(二)-------CrossEntropyLoss(reduction参数)
  20. 两个同一牌子无线路由器连接设置步骤!实用!

热门文章

  1. 170504、MongoDB和MySQL对比(译)
  2. angularjs ui-router
  3. [刷题]算法竞赛入门经典(第2版) 6-7/UVa804 - Petri Net Simulation
  4. [转载] 使用异步 I/O 大大提高应用程序的性能
  5. __mmc_claim_host
  6. Android:Eclipse如何删除ADT
  7. SharePoint 2010设计(Design)权限能操作的网站操作菜单项
  8. ASP.NET jQuery 食谱15 (通过控件CustomValidator验证CheckBoxList)
  9. Exception Handling Application Block (5)详细解
  10. 关于“我的藏书阁:.NET/数据库应用开发”的几点看法。