ifIndex to be display in Bandwidth check
Posted: Fri Jan 30, 2015 3:05 pm
Dear Expert
When checking Service Status (IfOperStatus) in the result there is If-Index which is very helpful info, the same way we want to display in the Service Bandwidth (check_rrdtraf).
I tried as below but its giving full path of the file which is clumsy
echo -n "$FILE OK - Current BW
I want to show something as below if FILE = var/lib/mrtg/tst-7200-1_235.rrd
(ifindx 235) OK - Current BW <<< including braces(brackets) so ifINDEX will show as a separate entity.
need to manipulate $FILE and extract substring between _ and .
I tried googling but not very successful...Appreciate your solution (string manipulation).
Regards
When checking Service Status (IfOperStatus) in the result there is If-Index which is very helpful info, the same way we want to display in the Service Bandwidth (check_rrdtraf).
I tried as below but its giving full path of the file which is clumsy
echo -n "$FILE OK - Current BW
I want to show something as below if FILE = var/lib/mrtg/tst-7200-1_235.rrd
(ifindx 235) OK - Current BW <<< including braces(brackets) so ifINDEX will show as a separate entity.
need to manipulate $FILE and extract substring between _ and .
I tried googling but not very successful...Appreciate your solution (string manipulation).
Regards