前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Centos7 下部署使用 nmon2influxdb

Centos7 下部署使用 nmon2influxdb

作者头像
Devops海洋的渔夫
发布2019-05-31 16:24:37
1K0
发布2019-05-31 16:24:37
举报
文章被收录于专栏:Devops专栏Devops专栏

This application take a nmon file and upload it in a InfluxDB database. It generates also a dashboard to allow data visualization in Grafana. It's working on linux only for now.

相关地址

Github地址:https://github.com/adejoux/nmon2influxdb 入门文档地址:http://nmon2influxdb.org/

rpm方式安装相关组件

InfluxDB 1.7.6 installation:

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

Grafana 5.4.2 installation:

代码语言:javascript
复制
wget https://dl.grafana.com/oss/release/grafana-5.4.2-1.x86_64.rpm
sudo yum localinstall grafana-5.4.2-1.x86_64.rpm -y

nmon2influxdb installation:

代码语言:javascript
复制
wget https://github.com/adejoux/nmon2influxdb/releases/download/v2.1.6/nmon2influxdb_2.1.6_linux_64-bit.tar.gz
tar -zxvf nmon2influxdb_2.1.6_linux_64-bit.tar.gz
./nmon2influxdb -h

使用示例

启动 influxdb 服务:

代码语言:javascript
复制
# start influxdb
service influxdb start
service influxdb status

进入influxdb的CLI界面:

代码语言:javascript
复制
[root@centos7 ~]# influx
Connected to http://localhost:8086 version 1.7.6
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
> 

InfluxDB administration interface will be available at : http://localhost:8086

启动 Grafana 服务:

代码语言:javascript
复制
# start grafana
service grafana-server start
service grafana-server status

Grafana will be available at url : http://localhost:3000

默认的用户名和密码 admin/admin

导入nmon的文件数据至influxdb

Loading a nmon file: nmon2influxdb import server.nmon

代码语言:javascript
复制
[root@centos7 install_nmon2influxdb]# ./nmon2influxdb import linux_150818_1024.nmon
2019/05/20 14:48:57 Using configuration file /root/.nmon2influxdb.cfg
2019/05/20 14:48:57 Creating InfluxDB database nmon_reports
2019/05/20 14:48:57 NMON file separator: ,
#
File linux_150818_1024.nmon imported : 8695 points !

在influxdb查询已导入的nmon数据

代码语言:javascript
复制
[root@centos7 ~]# influx
Connected to http://localhost:8086 version 1.7.6
InfluxDB shell version: 1.7.6
Enter an InfluxQL query
# 查看有哪些数据库
> show databases
name: databases
name
----
_internal
nmon_reports
nmon2influxdb_log
# 使用nmon_reports数据库 以及 查询表
> use nmon_reports
Using database nmon_reports

> show measurements
name: measurements
name
----
CPU_ALL
DGBUSY
DGREAD
DGSIZE
DGWRITE
DGXFER
DISKBSIZE
DISKBUSY
DISKREAD
DISKWRITE
DISKXFER
JFSFILE
MEM
NET
PROC
VM

> select * from CPU_ALL
name: CPU_ALL
time                host  name   value
----                ----  ----   -----
1439886266000000000 linux CPUs   4
1439886266000000000 linux Idle%  79.6
1439886266000000000 linux Steal% 0
1439886266000000000 linux Sys%   5.5
1439886266000000000 linux User%  14.5
1439886266000000000 linux Wait%  0.4
1439886296000000000 linux CPUs   4
1439886296000000000 linux Idle%  69.6
1439886296000000000 linux Steal% 0
1439886296000000000 linux Sys%   4
1439886296000000000 linux User%  19.2

在Grafanafa创建面板

Creating a dashboard: nmon2influxdb dashboard server.nmon

代码语言:javascript
复制
[root@centos7 install_nmon2influxdb]# ./nmon2influxdb dashboard linux_150818_1024.nmon
2019/05/20 14:56:43 Using configuration file /root/.nmon2influxdb.cfg
2019/05/20 14:56:43 Grafana nmon2influxdb DataSource created.
2019/05/20 14:56:43 Dashboard uploaded to grafana
[root@centos7 install_nmon2influxdb]# 

创建会直接在Grafana做好面板,跳过了前面修改密码等步骤,访问如下:

配置好数据源之后,查看已经配置好的图表:

简单的示例nmon报告下载

Sample nmon reports are available here.

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

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

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

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

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 相关地址
  • rpm方式安装相关组件
  • 使用示例
    • 启动 influxdb 服务:
      • 启动 Grafana 服务:
        • 导入nmon的文件数据至influxdb
          • 在influxdb查询已导入的nmon数据
          • 在Grafanafa创建面板
          • 简单的示例nmon报告下载
          相关产品与服务
          Grafana 服务
          Grafana 服务(TencentCloud Managed Service for Grafana,TCMG)是腾讯云基于社区广受欢迎的开源可视化项目 Grafana ,并与 Grafana Lab 合作开发的托管服务。TCMG 为您提供安全、免运维 Grafana 的能力,内建腾讯云多种数据源插件,如 Prometheus 监控服务、容器服务、日志服务 、Graphite 和 InfluxDB 等,最终实现数据的统一可视化。
          领券
          问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档