Index: ChangeLog =================================================================== --- ChangeLog (revision 7633) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2011-02-04 Christopher Maestas
and Albert Chu + + * contrib/ganglia/ganglia_ipmi_sensors.pl: Support new -r option. + 2011-02-01 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_deamon_cmd_error_exit): Fix Index: contrib/ganglia/ganglia_ipmi_sensors.pl =================================================================== --- contrib/ganglia/ganglia_ipmi_sensors.pl (revision 7619) +++ contrib/ganglia/ganglia_ipmi_sensors.pl (working copy) @@ -37,6 +37,12 @@ # Options: # # -h - specify hostname(s) to remotely access (don't specify for inband) +# -r - specify search and replace substitution expressions (separated by a colon) to +# modify a hostname before being passed to gmetric. This is useful if +# the IPMI hostname differs from the desired hostname to input to gmetric. +# For example "ipmi:my" would turn "ipmihost4" into "myhost4". Not specifying +# a colon results in a degenerate string removal. For example, +# "-ipmi" would turn "host4-ipmi" into "host4". # -S - specify an alternate ipmi-sensors location # -s - specify additional ipmi-sensors arguments # -G - specify an alternate gmetric location @@ -48,6 +54,11 @@ # Environment Variables: # # IPMI_HOSTS - specify hostname(s) to remotely access (don't specify for inband) +# IPMI_HOSTS_SUBST - specify search and replace substitution +# expressions (separated by a colon) to modify a +# hostname before being passed to gmetric. This is +# useful if the IPMI hostname differs from the +# desired hostname to input to gmetric. # IPMI_SENSORS_PATH - specify an alternate ipmi-sensors location # IPMI_SENSORS_ARGS - specify additional ipmi-sensors arguments # GMETRIC_PATH - specify an alternate gmetric location @@ -112,6 +123,7 @@ my $no_ganglia = 0; my $IPMI_HOSTS = undef; +my $IPMI_HOSTS_SUBST = undef; my $IPMI_SENSORS_PATH = "/usr/sbin/ipmi-sensors"; my $IPMI_SENSORS_ARGS = ""; my $GMETRIC_PATH = "/usr/bin/gmetric"; @@ -123,12 +135,14 @@ my $line; my $cmd; +my @subst; sub usage { my $prog = $0; - print "Usage: $prog [-h