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

Add new output plugin for Azure Data Explorer(ADX) #9426

Merged
merged 90 commits into from
Jul 13, 2021

Conversation

minwal
Copy link
Contributor

@minwal minwal commented Jun 24, 2021

Required for all PRs:

  • Updated associated README.md.
  • Wrote appropriate unit tests.

It resolves #9230

It is a new output plugin for Azure Data Explorer, its been tested with SQL Server input plugin but it can work with any input plugin of Telegraf.

emadashi-purple and others added 30 commits June 16, 2021 10:25
.create-or-alter table ['table-name'] ingestion json mapping 'table-name_mapping' '[{"column":"fields", "Properties":{"Path":"$[\'fields\']"}},{"column":"name", "Properties":{"Path":"$[\'name\']"}},{"column":"tags", "Properties":{"Path":"$[\'tags\']"}},{"column":"timestamp", "Properties":{"Path":"$[\'timestamp\']"}}]'
```

**Note**: This plugin will automatically create Azure Data Explorer tables and corresponding table mapping as per the above mentioned commands. Since the `Metric` object is a complex type, the only output format supported is JSON, so make sure to set the `data_format` configuration in `telegraf.conf` to `json`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're creating the serializer yourself manually, you don't need to tell users to set the serializer to json.

expectedWriteError string
}{
{
name: "Valid metric",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like you could add a test that verifies that fields and tags and timestamps are serialized properly.

@srebhan srebhan requested a review from ssoroka July 7, 2021 07:51
@minwal
Copy link
Contributor Author

minwal commented Jul 9, 2021

As suggested by @sjwang90, adding new feature in plugin in the same PR. This feature allows to add all the metrics into a single Azure Data Explorer(ADX) table rather than creating separate ADX table for each metric. This is just to provide flexibility for the end users in case they don't want to use joins across different ADX tables that feed their monitoring dashboards.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still fine with me.

eashi and others added 2 commits July 13, 2021 10:24
@sjwang90 sjwang90 added the cloud Issues or requests around cloud environments label Jul 13, 2021
@ssoroka ssoroka merged commit f57ffa2 into influxdata:master Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/azure Azure plugins including eventhub_consumer, azure_storage_queue, azure_monitor cloud Issues or requests around cloud environments new plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegraf output plugin for Azure Data Explorer
7 participants