Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redoing branch #9574

Merged
merged 2 commits into from
Jan 25, 2021
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
85 changes: 85 additions & 0 deletions content/en/dashboards/widgets/event_stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,51 @@ further_reading:
text: "Building Dashboard using JSON"
---

{{< site-region region="us" >}}

The event stream is a widget version of the stream of events on the [Event Stream view][1].

Note: **this widget displays only the 100 most recent events**.

{{< img src="dashboards/widgets/event_stream/event_stream.png" alt="event stream" >}}

## Setup

{{< img src="dashboards/widgets/event_stream/event_stream_setup.png" alt="event stream setup" style="width:80%;">}}

### Configuration

1. Enter a [search query][1] to filter the event stream.
2. On screenboards only, choose whether your widget has a custom timeframe or the screenboard's global timeframe.
3. Use the size parameter to choose to display either only the events title or the full event body.

### Options

#### Title

Display a custom title for your widget by activating the `Show a Title` check box:

{{< img src="dashboards/widgets/options/title.png" alt="Widget title" style="width:80%;">}}

Optionally define its size and alignment.

## API

This widget can be used with the **Dashboards API**. Refer to the [Dashboards API][2] documentation for additional reference.

The dedicated [widget JSON schema definition][3] for the event stream widget is:

{{< dashboards-widgets-api >}}

[1]: /events/
[2]: /api/v1/dashboards/
[3]: /dashboards/graphing_json/widget_json/
[4]: /events/#event-explorer

{{< /site-region >}}

{{< site-region region="eu" >}}

The event stream is a widget version of the stream of events on the [Event Stream view][1].

Note: **this widget displays only the 100 most recent events**.
Expand Down Expand Up @@ -47,10 +92,50 @@ The dedicated [widget JSON schema definition][3] for the event stream widget is:

{{< dashboards-widgets-api >}}

[1]: /events/
[2]: /api/v1/dashboards/
[3]: /dashboards/graphing_json/widget_json/
[4]: /events/#event-explorer
{{< /site-region >}}

{{< site-region region="gov" >}}

The event stream is a widget version of the stream of events on the [Event Explorer view][4].

## Setup

### Configuration

1. Enter a [search query][4] to filter the event stream.
2. On screenboards only, choose whether your widget has a custom timeframe or the screenboard's global timeframe.
3. Use the size parameter to choose to display either only the events title or the full event body.

### Options

#### Title

Display a custom title for your widget by activating the `Show a Title` check box.

Optionally define its size and alignment.

## API

This widget can be used with the **Dashboards API**. Refer to the [Dashboards API][2] documentation for additional reference.

The dedicated [widget JSON schema definition][3] for the event stream widget is:

{{< dashboards-widgets-api >}}

[1]: /events/
[2]: /api/v1/dashboards/
[3]: /dashboards/graphing_json/widget_json/
[4]: /events/#event-explorer
{{< /site-region >}}
## Further Reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /events/
[2]: /api/v1/dashboards/
[3]: /dashboards/graphing_json/widget_json/
[4]: /events/#event-explorer
142 changes: 140 additions & 2 deletions content/en/events/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,30 @@ further_reading:

An event represents any record of activity noteworthy for engineers (devs, ops, and security). See the developer documentation to learn about [submitting events][1] to Datadog.

{{< site-region region="us" >}}
## Event stream

The [event stream][2] is a display of the most recent events generated by your infrastructure and the associated monitors.

[2]: https://app.datadoghq.com/event/stream

{{< /site-region >}}
{{< site-region region="eu" >}}
## Event stream

The [event stream][3] is a display of the most recent events generated by your infrastructure and the associated monitors.

[3]: https://app.datadoghq.eu/event/stream
{{< /site-region >}}
{{< site-region region="gov" >}}
## Event explorer

The [event explorer][4] is a display of the most recent events generated by your infrastructure and the associated monitors. You can customize the columns displayed by using the **Options** button to the top right of the events.


[4]: https://gov.datadoghq.com/event/stream
{{< /site-region >}}

### Search

#### Full text
Expand All @@ -30,16 +50,103 @@ Full text search works on all keywords provided in the search query after applyi

Target specific event properties using these prefixes:


{{< site-region region="us" >}}
| Filter | Description |
|---------------------------------|--------------------------------------------------------------------------------|
| `sources:github,chef` | Show events from GitHub OR Chef. |
| `tags:env-prod,db` | Show events tagged with #env-prod OR #db. |
| `hosts:i-0ade23e6,db.myapp.com` | Show events from i-0ade23e6 OR db.myapp.com. |
| `status:error` | Show events with an error status (supports: `error`, `warning`, `success`). |
| `priority:low` | Show only low-priority events (supports `low` or `normal`, defaults to `all`). |
{{< /site-region >}}
{{< site-region region="eu" >}}
| Filter | Description |
|---------------------------------|--------------------------------------------------------------------------------|
| `sources:github,chef` | Show events from GitHub OR Chef. |
| `tags:env-prod,db` | Show events tagged with #env-prod OR #db. |
| `hosts:i-0ade23e6,db.myapp.com` | Show events from i-0ade23e6 OR db.myapp.com. |
| `status:error` | Show events with an error status (supports: `error`, `warning`, `success`). |
| `priority:low` | Show only low-priority events (supports `low` or `normal`, defaults to `all`). |
{{< /site-region >}}
{{< site-region region="gov" >}}
| Filter | Description |
|---------------------------------|--------------------------------------------------------------------------------|
| `source:github,chef` | Show events from GitHub OR Chef. |
| `host:i-0ade23e6,db.myapp.com` | Show events from i-0ade23e6 OR db.myapp.com. |
| `service:kafka` | Show events from the `kafka` service. |
| `status:error` | Show events with an error status (supports: `error`, `warning`, `success`). |
| `role:` | |
| `availability-zone:us-east-1a` | Show events in the `us-east-1a` AWS availability zone (AZ). |
| `container_id:foo` | Show events from the container with the ID `foo`. |
| `@evt.name:foo` | Show the event named `foo`. |

{{< /site-region >}}

**Note**: Filters perform an exact match search. Partial strings are not considered.

{{< site-region region="gov" >}}
#### Context

Build up a context to explore your events in your Event Explorer page first by selecting the proper time range, and then by using the search bar to filter your events and analytics.

#### Facets and measures

After being collected, your events attributes can be indexed as facets or measures. On the left side, you can use facets and measures to filter your results. You can create new facets or measures from existing event tags or attributes.

A **facet** displays all the distinct members of an attribute or a tag and provides some basic analytics, such as the number of events represented. Facets allow you to pivot or filter your datasets based on a given attribute. To filter, select the values that you want to see. to start using an attribute as a facet, click on it. Use the option to **Create facet**.The value of this attribute is stored for all new events.

A **measure** is an attribute with a numerical value contained in your event. To start using an attribute as a measure, click on a numerical attribute. Use the option to **Create measure**. The value of this attribute is stored for all new events.

#### Saved views

Use saved views to automatically configure your event explorer with a preselected set of facets, measures, searches, time ranges, and visualizations. Check the dedicated [saved views documentation][5] to learn more.


[5]: logs/explorer/saved_views/
{{< /site-region >}}

{{< site-region region="us" >}}
#### Advanced

For a more advanced search, use the Datadog event query language, for example:

| Filter | Description |
|---------------------------------------------------|---------------------------------------------------------------------------|
| `tags:env-prod OR db` | Show events tagged with #env-prod OR #db. |
| `tags:security-group:sg-123 AND role:common-node` | Show events tagged with `#security-group:sg-123` AND `#role:common-node`. |
| `cloud_provider:* NOT "azure"` | Show all cloud providers except the ones tagged with "azure". |

Use tag search to find all events with the same key tag, for example:

| Filter | Description |
|----------------------|--------------------------------------------------------------------------------------|
| `tags:<KEY>:<VALUE>` | Shows events with the `<KEY>:<VALUE>` tag. |
| `<KEY>:*` | Shows all events with the `<KEY>` attached. |
| `<KEY>`:`<REGEX>` | Shows all events with `<KEY>:<VALUE>` tag where the `<VALUE>` matches the `<REGEX>`. |
| `tags:<KEY>` | This is not a valid search. |
| `<KEY>:<VALUE>` | This is not a valid search. |

To combine multiple terms into a complex query, use the following Boolean operators:

| Operator | Description | Example |
|----------|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| `AND` | **Intersection**: both terms are in the selected events (for tags, if nothing is added, `AND` is the default). | `redis_* AND down` |
| `OR` | **Union**: either term is contained in the selected events. Use a comma (`,`) for tags. | `sources:nagios,chef directory OR Mixlib` |
| `NOT` | **Exclusion**: the following term is NOT in the event. This operator works for strings only—use `-` in front of tags. | `-tags:<KEY>:<VALUE> NOT "<STRING>"` |

**Note**: Some of the advanced query language features like Boolean logic work only in the event stream page, and are not available in graph tiles or dashboard widgets.

Combine prefixes to construct more complex searches. For example, to find all open `chef` or `nagios` errors that mention `cassandra`, use:

```text
sources:nagios,chef status:error cassandra
```

**Note**: Do not use spaces after the colon or commas in these lists. Anything not attached to a prefix goes to full text search.
{{< /site-region >}}

{{< site-region region="eu" >}}
#### Advanced

For a more advanced search, use the Datadog event query language, for example:
Expand Down Expand Up @@ -77,12 +184,39 @@ sources:nagios,chef status:error cassandra
```

**Note**: Do not use spaces after the colon or commas in these lists. Anything not attached to a prefix goes to full text search.
{{< /site-region >}}

{{< site-region region="gov" >}}
#### Advanced

For a more advanced search, use the Datadog log query language. See the [Log Search Syntax][6] documentation for more details.

To combine multiple terms into a complex query, use the following Boolean operators:

| Operator | Description | Example |
|----------|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| `AND` | **Intersection**: both terms are in the selected events (for tags, if nothing is added, `AND` is the default). | `redis_* AND down` |
| `OR` | **Union**: either term is contained in the selected events. Use a comma (`,`) for tags. | `sources:nagios,chef directory OR Mixlib` |
| `NOT` | **Exclusion**: the following term is NOT in the event. This operator works for strings only—use `-` in front of tags. | `-tags:<KEY>:<VALUE> NOT "<STRING>"` |

[6]: logs/search_syntax/

{{< /site-region >}}

{{< site-region region="us" >}}
### Aggregation

By default, related events are aggregated when displayed in the events stream. To show unaggregated events, un-check the **Aggregate related events** box at the top right of your event stream:

{{< img src="events/event_stream_aggregated.png" alt="Aggregated event stream" style="width:50%;" >}}
{{< /site-region >}}
{{< site-region region="eu" >}}
### Aggregation

By default, related events are aggregated when displayed in the events stream. To show unaggregated events, un-check the **Aggregate related events** box at the top right of your event stream:

{{< img src="events/event_stream_aggregated.png" alt="Aggregated event stream" style="width:50%;" >}}
{{< /site-region >}}

### Notifications

Expand All @@ -95,7 +229,7 @@ Datadog supports `@notifications` in the event stream, for example:
| `@john` | Notifies the user named `john`. |
| `@test@example.com` | Sends an email to `test@example.com`. |
| `@slack-<SLACK_ACCOUNT>-<CHANNEL_NAME>` | Posts the event or graph to the specified Slack channel. |
| `@webhook` | Alerts or triggers the webhook. See the [blog post on webhooks][3]. |
| `@webhook` | Alerts or triggers the webhook. See the [blog post on webhooks][7]. |
| `@pagerduty` | Sends an alert to Pagerduty. You can also use `@pagerduty-acknowledge` and `@pagerduty-resolve`. |

## Further Reading
Expand All @@ -104,4 +238,8 @@ Datadog supports `@notifications` in the event stream, for example:

[1]: /developers/events/
[2]: https://app.datadoghq.com/event/stream
[3]: https://www.datadoghq.com/blog/send-alerts-sms-customizable-webhooks-twilio
[3]: https://app.datadoghq.eu/event/stream
[4]: https://gov.datadoghq.com/event/stream
[5]: logs/explorer/saved_views/
[6]: logs/search_syntax/
[7]: https://www.datadoghq.com/blog/send-alerts-sms-customizable-webhooks-twilio
Loading