X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=gnt-monitor;h=3b43a9555dabcc9a33e5ce8b27aaa9a3ddb84d65;hb=fa388da7b6c875106b4f67ea8183bb3a0592ede3;hp=db88f066187e04646e93c202bc607ab0732c5d9d;hpb=7fd86a3c05de4cefd897276e9b1fca3f74b0d28c;p=gnt-info diff --git a/gnt-monitor b/gnt-monitor index db88f06..3b43a95 100755 --- a/gnt-monitor +++ b/gnt-monitor @@ -6,7 +6,7 @@ use POSIX; use Time::HiRes qw(time sleep); my $DEBUG = $ENV{DEBUG} || 0; -my $INFLUX = $ENV{INFLUX} || 'http://10.80.3.89:8086/write?db=gnt'; +my $INFLUX = $ENV{INFLUX} || 'http://10.80.3.89:8086/write?consistency=any&db=gnt'; my $INTERVAL = $ENV{INTERVAL} || 1; my $DC = $ENV{DC}; my $RACK = $ENV{RACK}; @@ -184,7 +184,7 @@ foreach my $instance ( keys %$stat ) { close($fh); -if ( system( 'curl', '-XPOST', $INFLUX, '--data-binary', '@/dev/shm/gnt-monitor.influx' ) == 0 ) { +if ( system( 'curl', '-s', '-XPOST', $INFLUX, '--data-binary', '@/dev/shm/gnt-monitor.influx' ) == 0 ) { } else { rename '/dev/shm/gnt-monitor.influx', '/dev/shm/gnt-monitor.influx.bug.' . scalar glob '/dev/shm/gnt-monitor.influx.bug.*'; warn "curl failed: $? $!";