Comments (11)
配置没贴,盲猜,path中不包含标准mib 。这个功能我们商业客户都在用了,功能没问题。再让我猜,就不回复了。
from categraf.
我说下吧,标准mib肯定是包含的,像华三华为提供的mib都是把私有包依赖公共mib包含进去了,(华三提供的RFC1155.smi和RFC1212.smi是不行的,已经通过下载官方公共的mib得到修复)。
上面的问题我给你们找到了,snmp_xx.toml的配置中的有些配置写成 [mib名::指标名]的格式是不行的,非要改成oid格式。这个问题只在gosmi模式中存在,netsnmp模式没有问题,你们可以测试下,我把我的配置也可以贴出来,你测试下。
比如华三的设备,gomsi模式,写出oid是可以的:
AP别名 hh3cDot11CurrAPName
[[instances.table.field]]
oid = "1.3.6.1.4.1.25506.2.75.2.1.2.1.8"
name = "name"
is_tag = true
写出下面的这个模式是不行的,但是使用 netsnmp 是可以的:
AP别名 hh3cDot11CurrAPName
[[instances.table.field]]
oid = "HH3C-DOT11-APMT-MIB::hh3cDot11CurrAPName"
name = "name"
is_tag = true
from categraf.
让你费心了,我刚刚测试出来的,你确定下,我猜测应该是gosmi的代码解析出现什么问题了,还是华三提供的mib文件不规范嘛?
from categraf.
我说下吧,标准mib肯定是包含的,像华三华为提供的mib都是把私有包依赖公共mib包含进去了,(华三提供的RFC1155.smi和RFC1212.smi是不行的,已经通过下载官方公共的mib得到修复)。
上面的问题我给你们找到了,snmp_xx.toml的配置中的有些配置写成 [mib名::指标名]的格式是不行的,非要改成oid格式。这个问题只在gosmi模式中存在,netsnmp模式没有问题,你们可以测试下,我把我的配置也可以贴出来,你测试下。
比如华三的设备,gomsi模式,写出oid是可以的:
AP别名 hh3cDot11CurrAPName
[[instances.table.field]] oid = "1.3.6.1.4.1.25506.2.75.2.1.2.1.8" name = "name" is_tag = true
写出下面的这个模式是不行的,但是使用 netsnmp 是可以的:
AP别名 hh3cDot11CurrAPName
[[instances.table.field]] oid = "HH3C-DOT11-APMT-MIB::hh3cDot11CurrAPName" name = "name" is_tag = true
既然这么肯定都包含了,那path肯定不用贴出来了。 用HH3C-DOT11-APMT-MIB::hh3cDot11CurrAPName 这种格式没问题,只要按我说的,标准mib 包含了(比如netsnmp里面那些基础的公共的都在) 就没问题。 或者你自己找个mib依赖分析,看看依赖的mib文件是否包含再你现在path指定的路径中。
from categraf.
或者这么说,你用netsnmp的时候,是不是netsnmpd本身带了标准mib,然后你再把H3c的mib放到那个/usr/share/snmp/mib/xxxx 下。 然后用gosmi的时候也要包含这两部分mib的路径。或者你把标准mib文件都放到你的H3C目录下,这样path才可以只配置一个路径。
from categraf.
netsnmp和gosmi 我都是指定目录的 不会用到系统默认的目录,如ubuntu系统的 /usr/share/snmp/mib 目录。
from categraf.
那你要确定,你指定的目录中是否已经包含基础的mib了。搜一下有网站可以分析mib依赖,一查就知道你指定的路径中是否缺少了mib(大概率就是系统默认目录中的mib)
from categraf.
那为啥 netsnmp 可以呢?如果是缺少mib依赖的话
from categraf.
那为啥 netsnmp 可以呢?如果是缺少mib依赖的话
netsnmp 默认就加载/usr/share/xxx 。 你netsnmp怎么禁止不读取默认目录的?
from categraf.
netsnmp 可以引入环境变量 修改默认的 mib 文件读取目录路径啊,如下所示:
Environment="MIBDIRS=/opt/categraf/mibs/public:/opt/categraf/mibs/private" 可以把这个加入你们 categraf.service
或者设置临时环境变量:主要做测试使用 ./categraf --test --inputs snmp
export MIBDIRS="/opt/categraf/mibs/h3c/public:/opt/categraf/mibs/h3c/private"
维护的一个公号会更新一篇关于这个的细节可以作为文档放入进来,当作参考吧
from categraf.
你继续按照你的理解做吧,gosmi+path没问题。
from categraf.
Related Issues (20)
- categraf中redis自定义命令采集如何写 HOT 7
- input.snmp获取不到数据收否可以默认置为0? HOT 1
- categraf 的 input.zookeeper 插件是对端口进行探活吗? HOT 2
- kafka插件只有3个指标,什么情况,giegie
- iptables input.iptables panic: runtime error: invalid memory address or nil pointer dereference HOT 1
- 使用categraf采集SNMP数据,遇到string类型的数据会提示没有信息获取 HOT 6
- categraf中的net_response和http_response插件获取的code值能否调整一下 HOT 2
- 没有docker 容器监控的 系统内置模板么 HOT 1
- input.netstat_filter 端口监控,80端口偶尔误报 HOT 1
- Categraf-v0.3.60 采集日志文件无法达到采集上限 HOT 3
- categraf的ibex的设计请教 HOT 2
- 使用--intall安装 systemctl 日志输出问题 HOT 1
- 希望增加vsphere插件中的ESXi主机存活检测 HOT 4
- categraf是否可以增加windows执行powerShell脚本的支持? HOT 4
- postgre 监控采集up指标异常 HOT 1
- categraf在windows执行脚本,当meta/{id}/stdout文件 有中文的时候,会报错 HOT 8
- 夜莺怎么设置GPU的告警呀?很着急,window 使用了categraf 的dcgm插件 启动categraf 却说 dcgm not support HOT 4
- 关于日志采集存储 HOT 3
- 日志采集未按照预期 HOT 2
- categraf输出到promethues的数据时间不对 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from categraf.