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

Fixed sysDescr can't get value #9425

Closed
wants to merge 1 commit into from

Conversation

jasoncheng7115
Copy link
Contributor

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.


Previous use:
preg_match('/Router Model: ([\w ]+), Version: ([\S\w\.]+)/', $poll_device['sysDescr'], $tmp_draytek);

There is no sysDescr String, and the Hardware & Version cannot be obtained.

The polling results:
2018-11-07 10_18_52-router-006 - capture - librenms


After testing, I made the following modifications so that he could read and split correctly:
preg_match('/Router Model: ([\w ]+), Version: ([\S\w\.]+),/', snmp_get($device, '.1.3.6.1.2.1.1.1.0', '-OQv'), $tmp_draytek);

The fixed polling results:
2018-11-07 10_18_10-router-006 - capture - librenms

@laf
Copy link
Member

laf commented Nov 7, 2018

$poll_device['sysDescr'] exists with the output for the lookup of the sysDescr value in snmp which is all your snmpget is doing.

It would be good to see a debug from your devices poller output.

@laf laf added the User-Pending Currently waiting for user response label Nov 7, 2018
@jasoncheng7115
Copy link
Contributor Author

$poll_device['sysDescr'] exists with the output for the lookup of the sysDescr value in snmp which is all your snmpget is doing.

It would be good to see a debug from your devices poller output.

Yes, snmpget can be taken out,

However, in the original draytek.inc.php the value of $poll_device['sysDescr'] is empty.
The hardware and OS cannot be analyzed.

@laf
Copy link
Member

laf commented Nov 17, 2018

If you can take the snmp_get out then what are you using in it's place?

@@ -3,7 +3,7 @@
* draytek.inc.php
* @author Jason Cheng <sanyu3u@gmail.com>
*/
preg_match('/Router Model: ([\w ]+), Version: ([\w\.]+)/', $poll_device['sysDescr'], $tmp_draytek);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use $device['sysDescr'] does it work? It would be really helpful if you provided the sysDescr from the device.

@murrant
Copy link
Member

murrant commented Nov 20, 2018

Fixed in #9466

@murrant murrant closed this Nov 20, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
User-Pending Currently waiting for user response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants