Skip to content

Commit

Permalink
Use node and node_stats for logstash
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisronline committed Apr 5, 2021
1 parent 80e946a commit c1d505d
Show file tree
Hide file tree
Showing 30 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions packages/kbn-es-archiver/src/actions/rebuild_all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ function convertLegacyTypeToMetricsetName(type: string) {
case 'ccr_stats':
return 'ccr';
case 'kibana_stats':
case 'logstash_stats':
return 'stats';
case 'logstash_state':
return 'state';
}
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function getLogstashForClusters(req, lsIndexPattern, clusters) {
ignoreUnavailable: true,
body: {
query: createQuery({
type: 'logstash_stats',
types: ['node_stats', 'logstash_stats'],
start,
end,
clusterUuid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export function getPipelineStatsAggregation(
end = version.lastSeen;

const query = createQuery({
type: 'logstash_stats',
types: ['node_stats', 'logstash_stats'],
start,
end,
metric: LogstashMetric.getMetricFields(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export function getPipelineVertexStatsAggregation(
end = version.lastSeen;

const query = createQuery({
type: 'logstash_stats',
types: ['node_stats', 'logstash_stats'],
start,
end,
metric: LogstashMetric.getMetricFields(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const eventsPerSecondUnitLabel = i18n.translate(

export const metrics = {
logstash_cluster_events_input_rate: new LogstashEventsRateClusterMetric({
debug: true,
field: 'logstash_stats.events.in',
label: i18n.translate('xpack.monitoring.metrics.logstash.eventsReceivedRateLabel', {
defaultMessage: 'Events Received Rate',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const getRecentMonitoringDocuments = async (req, indexPatterns, clusterUuid, nod
bool: {
should: [
{ term: { type: 'logstash_stats' } },
{ term: { 'metricset.name': 'logstash_stats' } },
{ term: { 'metricset.name': 'node_stats' } },
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function logstashNodeRoute(server) {
bool: {
should: [
{ term: { type: 'logstash_stats' } },
{ term: { 'metricset.name': 'logstash_stats' } },
{ term: { 'metricset.name': 'node_stats' } },
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function logstashOverviewRoute(server) {
bool: {
should: [
{ term: { type: 'logstash_stats' } },
{ term: { 'metricset.name': 'logstash_stats' } },
{ term: { 'metricset.name': 'node_stats' } },
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ export async function fetchLogstashStats(
{ terms: { cluster_uuid: clusterUuids } },
{
bool: {
must: { term: { type: 'logstash_stats' } },
should: [
{ term: { type: 'logstash_stats' } },
{ term: { 'metricset.name': 'node_stats' } },
],
},
},
],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified x-pack/test/functional/es_archives/monitoring/ccr_mb/data.json.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit c1d505d

Please sign in to comment.