Skip to content

Commit

Permalink
Stack monitoring - logstash 8.0 metricbeat standalone compatibility (#…
Browse files Browse the repository at this point in the history
…122177)

* use node_stats metricset filter

* fix pipeline dropdown redirection

* add get_pipeline metricbeat aggregation

* add get_pipeline_vertex metricbeat aggregation

* update logstash metricbeat archived data

* merge_pipeline_versions

* type parameter

* use datastream for mb functional tests

* fix metricbeat apis tests

* lint

* lint

* lint

* fix multicluster api test

* lint

* fix singlecluster_green_gold_mb tests

* lint

* add test case

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	x-pack/plugins/monitoring/server/lib/logstash/get_logstash_for_clusters.ts
  • Loading branch information
klacabane committed Jan 5, 2022
1 parent d2ddf24 commit 73b8491
Show file tree
Hide file tree
Showing 38 changed files with 564 additions and 589,114 deletions.
11 changes: 11 additions & 0 deletions x-pack/plugins/monitoring/common/types/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,17 @@ export interface ElasticsearchMetricbeatSource {
};
logstash?: {
node?: {
state?: {
pipeline?: {
id: string;
name: string;
representation?: {
graph?: {
vertices: ElasticsearchSourceLogstashPipelineVertex[];
};
};
};
};
stats?: {
timestamp?: string;
logstash?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ export const LogStashPipelinePage: React.FC<ComponentProps> = ({ clusters }) =>
}
}, [detailVertexId, getPageData]);

const onChangePipelineHash = useCallback(() => {
window.location.hash = getSafeForExternalLink(
`#/logstash/pipelines/${pipelineId}/${pipelineHash}`
);
}, [pipelineId, pipelineHash]);
const onChangePipelineHash = useCallback(
(hash) => {
window.location.hash = getSafeForExternalLink(`#/logstash/pipelines/${pipelineId}/${hash}`);
},
[pipelineId]
);

useEffect(() => {
if (cluster) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React from 'react';
interface Props {
pipelineVersions: any[];
pipelineHash?: string;
onChangePipelineHash: () => void;
onChangePipelineHash: (hash: string) => void;
}

export const PipelineVersions = (props: Props) => {
Expand All @@ -23,23 +23,25 @@ export const PipelineVersions = (props: Props) => {
<EuiFlexItem grow={false}>
<EuiSelect
value={pipelineHash}
options={pipelineVersions.map((option) => {
return {
text: i18n.translate(
'xpack.monitoring.logstashNavigation.pipelineVersionDescription',
{
defaultMessage:
'Version active {relativeLastSeen} and first seen {relativeFirstSeen}',
values: {
relativeLastSeen: option.relativeLastSeen,
relativeFirstSeen: option.relativeFirstSeen,
},
}
),
value: option.hash,
};
})}
onChange={onChangePipelineHash}
options={pipelineVersions.map(
(option: { hash: string; relativeLastSeen: number; relativeFirstSeen: number }) => {
return {
text: i18n.translate(
'xpack.monitoring.logstashNavigation.pipelineVersionDescription',
{
defaultMessage:
'Version active {relativeLastSeen} and first seen {relativeFirstSeen}',
values: {
relativeLastSeen: option.relativeLastSeen,
relativeFirstSeen: option.relativeFirstSeen,
},
}
),
value: option.hash,
};
}
)}
onChange={({ target }) => onChangePipelineHash(target.value)}
/>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down
Loading

0 comments on commit 73b8491

Please sign in to comment.