前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >安装influxdb监控套件

安装influxdb监控套件

作者头像
超级大猪
发布2019-11-22 00:10:54
1.1K0
发布2019-11-22 00:10:54
举报
文章被收录于专栏:大猪的笔记

三件套:influxdb telegraf grafana

infuluxdb

下载安装

代码语言:javascript
复制
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.2.2.x86_64.rpm
yum localinstall influxdb-1.2.2.x86_64.rpm

修改配置:

代码语言:javascript
复制
vim /etc/influxdb/influxdb.conf
reporting-disabled = true
#bind-address = ":8086"
[admin]
  # Determines whether the admin service is enabled.
  enabled = true (web管理界面)
  bind-address = ":8083"    (web服务界面的端口)

开机启动

代码语言:javascript
复制
systemctl start influxdb
systemctl enable influxdb

进入db

代码语言:javascript
复制
influx
# 进入控制台,创建个db试试
create database test_db
show databases;

name: databases
name
----
_internal
test_db

搞定。 注意: influxdb的数据文件

代码语言:javascript
复制
/var/log/influxdb/influxd.log 日志文件
/var/lib/influxdb/data 数据文件
/var/cache/yum/influxdb 缓存处理数据
记得挂盘或者ln -s

telegraf

代码语言:javascript
复制
wget https://dl.influxdata.com/telegraf/releases/telegraf-1.3.0-1.x86_64.rpm
yum localinstall telegraf-1.3.0-1.x86_64.rpm

## 编辑,配置
vi /etc/telegraf/telegraf.conf

# 查找influx,修改influx的上报端口
[[outputs.influxdb]]
  ## The HTTP or UDP URL for your InfluxDB instance.  Each item should be
  ## of the form:
  ##   scheme "://" host [ ":" port]
  ##
  ## Multiple urls can be specified as part of the same cluster,
  ## this means that only ONE of the urls will be written to each interval.
  # urls = ["udp://localhost:8089"] # UDP endpoint example
  urls = ["http://localhost:8086"] # required
  ## The target database for metrics (telegraf will create it if not exists).
  database = "telegraf" # required

# 打开注释,监控k8s
[[inputs.kubernetes]]
#   ## URL for the kubelet
    url = "http://localhost:10255"

systemctl start telegraf
systemctl enable telegraf
systemctl status telegraf

grafana

代码语言:javascript
复制
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.4.0-1.x86_64.rpm

yum localinstall grafana-5.4.0-1.x86_64.rpm

systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server

systemctl enable grafana-server.service

编辑配置:

代码语言:javascript
复制
vim /etc/grafana/grafana.ini # 把3000端口改成你要的

打开web页,用默认账户登录,添加源

配置telegraf监控

进入 https://grafana.com/dashboards/928 按它的配置,修改telegraf的配置。 下载json文件,进入new dashboard,然后导入这个json。 简直吊爆了。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-03-22 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 三件套:influxdb telegraf grafana
    • infuluxdb
    • telegraf
    • grafana
    • 配置telegraf监控
    相关产品与服务
    Grafana 服务
    Grafana 服务(TencentCloud Managed Service for Grafana,TCMG)是腾讯云基于社区广受欢迎的开源可视化项目 Grafana ,并与 Grafana Lab 合作开发的托管服务。TCMG 为您提供安全、免运维 Grafana 的能力,内建腾讯云多种数据源插件,如 Prometheus 监控服务、容器服务、日志服务 、Graphite 和 InfluxDB 等,最终实现数据的统一可视化。
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档