diff --git a/web/packages/teleport/src/Audit/__snapshots__/Audit.story.test.tsx.snap b/web/packages/teleport/src/Audit/__snapshots__/Audit.story.test.tsx.snap
index ebc8b9cb72f2b..06a6e5cf686b7 100644
--- a/web/packages/teleport/src/Audit/__snapshots__/Audit.story.test.tsx.snap
+++ b/web/packages/teleport/src/Audit/__snapshots__/Audit.story.test.tsx.snap
@@ -12800,7 +12800,7 @@ exports[`list of all events 1`] = `
- User [admin@example.com] has started a session [56408539-6536-11e9-80a1-427cfde50f5a]
+ User [admin@example.com] has started a session [56408539-6536-11e9-80a1-427cfde50f5a] on node [de3800ea-69d9-4d72-a108-97e57f8eb393]
|
`User [${user}] has started a session [${sid}]`,
+ format: event => {
+ const user = event.user || '';
+
+ if (event.proto === 'kube') {
+ if (!event.kubernetes_cluster) {
+ return `User [${user}] has started a Kubernetes session [${event.sid}]`;
+ }
+ return `User [${user}] has started a session [${event.sid}] on Kubernetes cluster [${event.kubernetes_cluster}]`;
+ }
+
+ const node =
+ event.server_hostname || event.server_addr || event.server_id;
+ return `User [${user}] has started a session [${event.sid}] on node [${node}] `;
+ },
},
[eventCodes.SESSION_UPLOAD]: {
type: 'session.upload',
diff --git a/web/packages/teleport/src/services/audit/types.ts b/web/packages/teleport/src/services/audit/types.ts
index d20c51ee63813..509ca2ab1d956 100644
--- a/web/packages/teleport/src/services/audit/types.ts
+++ b/web/packages/teleport/src/services/audit/types.ts
@@ -573,6 +573,11 @@ export type RawEvents = {
typeof eventCodes.SESSION_START,
{
sid: string;
+ kubernetes_cluster: string;
+ proto: string;
+ server_hostname: string;
+ server_addr: string;
+ server_id: string;
}
>;
[eventCodes.SESSION_REJECT]: RawEvent<
|