目录

Netdata配置笔记

在centos7上安装netdata

安装

1
2
3
4
5
6
7
8
9
# (推荐)官方rpm repo edge版本,stable有可能会与epel冲突
curl -s https://packagecloud.io/install/repositories/netdata/netdata-edge/script.rpm.sh | sudo bash
sudo yum install netdata

# (不推荐)一键脚本安装,会访问GitHub,可能需要开https_proxy,而且是重新编译,耗时
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --stable-channel --disable-telemetry

# (不推荐)epel源中包含了netdata
sudo yum install netdata -y

配置

1
2
3
4
5
6
7
sudo vim /etc/netdata/netdata.conf

# 修改配置文件中绑定的ip
bind to = *

# 修改节点名称
hostname = 126-189

启动

1
systemctl enable --now netdata

验证

http://192.168.126.189:19999/
https://cdn.nlark.com/yuque/0/2021/png/368236/1627612865192-a689da8a-f39c-46b2-a7f0-e60bfc880069.png#clientId=uab8dbddf-4f6c-4&from=paste&height=603&id=u7399f382&margin=%5Bobject%20Object%5D&name=image.png&originHeight=603&originWidth=1638&originalType=binary&ratio=1&size=98327&status=done&style=none&taskId=u9a1980f5-327a-42cb-954b-a05895794f6&width=1638

安装nv插件

自带的nvidia-smi插件启动不起来,不知道为啥,改用nv插件:https://github.com/coraxx/netdata_nv_plugin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
cd /tmp/

git clone https://hub.fastgit.org/coraxx/netdata_nv_plugin --depth 1
# git clone https://github.com/coraxx/netdata_nv_plugin --depth 1

sudo cp netdata_nv_plugin/nv.chart.py /usr/libexec/netdata/python.d/

sudo cp netdata_nv_plugin/python_modules/pynvml.py /usr/libexec/netdata/python.d/python_modules/

sudo cp netdata_nv_plugin/nv.conf /etc/netdata/python.d/