Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When processing SNMP data, space delimited hex strings do not always convert into MAC addresses #2733

Closed
PonomarenkoVladimir opened this issue Jun 13, 2019 · 7 comments
Labels
bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@PonomarenkoVladimir
Copy link

Describe the bug
Error processing hex-lines (MAC-address)

To Reproduce
Have a Script Query XML File
The output format of the field “spMeshLinkNodeId”: hex
изображение

Steps

  1. Select "Management" -> "Devices" -> My Device
  2. Select "Associated Data Queries"
  3. Select "Verbose Query"
    изображение

Result: : no print MAC-address of the equipment (field ”spMeshLinkNodeId”)
изображение

Expected behavior
I fixed the error in the file ./lib/snmp.php
Result:
изображение

Because I do not know the logic of the program, the text of the correction is not attached.

Desktop (please complete the following information):

  • OS: Windows 7
  • Browser: Chrome
@cigamit
Copy link
Member

cigamit commented Jun 22, 2019

Please upload your updated lib/snmp.php. Thanks!!

@cigamit cigamit added the bug Undesired behaviour label Jun 22, 2019
@cigamit
Copy link
Member

cigamit commented Jun 23, 2019

I have attempted to validate this one using core Cacti 1.2.4/1.2.5 and can not. Can you please also update to develop or 1.2.4 after you upload your modified lib/snmp.php file?

@cigamit
Copy link
Member

cigamit commented Jun 23, 2019

Oh, I was not able to validate using the ifInterfaces HwAddress walk. You might also want to upload the output of this command:

snmpwalk -c yourcommunity -v2c -Ox youhostname theOIDinQuestion

Also, what happens when you change type from 'get' to 'walk'?

@PonomarenkoVladimir
Copy link
Author

My updated lib/snmp.php file for version Cacti 1.2.4:
snmp.php.tar.gz
My changes are marked "**********"

Command output:
snmpwalk -c public -v2c -Ox 172.17.2.186 .1.3.6.1.4.1.15319.2.2.1.4.0
iso.3.6.1.4.1.15319.2.2.1.4.0 = Hex-STRING: 00 0A DB 08 9F BF

Also, what happens when you change type from 'get' to 'walk'?
Result:
Click to show Data Query output for field 'spMeshLinkNodeId
Executing script query '/usr/bin/php -q /usr/share/cacti-1.2.4/scripts/query_skypilot_link_stats.php '172.17.2.186' '7' '2:161:2000:2:20:public::::::' 'query' 'node_id''Found item [spMeshLinkNodeId=''] index: 0
 
The result has not changed.

@cigamit
Copy link
Member

cigamit commented Jun 24, 2019

Yea, those changes looked mostly good. Committing momentarily. Then I would like you to test it.

@cigamit cigamit changed the title ERROR Cacti-1.2.4: Error processing hex-lines Error processing hex-lines for space delimited hex strings into mac addresses Jun 24, 2019
cigamit added a commit that referenced this issue Jun 24, 2019
Error processing hex-lines for space delimited hex strings into mac addresses
@cigamit
Copy link
Member

cigamit commented Jun 24, 2019

Okay, it's uploaded. Please test.

@cigamit cigamit added the resolved A fixed issue label Jun 24, 2019
@cigamit cigamit added this to the v1.2.5 milestone Jun 24, 2019
@PonomarenkoVladimir
Copy link
Author

Works.

@netniV netniV closed this as completed Jun 27, 2019
@netniV netniV changed the title Error processing hex-lines for space delimited hex strings into mac addresses When processing SNMP data, space delimited hex strings do not always convert into MAC addresses Jul 14, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

3 participants