librenms / librenms-agent

LibreNMS Agent & Scripts
GNU General Public License v2.0
118 stars 188 forks source link

Version fix for NTP SNMP #256

Closed DylanUnderwood closed 4 years ago

DylanUnderwood commented 5 years ago

The version variable was not pulled right on RedHat based distros. This fixes the issue.

Jellyfrog commented 4 years ago

Whats the output on redhat? Also this is a bit easier;

$BIN_NTPD --version | awk 'match($0, /ntpd (.)/, a) {print a[1]}' 
DylanUnderwood commented 4 years ago

Before the fix it was (ntpq 4.2.6p5) now its (4) The full version was causing issues and not sending the data.

That will not output anything. I have done my testing on el deb and arch. All passed.