本次监控采集使用categraf + Prometheus + Grafana实现
部署
前置要求
- Dell iDRAC SNMP 启用 (默认启用)
- Dell MIB文件
检测
使用snmpwalk
检测测试iDRAC SNMP
root@mon39:~# apt-get install snmp
root@mon39:~# snmpwalk -v 2c -c public 192.168.2.17 | head
iso.3.6.1.2.1.1.1.0 = ""
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.674.10892.5
iso.3.6.1.2.1.1.3.0 = Timeticks: (783983421) 90 days, 17:43:54.21
iso.3.6.1.2.1.1.4.0 = STRING: "\"support@dell.com\""
iso.3.6.1.2.1.1.5.0 = STRING: "idrac-122XXXX"
iso.3.6.1.2.1.1.6.0 = STRING: "\"unknown\""
iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00
iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.1
iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.16.2.2.1
iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.2.1.49
下载dell idrac snmp的oid配置
https://github.com/robotneo/phymonarch/tree/main/snmp/categraf/dell
支持型号: Dell Poweredge 12代 13代 14代 即iDRAC 7、iDRAC 8、iDRAC 9
root@mon39:~$ wget https://raw.githubusercontent.com/robotneo/phymonarch/refs/heads/main/snmp/categraf/dell/snmp_dell_idrac.toml
root@mon39:~$ ls -l /opt/categraf/conf/input.snmp/
total 44
-rw-r--r-- 1 root root 36308 Jul 10 13:11 snmp_dell_idrac.toml
-rw-r--r-- 1 www fwupd-refresh 2901 Jun 5 11:47 snmp.toml
-rw-r--r-- 1 www fwupd-refresh 3587 Jun 5 11:47 snmp.toml.example
修改要收集的IDARC_IP
root@mon39:~$ vim /opt/categraf/conf/input.snmp/snmp_dell_idrac.toml
interval = 30
[[instances]]
agents = [
"udp://192.168.1.17:161", # 这里修改IDRAC_IP
"udp://192.168.1.16:161",
"udp://192.168.1.15:161"
]
# metrics_name_prefix = "dell_"
interval_times = 1
# 标签可自定义标签值
labels = { region = "guangzhou", role = "idrac", brand = "dell" }
# 每个agent请求的超时时间
timeout = "5s"
# SNMP Agent的版本
version = 2
# SNMP团体名
community = "public"
# 把戴尔的 mib 文件放入 /opt/categraf/mibs/dell 目录中
path = ["/opt/categraf/mibs/dell"]
translator = "gosmi"
...
下载dell mib
解压到/opt/categraf/mibs/dell/
https://www.dell.com/support/product-details/zh-cn/product/poweredge-r640/drivers
root@mon39:~$ ls -l /opt/categraf/mibs/dell/
total 3464
-rw-r--r-- 1 root root 803310 Jun 23 2022 10892.mib
-rw-r--r-- 1 root root 9647 Sep 10 2014 adptinfo.mib
-rw-r--r-- 1 root root 18616 Sep 10 2014 baspCfg.mib
-rw-r--r-- 1 root root 15558 Sep 10 2014 baspStat.mib
-rw-r--r-- 1 root root 2322 Sep 10 2014 baspTrap.mib
-rw-r--r-- 1 root root 28689 Dec 16 2019 DcAsfSrv.mib
-rw-r--r-- 1 root root 9884 Dec 12 2012 dcs3fru.mib
-rw-r--r-- 1 root root 72423 Mar 24 2014 dcs3rmt.mib
-rw-r--r-- 1 root root 275866 Jun 23 2022 dcstorag.mib
-rw-r--r-- 1 root root 11014 Dec 12 2012 dellcm.mib
-rw-r--r-- 1 root root 24719 Dec 11 2015 dellrac.mib
-rw-r--r-- 1 root root 266764 Jun 28 2018 DELL-RAC-MIB_NPS_6.1.txt
-rw-r--r-- 1 root root 266764 Mar 19 2018 DELL-RAC-MIB.txt
-rw-r--r-- 1 root root 538833 Aug 12 2020 iDRAC-SMIv1.mib
-rw-r--r-- 1 root root 588078 Aug 12 2020 iDRAC-SMIv2.mib
-rw-r--r-- 1 root root 44248 Mar 26 2013 INTELLAN.mib
-rw-r--r-- 1 root root 44248 Mar 21 2018 INTELLAN_new.mib
-rw-r--r-- 1 root root 121944 Dec 17 2019 MX7000.mib
-rw-r--r-- 1 root root 118801 Jul 6 2020 MX7000-OME-M-v1.mib
-rw-r--r-- 1 root root 126521 Jul 6 2020 MX7000-OME-M-v2.mib
-rw-r--r-- 1 root root 8194 Jan 27 2017 OME.mib
-rw-r--r-- 1 root root 18638 Mar 22 2018 qlaspCfg.mib
-rw-r--r-- 1 root root 15581 Mar 22 2018 qlaspStat.mib
-rw-r--r-- 1 root root 2324 Sep 4 2014 qlaspTrap.mib
-rw-r--r-- 1 root root 9616 Mar 22 2018 qlgcadptinfo.mib
-rw-r--r-- 1 root root 46983 Jun 23 2022 SMTD_MIBS_ReleaseNotes.pdf
prometheus查询
等1分钟在prometheus ui可以看到snmp_dell 收集信息
grafana展示
grafana导入21107
https://grafana.com/grafana/dashboards/21107-dell-idrac-snmp-dashboard-for-vectoriametrics/
扩展添加OID
使用MIB 浏览器
、 Dell MIB
文件 和 Dell EMC OpenManage SNMP
参考指南来确定您需要的 OID 。
/opt/categraf/conf/input.snmp/snmp_dell_idrac.toml