@@ -41,9 +41,9 @@ export function NoDataView({ subTitle }: { subTitle: string }) {
4141 [ setupDataCollectionInstructions ]
4242 ) ;
4343
44- const secretToken = data ?. variables . secretToken ;
45- const collectionAgentHostPort = data ?. variables . apmServerUrl . replace ( 'https://' , '' ) ;
46- const symbolUrl = data ?. variables . apmServerUrl . replace ( / \. a p m \. / , '.symbols. ' ) ;
44+ const secretToken = data ?. variables . collector . secretToken ;
45+ const collectionAgentHost = data ?. variables . collector . host . replace ( 'https://' , '' ) ;
46+ const symbolUrl = data ?. variables . symbolizer . host . replace ( 'https://' , '' ) ;
4747 const hostAgentVersion = 'v3' ;
4848
4949 const tabs = [
@@ -71,7 +71,7 @@ export function NoDataView({ subTitle }: { subTitle: string }) {
7171 < EuiCodeBlock paddingSize = "s" isCopyable >
7272 { `helm install --create-namespace -n=universal-profiling universal-profiling-agent \\
7373--set "projectID=1,secretToken=${ secretToken } " \\
74- --set "collectionAgentHostPort=${ collectionAgentHostPort } " \\
74+ --set "collectionAgentHostPort=${ collectionAgentHost } " \\
7575--set "version=${ hostAgentVersion } " \\
7676optimyze/pf-host-agent` }
7777 </ EuiCodeBlock >
@@ -112,7 +112,7 @@ optimyze/pf-host-agent`}
112112-v /var/run/docker.sock:/var/run/docker.sock -v /sys/kernel/debug:/sys/kernel/debug:ro \\
113113docker.elastic.co/observability/profiling-agent:${ hostAgentVersion } /root/pf-host-agent \\
114114-project-id=1 -secret-token=${ secretToken } \\
115- -collection-agent=${ collectionAgentHostPort } ` }
115+ -collection-agent=${ collectionAgentHost } ` }
116116 </ EuiCodeBlock >
117117 ) ,
118118 } ,
@@ -150,7 +150,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
150150 } ) ,
151151 content : (
152152 < EuiCodeBlock paddingSize = "s" isCopyable >
153- { `sudo pf-host-agent/pf-host-agent -project-id=1 -secret-token=${ secretToken } -collection-agent=${ collectionAgentHostPort } ` }
153+ { `sudo pf-host-agent/pf-host-agent -project-id=1 -secret-token=${ secretToken } -collection-agent=${ collectionAgentHost } ` }
154154 </ EuiCodeBlock >
155155 ) ,
156156 } ,
@@ -192,7 +192,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
192192 } ) ,
193193 content : (
194194 < EuiCodeBlock paddingSize = "s" isCopyable >
195- { `echo -e "project-id 1\nsecret-token ${ secretToken } \ncollection-agent ${ collectionAgentHostPort } " | sudo tee -a /etc/prodfiler/prodfiler.conf` }
195+ { `echo -e "project-id 1\nsecret-token ${ secretToken } \ncollection-agent ${ collectionAgentHost } " | sudo tee -a /etc/prodfiler/prodfiler.conf` }
196196 </ EuiCodeBlock >
197197 ) ,
198198 } ,
@@ -245,7 +245,7 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
245245 } ) ,
246246 content : (
247247 < EuiCodeBlock paddingSize = "s" isCopyable >
248- { `echo -e "project-id 1\nsecret-token ${ secretToken } \ncollection-agent ${ collectionAgentHostPort } " | sudo tee -a /etc/prodfiler/prodfiler.conf` }
248+ { `echo -e "project-id 1\nsecret-token ${ secretToken } \ncollection-agent ${ collectionAgentHost } " | sudo tee -a /etc/prodfiler/prodfiler.conf` }
249249 </ EuiCodeBlock >
250250 ) ,
251251 } ,
@@ -262,6 +262,64 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
262262 } ,
263263 ] ,
264264 } ,
265+ {
266+ key : 'elasticAgentIntegration' ,
267+ title : i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.title' , {
268+ defaultMessage : 'Elastic Agent Integration' ,
269+ } ) ,
270+ steps : [
271+ {
272+ title : i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1' , {
273+ defaultMessage : 'Copy credentials' ,
274+ } ) ,
275+ content : (
276+ < >
277+ < EuiText >
278+ { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint' , {
279+ defaultMessage :
280+ "You'll need these credentials to set up Universal Profiling. Please save them in a secure location, as they will be required in the subsequent step." ,
281+ } ) }
282+ </ EuiText >
283+ < EuiSpacer />
284+ < EuiCodeBlock paddingSize = "s" isCopyable >
285+ { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1.secretToken' , {
286+ defaultMessage : 'Secret token: {secretToken}' ,
287+ values : { secretToken } ,
288+ } ) }
289+ </ EuiCodeBlock >
290+ < EuiSpacer size = "s" />
291+ < EuiCodeBlock paddingSize = "s" isCopyable >
292+ { i18n . translate (
293+ 'xpack.profiling.tabs.elasticAgentIntegrarion.step1.collectionAgentUrl' ,
294+ {
295+ defaultMessage : 'Universal Profiling Collector url: {collectionAgentHost}' ,
296+ values : { collectionAgentHost } ,
297+ }
298+ ) }
299+ </ EuiCodeBlock >
300+ </ >
301+ ) ,
302+ } ,
303+ {
304+ title : i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step2' , {
305+ defaultMessage : 'Fleet' ,
306+ } ) ,
307+ content : (
308+ < EuiButton
309+ iconType = "gear"
310+ fill
311+ href = { `${ core . http . basePath . prepend (
312+ '/app/integrations/detail/profiler_agent-8.8.0-preview/overview'
313+ ) } `}
314+ >
315+ { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step2.button' , {
316+ defaultMessage : 'Manage Universal Profiling agent in Fleet' ,
317+ } ) }
318+ </ EuiButton >
319+ ) ,
320+ } ,
321+ ] ,
322+ } ,
265323 {
266324 key : 'symbols' ,
267325 title : i18n . translate ( 'xpack.profiling.tabs.symbols.title' , {
@@ -349,61 +407,6 @@ docker.elastic.co/observability/profiling-agent:${hostAgentVersion} /root/pf-hos
349407 } ,
350408 ] ,
351409 } ,
352- {
353- key : 'elasticAgentIntegration' ,
354- title : i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.title' , {
355- defaultMessage : 'Elastic Agent Integration' ,
356- } ) ,
357- steps : [
358- {
359- title : i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1' , {
360- defaultMessage : 'Copy credentials' ,
361- } ) ,
362- content : (
363- < >
364- < EuiText >
365- { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1.hint' , {
366- defaultMessage :
367- "You'll need these credentials to set up Universal Profiling. Please save them in a secure location, as they will be required in the subsequent step." ,
368- } ) }
369- </ EuiText >
370- < EuiSpacer />
371- < EuiCodeBlock paddingSize = "s" isCopyable >
372- { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1.secretToken' , {
373- defaultMessage : 'Secret token: {secretToken}' ,
374- values : { secretToken } ,
375- } ) }
376- </ EuiCodeBlock >
377- < EuiSpacer size = "s" />
378- < EuiCodeBlock paddingSize = "s" isCopyable >
379- { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step1.apmServerUrl' , {
380- defaultMessage : 'APM server url: {apmServerUrl}' ,
381- values : { apmServerUrl : collectionAgentHostPort } ,
382- } ) }
383- </ EuiCodeBlock >
384- </ >
385- ) ,
386- } ,
387- {
388- title : i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step2' , {
389- defaultMessage : 'Fleet' ,
390- } ) ,
391- content : (
392- < EuiButton
393- iconType = "gear"
394- fill
395- href = { `${ core . http . basePath . prepend (
396- '/app/integrations/detail/profiler_agent-8.8.0-preview/overview'
397- ) } `}
398- >
399- { i18n . translate ( 'xpack.profiling.tabs.elasticAgentIntegrarion.step2.button' , {
400- defaultMessage : 'Manage Universal Profiling agent in Fleet' ,
401- } ) }
402- </ EuiButton >
403- ) ,
404- } ,
405- ] ,
406- } ,
407410 ] ;
408411
409412 const [ selectedTab , setSelectedTab ] = useState ( tabs [ 0 ] . key ) ;
0 commit comments