Skip to content

Commit

Permalink
fix nesting of additional_fields in azure examples
Browse files Browse the repository at this point in the history
  • Loading branch information
8naama committed Sep 11, 2024
1 parent 7353886 commit c56c410
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 39 deletions.
47 changes: 24 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,17 @@ For structuring custom OAuth calls use type `oauth` API with the parameters belo
For Azure Graph, use type `azure_graph` with the below parameters.

## Configuration Options
| Parameter Name | Description | Required/Optional | Default |
|--------------------------------|----------------------------------------------------------------------|-------------------|-------------------|
| name | Name of the API (custom name) | Optional | `azure api` |
| azure_ad_tenant_id | The Azure AD Tenant id | Required | - |
| azure_ad_client_id | The Azure AD Client id | Required | - |
| azure_ad_secret_value | The Azure AD Secret value | Required | - |
| date_filter_key | The name of key to use for the date filter in the request URL params | Optional | `createdDateTime` |
| data_request.url | The request URL | Required | - |
| data_request.additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| days_back_fetch | The amount of days to fetch back in the first request | Optional | 1 (day) |
| scrape_interval | Time interval to wait between runs (unit: `minutes`) | Optional | 1 (minute) |
| Parameter Name | Description | Required/Optional | Default |
|-----------------------|----------------------------------------------------------------------|-------------------|-------------------|
| name | Name of the API (custom name) | Optional | `azure api` |
| azure_ad_tenant_id | The Azure AD Tenant id | Required | - |
| azure_ad_client_id | The Azure AD Client id | Required | - |
| azure_ad_secret_value | The Azure AD Secret value | Required | - |
| date_filter_key | The name of key to use for the date filter in the request URL params | Optional | `createdDateTime` |
| data_request.url | The request URL | Required | - |
| additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| days_back_fetch | The amount of days to fetch back in the first request | Optional | 1 (day) |
| scrape_interval | Time interval to wait between runs (unit: `minutes`) | Optional | 1 (minute) |

</details>

Expand All @@ -151,18 +151,18 @@ For Azure Graph, use type `azure_graph` with the below parameters.
For Azure Mail Reports, use type `azure_mail_reports` with the below parameters.

## Configuration Options
| Parameter Name | Description | Required/Optional | Default |
|--------------------------------|-----------------------------------------------------------------------------|-------------------|-------------|
| name | Name of the API (custom name) | Optional | `azure api` |
| azure_ad_tenant_id | The Azure AD Tenant id | Required | - |
| azure_ad_client_id | The Azure AD Client id | Required | - |
| azure_ad_secret_value | The Azure AD Secret value | Required | - |
| start_date_filter_key | The name of key to use for the start date filter in the request URL params. | Optional | `startDate` |
| end_date_filter_key | The name of key to use for the end date filter in the request URL params. | Optional | `EndDate` |
| data_request.url | The request URL | Required | - |
| data_request.additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| days_back_fetch | The amount of days to fetch back in the first request | Optional | 1 (day) |
| scrape_interval | Time interval to wait between runs (unit: `minutes`) | Optional | 1 (minute) |
| Parameter Name | Description | Required/Optional | Default |
|-----------------------|-----------------------------------------------------------------------------|-------------------|-------------|
| name | Name of the API (custom name) | Optional | `azure api` |
| azure_ad_tenant_id | The Azure AD Tenant id | Required | - |
| azure_ad_client_id | The Azure AD Client id | Required | - |
| azure_ad_secret_value | The Azure AD Secret value | Required | - |
| start_date_filter_key | The name of key to use for the start date filter in the request URL params. | Optional | `startDate` |
| end_date_filter_key | The name of key to use for the end date filter in the request URL params. | Optional | `EndDate` |
| data_request.url | The request URL | Required | - |
| additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| days_back_fetch | The amount of days to fetch back in the first request | Optional | 1 (day) |
| scrape_interval | Time interval to wait between runs (unit: `minutes`) | Optional | 1 (minute) |


</details>
Expand All @@ -181,6 +181,7 @@ For structuring custom general Azure API calls use type `azure_general` API with
| azure_ad_client_id | The Azure AD Client id | Required | - |
| azure_ad_secret_value | The Azure AD Secret value | Required | - |
| data_request | Nest here any detail relevant to the data request. (Options in [General API](./src/apis/general/README.md)) | Required | - |
| additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| days_back_fetch | The amount of days to fetch back in the first request | Optional | 1 (day) |
| scrape_interval | Time interval to wait between runs (unit: `minutes`) | Optional | 1 (minute) |

Expand Down
33 changes: 17 additions & 16 deletions src/apis/azure/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,30 @@ Below fields are relevant for **all Azure API types**
| azure_ad_client_id | The Azure AD Client id | Required | - |
| azure_ad_secret_value | The Azure AD Secret value | Required | - |
| data_request | Nest here any detail relevant to the data request. (Options in [General API](../general/README.md)) | Required | - |
| additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| days_back_fetch | The amount of days to fetch back in the first request | Optional | 1 (day) |
| scrape_interval | Time interval to wait between runs (unit: `minutes`) | Optional | 1 (minute) |

## Azure Graph
By default `azure_graph` API type has built in pagination settings and sets the `response_data_path` to `value` field.
The below fields are relevant **in addition** to the required ones listed under Azure General.

| Parameter Name | Description | Required/Optional | Default |
|--------------------------------|----------------------------------------------------------------------|-------------------|-------------------|
| date_filter_key | The name of key to use for the date filter in the request URL params | Optional | `createdDateTime` |
| data_request.url | The request URL | Required | - |
| data_request.additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| Parameter Name | Description | Required/Optional | Default |
|-------------------|----------------------------------------------------------------------|-------------------|-------------------|
| date_filter_key | The name of key to use for the date filter in the request URL params | Optional | `createdDateTime` |
| data_request.url | The request URL | Required | - |
| additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |

## Azure Mail Reports
By default `azure_mail_reports` API type has built in pagination settings and sets the `response_data_path` to `d.results` field.
The below fields are relevant **in addition** to the required ones listed under Azure General.

| Parameter Name | Description | Required/Optional | Default |
|--------------------------------|-----------------------------------------------------------------------------|-------------------|-------------|
| start_date_filter_key | The name of key to use for the start date filter in the request URL params. | Optional | `startDate` |
| end_date_filter_key | The name of key to use for the end date filter in the request URL params. | Optional | `EndDate` |
| data_request.url | The request URL | Required | - |
| data_request.additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |
| Parameter Name | Description | Required/Optional | Default |
|-----------------------|-----------------------------------------------------------------------------|-------------------|-------------|
| start_date_filter_key | The name of key to use for the start date filter in the request URL params. | Optional | `startDate` |
| end_date_filter_key | The name of key to use for the end date filter in the request URL params. | Optional | `EndDate` |
| data_request.url | The request URL | Required | - |
| additional_fields | Additional custom fields to add to the logs before sending to logzio | Optional | - |

## Example

Expand All @@ -52,9 +53,9 @@ apis:
azure_ad_secret_value: <<AZURE_AD_SECRET_VALUE>>
data_request:
url: https://graph.microsoft.com/v1.0/auditLogs/signIns
additional_fields:
type: azure_graph
field_to_add_to_my_logs: 123
additional_fields:
type: azure_graph
field_to_add_to_my_logs: 123
scrape_interval: 1
days_back_fetch: 30

Expand All @@ -65,8 +66,8 @@ apis:
azure_ad_secret_value: <<AZURE_AD_SECRET_VALUE>>
data_request:
url: https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace
additional_fields:
type: azure_mail_reports
additional_fields:
type: azure_mail_reports
scrape_interval: 60 # for mail reports we suggest no less than 60 minutes
days_back_fetch: 8 # for mail reports we suggest up to 8 days

Expand Down

0 comments on commit c56c410

Please sign in to comment.