Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/platform-operations/event-destinations/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,14 @@ Massdriver adds two objects to `data`:
- `data.metadata`: facts about the event, such as how the actor authenticated. The [`eventTypes`](/api/graphql/types/objects/event-type#metadata) query lists the metadata fields of each event type.
- `data.attributes`: the attributes that the entity had when the event occurred, including the system attributes (`md-*`).

When a person, a service account, or a deployment caused the event, `data.actor` holds the IDs of the organization and the actor. When Massdriver caused the event, `data` has no `actor`.
When a person, a service account, or a deployment caused the event, `data.actor` holds the IDs of the organization and the actor, and the actor's `name`. For a person, `name` is the first and last name, or the email when the person has neither. For a service account, `name` is the name of the service account. For a deployment, `name` is the `deployed_by_name` of the deployment. When Massdriver caused the event, `data` has no `actor`.

Some entities also have the names of the entities that they refer to:

| Event type | Fields |
|---|---|
| `group_membership.*` | `group_name`. For a person, `account_email` and `account_name`. For a service account, `service_account_name`. |
| `alarm_state.created` | `alarm_name`, the display name of the alarm. |

The `event_destination.*` audit log events do not include the destination's `config`, `auth`, or signing secret.

Expand Down
9 changes: 5 additions & 4 deletions docs/platform-operations/event-destinations/02-slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,20 @@ mutation CreateEventDestination($auth: Map) {

Each message has:

- A headline that tells what happened, with an emoji. For example, `⏳ Jane Doe wants to deploy api-prod-database`, `✅ api-prod-database deployed`, or `🔴 api-prod-database is in alarm`.
- A headline that tells what happened, with an emoji. For example, `⏳ Jane Doe wants to deploy api-prod-database`, `✅ api-prod-database deployed`, or `🔴 High CPU on api-prod-database is in alarm`.
- An **Open in Massdriver** button that opens the page of the entity's instance, environment, or project. Events that are not about a project, such as organization events, have no button.
- A colored bar. Green is for events that went well, such as a completed deployment. Red is for failures, such as a failed deployment or an alarm. Yellow is for events that wait for a person, such as a proposed deployment. Gray is for all other events.
- The message of the deployment or of the alarm, when the event has one.
- Details that the headline does not give, such as the bundle version and the person who deployed. Then the time of the event, in the time zone of each reader.
- Details that the headline does not give, such as the bundle version and the person or service account that caused the event. Then the time of the event, in the time zone of each reader.

| Event | Headline |
|---|---|
| `deployment.proposed` | ⏳ Jane Doe wants to deploy api-prod-database |
| `deployment.approved` | 👍 Deploy of api-prod-database approved |
| `deployment.completed` | ✅ api-prod-database deployed |
| `deployment.failed` | ❌ Deploy of api-prod-database failed |
| `alarm_state.created` | 🔴 api-prod-database is in alarm, or 🟢 api-prod-database is back to OK |
| `alarm_state.created` | 🔴 High CPU on api-prod-database is in alarm, or 🟢 High CPU on api-prod-database is back to OK |
| `group_membership.added` | 👥 Jane Doe was added to group Platform, or 👥 Service account ci-bot was added to group Platform |
| `resource.exported` | 🔐 The secrets of resource writer were exported, when the export reveals a secret |
| `repo.published` | 🎉 New version of aws-aurora published |

Expand Down Expand Up @@ -129,7 +130,7 @@ Reviewers see each proposed deployment, and the **Open in Massdriver** button op

| Setting | Value |
|---|---|
| Events | `resource.exported`, `access_token.created`, `service_account.created`, `group_membership.joined` |
| Events | `resource.exported`, `access_token.created`, `service_account.created`, `group_membership.added` |
| Attributes | (empty). Access token, service account, and group events have no attributes, so a destination with **Attributes** never receives them. |
| Condition | `.type != "resource.exported" or .data.metadata.contains_secrets == true`, to post only the exports that reveal a secret |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Massdriver opens a new incident each time an alarm changes to `ALARM`. It does n

| Setting | Value |
|---|---|
| Events | `access_token.created`, `access_token.revoked`, `service_account.created`, `service_account.deleted`, `group_membership.joined`, `group_membership.deleted` |
| Events | `access_token.created`, `access_token.revoked`, `service_account.created`, `service_account.deleted`, `group_membership.added`, `group_membership.removed` |
| Attributes | (empty). These events have no attributes, so a destination with **Attributes** never receives them. |
| Condition | (empty) |
| Table | A table that extends `task` and that your security team reviews |
Expand Down