首页 > 编程学习 > Grafana 基于telegraf,influx监控vCenter

Grafana 基于telegraf,influx监控vCenter

发布时间:2022/11/18 3:53:39

前提条件

  • 安装Grafana 

安装telegraf,influx

一键部署telegraf,influx自动化脚本

  • 更改16-21influxdb内容信息
  • 更改27-29vCenter内容信息
  • 更改137-138创建influxdb库和连接权限内容信息
vim /root/elegraf-influx-install.sh
#!/bin/sh
# -*- coding: utf-8 -*-
# Author: CIASM
# Date: 2022/11/17

echo "install influxdb & telegraf"
sleep 2
yum install -y https://repos.influxdata.com/rhel/7Server/x86_64/stable/telegraf-1.24.3-1.x86_64.rpm
yum install -y https://repos.influxdata.com/rhel/7Server/x86_64/stable/influxdb-1.8.10.x86_64.rpm

echo "backup telegraf.conf"
sleep 2
mv /etc/telegraf/telegraf.conf /etc/telegraf/telegraf.conf.bak

echo "add telegraf.conf"
sleep 2
cat >>/etc/telegraf/telegraf.conf<< EOF
# Configuration for sending metrics to InfluxDB
[[outputs.influxdb]]
    u
Copyright © 2010-2022 dgrt.cn 版权所有 |关于我们| 联系方式