mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- Disable smarter histogram graphing since it has bugs.
This commit is contained in:
parent
3b6ae5bd9d
commit
760ada586b
1 changed files with 15 additions and 14 deletions
|
@ -51,6 +51,7 @@
|
||||||
for (var i in histogram) {
|
for (var i in histogram) {
|
||||||
flot_data.push([parseInt(histogram[i]["key"]), histogram[i]["count"]])
|
flot_data.push([parseInt(histogram[i]["key"]), histogram[i]["count"]])
|
||||||
}
|
}
|
||||||
|
logstash.plot(flot_data, logstash.params.interval);
|
||||||
//console.log(histogram);
|
//console.log(histogram);
|
||||||
|
|
||||||
/* Try to be intelligent about how we choose the histogram interval.
|
/* Try to be intelligent about how we choose the histogram interval.
|
||||||
|
@ -60,23 +61,23 @@
|
||||||
*
|
*
|
||||||
* This queries the backend several times, but should be reasonably
|
* This queries the backend several times, but should be reasonably
|
||||||
* speedy as this behaves roughly as a binary search. */
|
* speedy as this behaves roughly as a binary search. */
|
||||||
if (flot_data.length < 6 && flot_data.length > 0 && tries > 0) {
|
//if (flot_data.length < 6 && flot_data.length > 0 && tries > 0) {
|
||||||
//console.log("Histogram bucket " + logstash.params.interval + " has only " + flot_data.length + " data points, trying smaller...");
|
//console.log("Histogram bucket " + logstash.params.interval + " has only " + flot_data.length + " data points, trying smaller...");
|
||||||
logstash.params.interval /= 2;
|
//logstash.params.interval /= 2;
|
||||||
if (logstash.params.interval < 1000) {
|
//if (logstash.params.interval < 1000) {
|
||||||
tries = 0; /* stop trying, too small... */
|
//tries = 0; /* stop trying, too small... */
|
||||||
logstash.plot(flot_data, logstash.params.interval);
|
//logstash.plot(flot_data, logstash.params.interval);
|
||||||
return;
|
//return;
|
||||||
}
|
//}
|
||||||
logstash.histogram(tries - 1);
|
//logstash.histogram(tries - 1);
|
||||||
} else if (flot_data.length > 50 && tries > 0) {
|
//} else if (flot_data.length > 50 && tries > 0) {
|
||||||
//console.log("Histogram bucket " + logstash.params.interval + " too many (" + flot_data.length + ") data points, trying larger interval...");
|
//console.log("Histogram bucket " + logstash.params.interval + " too many (" + flot_data.length + ") data points, trying larger interval...");
|
||||||
logstash.params.interval *= 2;
|
//logstash.params.interval *= 2;
|
||||||
logstash.histogram(tries - 1);
|
//logstash.histogram(tries - 1);
|
||||||
} else {
|
//} else {
|
||||||
//console.log("Histo:" + logstash.params.interval);
|
//console.log("Histo:" + logstash.params.interval);
|
||||||
logstash.plot(flot_data, logstash.params.interval);
|
//logstash.plot(flot_data, logstash.params.interval);
|
||||||
}
|
//}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue