-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move apm tutorial from apm plugin into apm_oss plugin
Closes #65629
- Loading branch information
1 parent
a149915
commit 286a45f
Showing
24 changed files
with
1,472 additions
and
1,572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
export const APM_STATIC_INDEX_PATTERN_ID = 'apm_static_index_pattern_id'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ | |
"configPath": [ | ||
"apm_oss" | ||
], | ||
"ui": false, | ||
"requiredPlugins": [] | ||
"ui": true, | ||
"requiredPlugins": ["home"] | ||
} |
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { ApmOssPlugin } from './plugin'; | ||
|
||
// This exports static code and TypeScript types, | ||
// as well as, Kibana Platform `plugin()` initializer. | ||
export function plugin() { | ||
return new ApmOssPlugin(); | ||
} | ||
export { ApmOssPluginSetup, ApmOssPluginStart } from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { CoreSetup, CoreStart, Plugin } from 'kibana/public'; | ||
import { ApmOssPluginSetup, ApmOssPluginStart } from './types'; | ||
|
||
export class ApmOssPlugin implements Plugin<ApmOssPluginSetup, ApmOssPluginStart> { | ||
public setup(core: CoreSetup): ApmOssPluginSetup { | ||
return {}; | ||
} | ||
|
||
public start(core: CoreStart): ApmOssPluginStart { | ||
return {}; | ||
} | ||
|
||
public stop() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface ApmOssPluginSetup {} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface ApmOssPluginStart {} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface AppPluginStartDependencies {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { INSTRUCTION_VARIANT } from '../../../../home/server'; | ||
import { | ||
createWindowsServerInstructions, | ||
createEditConfig, | ||
createStartServerUnixSysv, | ||
createStartServerUnix, | ||
createDownloadServerRpm, | ||
createDownloadServerDeb, | ||
createDownloadServerOsx, | ||
} from '../instructions/apm_server_instructions'; | ||
import { | ||
createNodeAgentInstructions, | ||
createDjangoAgentInstructions, | ||
createFlaskAgentInstructions, | ||
createRailsAgentInstructions, | ||
createRackAgentInstructions, | ||
createJsAgentInstructions, | ||
createGoAgentInstructions, | ||
createJavaAgentInstructions, | ||
createDotNetAgentInstructions, | ||
} from '../instructions/apm_agent_instructions'; | ||
|
||
export function onPremInstructions({ | ||
errorIndices, | ||
transactionIndices, | ||
metricsIndices, | ||
sourcemapIndices, | ||
onboardingIndices, | ||
}: { | ||
errorIndices: string; | ||
transactionIndices: string; | ||
metricsIndices: string; | ||
sourcemapIndices: string; | ||
onboardingIndices: string; | ||
}) { | ||
const EDIT_CONFIG = createEditConfig(); | ||
const START_SERVER_UNIX = createStartServerUnix(); | ||
const START_SERVER_UNIX_SYSV = createStartServerUnixSysv(); | ||
|
||
return { | ||
instructionSets: [ | ||
{ | ||
title: i18n.translate('apm.tutorial.apmServer.title', { | ||
defaultMessage: 'APM Server', | ||
}), | ||
callOut: { | ||
title: i18n.translate('apm.tutorial.apmServer.callOut.title', { | ||
defaultMessage: 'Important: Updating to 7.0 or higher', | ||
}), | ||
message: i18n.translate('apm.tutorial.apmServer.callOut.message', { | ||
defaultMessage: `Please make sure your APM Server is updated to 7.0 or higher. \ | ||
You can also migrate your 6.x data with the migration assistant found in Kibana's management section.`, | ||
}), | ||
iconType: 'alert', | ||
}, | ||
instructionVariants: [ | ||
{ | ||
id: INSTRUCTION_VARIANT.OSX, | ||
instructions: [createDownloadServerOsx(), EDIT_CONFIG, START_SERVER_UNIX], | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.DEB, | ||
instructions: [createDownloadServerDeb(), EDIT_CONFIG, START_SERVER_UNIX_SYSV], | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.RPM, | ||
instructions: [createDownloadServerRpm(), EDIT_CONFIG, START_SERVER_UNIX_SYSV], | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.WINDOWS, | ||
instructions: createWindowsServerInstructions(), | ||
}, | ||
], | ||
statusCheck: { | ||
title: i18n.translate('apm.tutorial.apmServer.statusCheck.title', { | ||
defaultMessage: 'APM Server status', | ||
}), | ||
text: i18n.translate('apm.tutorial.apmServer.statusCheck.text', { | ||
defaultMessage: | ||
'Make sure APM Server is running before you start implementing the APM agents.', | ||
}), | ||
btnLabel: i18n.translate('apm.tutorial.apmServer.statusCheck.btnLabel', { | ||
defaultMessage: 'Check APM Server status', | ||
}), | ||
success: i18n.translate('apm.tutorial.apmServer.statusCheck.successMessage', { | ||
defaultMessage: 'You have correctly setup APM Server', | ||
}), | ||
error: i18n.translate('apm.tutorial.apmServer.statusCheck.errorMessage', { | ||
defaultMessage: | ||
'No APM Server detected. Please make sure it is running and you have updated to 7.0 or higher.', | ||
}), | ||
esHitsCheck: { | ||
index: onboardingIndices, | ||
query: { | ||
bool: { | ||
filter: [ | ||
{ term: { 'processor.event': 'onboarding' } }, | ||
{ range: { 'observer.version_major': { gte: 7 } } }, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
title: i18n.translate('apm.tutorial.apmAgents.title', { | ||
defaultMessage: 'APM Agents', | ||
}), | ||
instructionVariants: [ | ||
{ | ||
id: INSTRUCTION_VARIANT.JAVA, | ||
instructions: createJavaAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.JS, | ||
instructions: createJsAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.NODE, | ||
instructions: createNodeAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.DJANGO, | ||
instructions: createDjangoAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.FLASK, | ||
instructions: createFlaskAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.RAILS, | ||
instructions: createRailsAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.RACK, | ||
instructions: createRackAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.GO, | ||
instructions: createGoAgentInstructions(), | ||
}, | ||
{ | ||
id: INSTRUCTION_VARIANT.DOTNET, | ||
instructions: createDotNetAgentInstructions(), | ||
}, | ||
], | ||
statusCheck: { | ||
title: i18n.translate('apm.tutorial.apmAgents.statusCheck.title', { | ||
defaultMessage: 'Agent status', | ||
}), | ||
text: i18n.translate('apm.tutorial.apmAgents.statusCheck.text', { | ||
defaultMessage: | ||
'Make sure your application is running and the agents are sending data.', | ||
}), | ||
btnLabel: i18n.translate('apm.tutorial.apmAgents.statusCheck.btnLabel', { | ||
defaultMessage: 'Check agent status', | ||
}), | ||
success: i18n.translate('apm.tutorial.apmAgents.statusCheck.successMessage', { | ||
defaultMessage: 'Data successfully received from one or more agents', | ||
}), | ||
error: i18n.translate('apm.tutorial.apmAgents.statusCheck.errorMessage', { | ||
defaultMessage: 'No data has been received from agents yet', | ||
}), | ||
esHitsCheck: { | ||
index: [errorIndices, transactionIndices, metricsIndices, sourcemapIndices], | ||
query: { | ||
bool: { | ||
filter: [ | ||
{ | ||
terms: { | ||
'processor.event': ['error', 'transaction', 'metric', 'sourcemap'], | ||
}, | ||
}, | ||
{ range: { 'observer.version_major': { gte: 7 } } }, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}; | ||
} |
Oops, something went wrong.