apache / apache/hertzbeat

[BUG] snmp collector get apr info from h3c_switch but some mac addr info get error String

Open
#2,840 1 comment 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Java
Stars
7.4k
Forks
1.3k
Avg merge
1d 20h
Merged PRs (30d)
32

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Current Behavior

only two mac addr had this error
![企业微信截图_17326770052326](https://github.com/user-attachments/assets/842b1b83-89e8-447c-a061-5f24ad1230ae)
![企业微信截图_17326765571329](https://github.com/user-attachments/assets/38174a0d-6225-45db-a778-2209073f0739)
![企业微信截图_17326766651326](https://github.com/user-attachments/assets/f969bac8-f180-4bec-bb2b-94c1c5702443)

### Expected Behavior

get right mac info

### Steps To Reproduce

collect config info

```
- name: arpinfo
i18n:
zh-CN: ARP表项
en-US: ARP Table
priority: 1
fields:
- field: ifIndex
type: 1
i18n:
zh-CN: 本端接口索引
en-US: Local Interface Index
- field: dstIp
type: 1
label: true
i18n:
zh-CN: 对端IP
en-US: Dst IP
- field: dstMac
type: 1
i18n:
zh-CN: 对端MAC
en-US: Dst Mac
# (optional)metrics field alias name, it is used as an alias field to map and convert the collected data and metrics field
aliasFields:
- ifIndex
- dstIp
- dstMac
# calculates:
# - ifIndex=convertMacAndVlan(ifIndex)
# - descr=ifDescr
# mapping and conversion expressions, use these and aliasField above to calculate metrics value
# eg: cores=core1+core2, usage=usage, waitTime=allTime-runningTime
protocol: snmp
snmp:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
authPassphrase: ^_^authPassphrase^_^
privPassphrase: ^_^privPassphrase^_^
privPasswordEncryption: ^_^privPasswordEncryption^_^
authPasswordEncryption: ^_^authPasswordEncryption^_^
contextName: ^_^contextName^_^
timeout: ^_^timeout^_^
community: ^_^community^_^
version: ^_^snmpVersion^_^
operation: walk
oids:
ifIndex: 1.3.6.1.2.1.3.1.1.1
dstIp: 1.3.6.1.2.1.3.1.1.3
dstMac: 1.3.6.1.2.1.3.1.1.2
```

### Environment

```markdown
HertzBeat version(s):1.6.1
```

### Debug logs

_No response_

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied arpinfo SNMP walk with the listed ARP-table OIDs against the H3C switch. Compare the two failing MAC entries with the returned values and collect the missing error details, since the issue provides only screenshots and no debug logs. Done means all MAC entries are collected and displayed correctly.

Written by the indexing model from the issue text.

Assessment

Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.