-
Notifications
You must be signed in to change notification settings - Fork 456
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
Add metrics datastream for Azure Functions #7130
Changes from 12 commits
a15b275
d1ebc3b
1c266e5
0096853
843df5f
8519ebb
f2d771d
93e05a8
14d160d
d0616a5
82cba15
6bc1b13
4ceb12c
7e4237f
5dbfc12
fdc69d4
cb5a9be
6e57a58
62bb7d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,45 @@ streams: | |
title: Azure Functions logs | ||
description: Collect Azure Functions logs using azure-eventhub input | ||
vars: | ||
- name: eventhub | ||
type: text | ||
title: Event Hub | ||
multi: false | ||
required: true | ||
show_user: true | ||
description: >- | ||
Elastic recommends using one event hub for each integration. Visit [Create an event hub](https://docs.elastic.co/integrations/azure#create-an-event-hub) to learn more. Use event hub names up to 30 characters long to avoid compatibility issues. | ||
- name: consumer_group | ||
type: text | ||
title: Consumer Group | ||
multi: false | ||
required: true | ||
show_user: true | ||
default: $Default | ||
- name: connection_string | ||
type: password | ||
title: Connection String | ||
multi: false | ||
required: true | ||
show_user: true | ||
description: >- | ||
The connection string required to communicate with Event Hubs. See [Get an Event Hubs connection string](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string) to learn more. | ||
- name: storage_account | ||
type: text | ||
title: Storage Account | ||
multi: false | ||
required: true | ||
show_user: true | ||
description: >- | ||
The name of the storage account where the consumer group's state/offsets will be stored and updated. | ||
- name: storage_account_key | ||
type: password | ||
title: Storage Account Key | ||
multi: false | ||
required: true | ||
show_user: true | ||
description: >- | ||
The storage account key, this key will be used to authorize access to data in your storage account. | ||
Comment on lines
+10
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we are moving these vars from the "integration package scope" to the "data stream scope", we should test the upgrade path from 0.1.0 to the new version. I know this is integration is experimental, but we should see what's the user experience in this use case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to test the upgrade from 0.0.1 to a new version, including the installations of assets. I was able to ingest logs after the upgrade in ES. So, this should be good enough to go ahead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is cool. Did the upgrade kept all the integration settings values like event hub name, connection string, etc. from the integration scope to data stream scope? |
||
- name: preserve_original_event | ||
required: true | ||
show_user: true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
metricsets: ["monitor"] | ||
default_resource_type: "Microsoft.Web/sites" | ||
add_cloud_metadata: true | ||
period: {{period}} | ||
{{#if client_id}} | ||
client_id: {{client_id}} | ||
{{/if}} | ||
{{#if client_secret}} | ||
client_secret: {{client_secret}} | ||
{{/if}} | ||
{{#if tenant_id}} | ||
tenant_id: {{tenant_id}} | ||
{{/if}} | ||
{{#if subscription_id}} | ||
subscription_id: {{subscription_id}} | ||
{{/if}} | ||
{{#if refresh_list_interval}} | ||
refresh_list_interval: {{refresh_list_interval}} | ||
{{/if}} | ||
{{#if resource_manager_endpoint}} | ||
resource_manager_endpoint: {{resource_manager_endpoint}} | ||
{{/if}} | ||
{{#if active_directory_endpoint}} | ||
active_directory_endpoint: {{active_directory_endpoint}} | ||
{{/if}} | ||
|
||
resources: | ||
{{#if resource_groups}} | ||
{{#each resource_groups}} | ||
- resource_group: "{{this}}" | ||
resource_type: "Microsoft.Web/sites" | ||
metrics: | ||
- name: ["FunctionExecutionCount", "FunctionExecutionUnits", "AppConnections", "AverageMemoryWorkingSet", "BytesReceived", "BytesSent", "CurrentAssemblies", "Gen0Collections", "Gen1Collections", "Gen2Collections", "Handles", "HealthCheckStatus", "Http2xx", "Http3xx", "Http4xx", "Http5xx", "HttpResponseTime", "IoOtherBytesPerSecond", "IoOtherOperationsPerSecond", "IoReadBytesPerSecond", "IoReadOperationsPerSecond", "IoWriteBytesPerSecond", "IoWriteOperationsPerSecond", "MemoryWorkingSet", "Requests", "RequestsInApplicationQueue", "Threads", "TotalAppDomains", "TotalAppDomainsUnloaded"] | ||
namespace: "Microsoft.Web/sites" | ||
timegrain: "PT5M" | ||
ignore_unsupported: true | ||
- name: ["FileSystemUsage"] | ||
namespace: "Microsoft.Web/sites" | ||
timegrain: "PT6H" | ||
ignore_unsupported: true | ||
{{/each}} | ||
{{/if}} | ||
{{#if resource_ids}} | ||
{{#each resource_ids}} | ||
- resource_id: "{{this}}" | ||
metrics: | ||
- name: ["FunctionExecutionCount", "FunctionExecutionUnits", "AppConnections", "AverageMemoryWorkingSet", "BytesReceived", "BytesSent", "CurrentAssemblies", "Gen0Collections", "Gen1Collections", "Gen2Collections", "Handles", "HealthCheckStatus", "Http2xx", "Http3xx", "Http4xx", "Http5xx", "HttpResponseTime", "IoOtherBytesPerSecond", "IoOtherOperationsPerSecond", "IoReadBytesPerSecond", "IoReadOperationsPerSecond", "IoWriteBytesPerSecond", "IoWriteOperationsPerSecond", "MemoryWorkingSet", "Requests", "RequestsInApplicationQueue", "Threads", "TotalAppDomains", "TotalAppDomainsUnloaded"] | ||
namespace: "Microsoft.Web/sites" | ||
timegrain: "PT5M" | ||
ignore_unsupported: true | ||
- name: ["FileSystemUsage"] | ||
namespace: "Microsoft.Web/sites" | ||
timegrain: "PT6H" | ||
ignore_unsupported: true | ||
{{/each}} | ||
{{/if}} | ||
{{#unless resource_ids }} | ||
{{#unless resource_groups }} | ||
- resource_query: "resourceType eq 'Microsoft.Web/sites'" | ||
metrics: | ||
- name: ["FunctionExecutionCount", "FunctionExecutionUnits", "AppConnections", "AverageMemoryWorkingSet", "BytesReceived", "BytesSent", "CurrentAssemblies", "Gen0Collections", "Gen1Collections", "Gen2Collections", "Handles", "HealthCheckStatus", "Http2xx", "Http3xx", "Http4xx", "Http5xx", "HttpResponseTime", "IoOtherBytesPerSecond", "IoOtherOperationsPerSecond", "IoReadBytesPerSecond", "IoReadOperationsPerSecond", "IoWriteBytesPerSecond", "IoWriteOperationsPerSecond", "MemoryWorkingSet", "Requests", "RequestsInApplicationQueue", "Threads", "TotalAppDomains", "TotalAppDomainsUnloaded"] | ||
namespace: "Microsoft.Web/sites" | ||
timegrain: "PT5M" | ||
ignore_unsupported: true | ||
- name: ["FileSystemUsage"] | ||
namespace: "Microsoft.Web/sites" | ||
timegrain: "PT6H" | ||
ignore_unsupported: true | ||
{{/unless}} | ||
{{/unless}} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
description: Pipeline for parsing Azure Functions metrics. | ||
processors: | ||
- set: | ||
field: ecs.version | ||
value: '8.8.0' | ||
- rename: | ||
field: azure.monitor | ||
target_field: azure.functions | ||
ignore_missing: true | ||
on_failure: | ||
- set: | ||
field: event.kind | ||
value: pipeline_error | ||
- append: | ||
field: error.message | ||
value: '{{ _ingest.on_failure_message }}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The datastream comes with a dashboard. We can remove the
and a Kibana dashboard
from changelog entry.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it to address one of the review comments. However, since a datastream is always expected to have a dashboard, we can remove the explicit mention of it.