Ubuntu 10.10 / Splunk 4.2.1 / App: *nix 4.2
Yesterday we upgraded to the newest version of Splunk (4.2.1) and upgraded *nix app (4.2). Splunkd is now reporting the following errors:
I'm unable to identify what the syntax problem is. I've compared the interfaces.sh file on our server to what is posted on the web and they are the same. Is anyone else experiencing this problem?
cyndiback, I don't have a specific fix at this time, but this is a known issue logged as (SOLN-1032). Please submit your own case to support@splunk.com for tracking.
Moderator edit:
UPDATE: this issue later became SPL-41361, and should be fixed in the next maintenance release of the app. In the meantime, the glorious Vainstein has provided a patch for ifconfig.sh (sorry about the lines wrapping):
# diff interfaces.sh interfaces-mod.sh
41,42c41,42
< SPEED=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, /([0-9]+)([Mm]bps)/, array)) {print array[1] "Mb/s"} else { if (match($i,/[Mm]bps/)) {print $(i-1) "Mb/s"} } } }' | sed '$!d'`
< DUPLEX=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, /([\-\_a-zA-Z0-9]+)([Dd]uplex)/, array)) {print array[1]} else { if (match($i, /[Dd]uplex/)) {print $(i-1)} } } }' | sed 's/[-_]//g; $!d'`
---
> SPEED=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, "([0-9]+)([Mm]bps)")) {print $i} else { if (match($i, "[Mm]bps")) {print $(i-1) "Mb/s"} } } }' | sed '$!d'`
> DUPLEX=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, "([\-\_a-zA-Z0-9]+)([Dd]uplex)")) {print $i} else { if (match($i, "[Dd]uplex")) {print $(i-1) } } } }' | sed 's/[-_]//g; $!d'`
On debian :
- install gawk
- modify interfaces.sh :
-replace awk by gawk
- modify the line : CMD='ifconfig'. by removing the dot at the end of this line
it works for me after that
we are still having this issue even after upgrading the *nix app to the latest version. anyone?
I'm also experiencing this same issue my Ubuntu server
This is caused by mawk. Debian installs mawk instead of gawk by default. Install gawk instead and the error will go away.
Tried resetting to gawk and rebooted machine...This did not fix the error.
+1 having this issue on a new install, further information would be greatly appreciated...
I am seeing the same error as well
cyndiback, I don't have a specific fix at this time, but this is a known issue logged as (SOLN-1032). Please submit your own case to support@splunk.com for tracking.
Moderator edit:
UPDATE: this issue later became SPL-41361, and should be fixed in the next maintenance release of the app. In the meantime, the glorious Vainstein has provided a patch for ifconfig.sh (sorry about the lines wrapping):
# diff interfaces.sh interfaces-mod.sh
41,42c41,42
< SPEED=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, /([0-9]+)([Mm]bps)/, array)) {print array[1] "Mb/s"} else { if (match($i,/[Mm]bps/)) {print $(i-1) "Mb/s"} } } }' | sed '$!d'`
< DUPLEX=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, /([\-\_a-zA-Z0-9]+)([Dd]uplex)/, array)) {print array[1]} else { if (match($i, /[Dd]uplex/)) {print $(i-1)} } } }' | sed 's/[-_]//g; $!d'`
---
> SPEED=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, "([0-9]+)([Mm]bps)")) {print $i} else { if (match($i, "[Mm]bps")) {print $(i-1) "Mb/s"} } } }' | sed '$!d'`
> DUPLEX=`dmesg | awk '/[Ll]ink( is | )[Uu]p/ && /'$iface'/ {for (i=1; i<=NF; ++i) {if (match($i, "([\-\_a-zA-Z0-9]+)([Dd]uplex)")) {print $i} else { if (match($i, "[Dd]uplex")) {print $(i-1) } } } }' | sed 's/[-_]//g; $!d'`
This is working fine on my linux host, and on Solaris for me. 4.2.1 as well.