Fix grep error when listing ifName values
Currently, Known values for ifName for host 99: (name) is outputed when we search for ifName values. # php -q /usr/share/cacti/cli/add_graphs.php --host-id=99 --snmp-field=ifName --list-snmp-values Known values for ifName for host 99: (name) eth0 eth1 lo This triggers about (2.9M) of errors emailed out to infra-root users on each run. Use grep to hide "Known values" and hopefully make our emails much smaller. Change-Id: I76058a107960cbca95995646c83b6d714e41f732 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
22eb7cc3ac
commit
d4c2eb5485
@ -67,7 +67,8 @@ add_ds_graph "Host MIB - Available Disk Space" "Available Disk Space" \
|
||||
SNMP_QUERY_ID=`php -q add_graphs.php --host-id=$HOST_ID --list-snmp-queries | \
|
||||
grep "SNMP - Interface Statistics"|cut -f 1`
|
||||
|
||||
for iface in $(php -q /usr/share/cacti/cli/add_graphs.php --host-id=$HOST_ID --snmp-field=ifName --list-snmp-values | grep -v tap| grep -v brq) ; do
|
||||
for iface in $(php -q /usr/share/cacti/cli/add_graphs.php --host-id=$HOST_ID --snmp-field=ifName --list-snmp-values | \
|
||||
grep -v -e "Known values" -e tap -e brq) ; do
|
||||
add_ds_graph "Interface - Traffic (bits/sec)" "In/Out Bits (64-bit Counters)" \
|
||||
"ifName" "$iface"
|
||||
add_ds_graph "Interface - Errors/Discards" "In/Out Errors/Discarded Packets" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user