<commit_before>// Module included in the following assemblies:
//
// * web_console/customizing-the-web-console.adoc

[id="defining-template-for-external-log-links_{context}"]
= Defining a template for an external log link

If you are connected to a service that helps you browse your logs, but you need
to generate URLs in a particular way, then you can define a template for your
link.

.Prerequisites

* You must have administrator privileges.

.Procedure

. From *Administration* -> *Custom Resource Definitions*, click on
*ConsoleExternalLogLink*.

. Click *YAML* and edit the file:
+
----
apiVersion: console.openshift.io/v1
kind: ConsoleExternalLogLink
metadata:
  name: example
spec:
  hrefTemplate: >-
    https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels}
  text: Example Logs
----<commit_msg>Fix navigation path in defining-template-for-external-log-link<commit_after>// Module included in the following assemblies:
//
// * web_console/customizing-the-web-console.adoc

[id="defining-template-for-external-log-links_{context}"]
= Defining a template for an external log link

If you are connected to a service that helps you browse your logs, but you need
to generate URLs in a particular way, then you can define a template for your
link.

.Prerequisites

* You must have administrator privileges.

.Procedure

. From *Administration* -> *Custom Resource Definitions*, click on
*ConsoleExternalLogLink*.
. Select *Instances* tab
. Click *Create Console External Log Link* and edit the file:
+
----
apiVersion: console.openshift.io/v1
kind: ConsoleExternalLogLink
metadata:
  name: example
spec:
  hrefTemplate: >-
    https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels}
  text: Example Logs
----
{'fraction_non_alphanumeric': 0.10648392198207696, 'fraction_numerical': 0.0010542962572482868, 'mean_word_length': 4.93125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5895537', 'n_tokens_mistral': 543, 'n_tokens_neox': 520, 'n_words': 177}