Skip to content

Commit

Permalink
fix multi issue with new write tasks stats and added estats tests
Browse files Browse the repository at this point in the history
  • Loading branch information
awick committed Jan 16, 2019
1 parent c22be04 commit 12bd5e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/api-stats.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Test::More tests => 60;
use Test::More tests => 62;
use Cwd;
use URI::Escape;
use MolochTest;
Expand Down Expand Up @@ -37,6 +37,13 @@ my $test1Token = getTokenCookie("test1");
my $dstats = viewerGet("/dstats.json?nodeName=test&start=1399680425&stop=1399680460&step=5&interval=5&name=deltaPackets");
is (@{$dstats}, 7, "dstats.json array size");

# esstats.json
my $esstats = viewerGet("/esstats.json");
is ($esstats->{data}->[0]->{writesRejectedDelta}, 0, "Writes reject");

my $messtats = multiGet("/esstats.json");
is ($messtats->{data}->[0]->{writesRejectedDelta}, 0, "Writes reject");

# esindices
my $indices = viewerGet("/esindices/list");
cmp_ok (@{$indices}, ">=", 30, "indices array size");
Expand Down
1 change: 1 addition & 0 deletions viewer/multies.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ function simpleGatherFirst(req, res) {
}

app.get("/_cluster/nodes/stats", simpleGatherCopy);
app.get("/_nodes", simpleGatherCopy);
app.get("/_nodes/stats", simpleGatherCopy);
app.get("/_nodes/stats/:kinds", simpleGatherCopy);
app.get("/_cluster/health", simpleGatherAdd);
Expand Down

0 comments on commit 12bd5e8

Please sign in to comment.