Build precise queries to find exactly what you need
Press ESC to close
— /usr/lib64/nagios/plugins/check_snmp_synology~ 2018-12-07 19:11:35.231831343 +0000 +++ /usr/lib64/nagios/plugins/check_snmp_synology 2019-01-30 21:23:40.471135880 +0000 @@ -307,3 +307,8 @@ – RAIDName[$i]=$(echo “$syno” | grep $OID_RAIDName.$(($i-1)) | cut -d “=” -f2) – RAIDStatus[$i]=$(echo “$syno” | grep $OID_RAIDStatus.$(($i-1)) | cut -d “=” -f2 | sed ‘s/^[ t]*//;s/[ t]*$//’) – + # modified by William Yang / DataPulse + # the regexes below were not anchored on the tail end, which created situations where + # a record could contain multiple lines. Caused a lot of heartache. Adding the + # anchor [^.0-9] ensures no subsquent numeral or OID component is matched, causing + # the code to be much more resilient. We added 10 volumes one maintenance window, + # and we had to track this down…. + RAIDName[$i]=$(echo “$syno” | grep “$OID_RAIDName.$(($i-1))[^.0-9]” | cut -d “=” -f2) + RAIDStatus[$i]=$(echo “$syno” | grep “$OID_RAIDStatus.$(($i-1))[^.0-9]” | cut -d “=” -f2 | sed ‘s/^[ t]*//;s/[ t]*$//’) @@ -317,0 +323,2 @@
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!