From 62d74e2091a5aa65df1f603705eff509f8c26b4d Mon Sep 17 00:00:00 2001 From: Jagadisha V <129049263+JV0812@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:58:40 +0530 Subject: [PATCH 1/2] Macro doc update --- .../search-operators/macro.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/search/search-query-language/search-operators/macro.md b/docs/search/search-query-language/search-operators/macro.md index 8eaf44a17f..e722dda6ca 100644 --- a/docs/search/search-query-language/search-operators/macro.md +++ b/docs/search/search-query-language/search-operators/macro.md @@ -21,7 +21,7 @@ To use the `macro` operator, reference it in your query with backticks (``). Mac :::note - Only **Administrators** and **Users** with access to **Query Reference** can run queries using macros. -- Only users with **Administrator** access can create macros. +- Only users with **Manage Macro** capability can create macros. ::: ## Syntax @@ -34,7 +34,7 @@ To use the `macro` operator, reference it in your query with backticks (``). Mac To create a macro, follow the steps below: -1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
[**New UI**](/docs/get-started/sumo-logic-ui/). In the top menu, select **Manage Date**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**. +1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
[**New UI**](/docs/get-started/sumo-logic-ui/). In the top menu, select **Manage Data**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**. 1. Click **+ Add Macro**.
macro-logs-page 1. Or, in the log search page, select the part of search query language that needs to be reused and click on **Create Macro**.
macro-search-page 1. **Macro Details**. Enter the name for the macro. Description is optional. @@ -49,6 +49,16 @@ To create a macro, follow the steps below: - You can create a maximum of 50 macros. - You can add a maximum of 5 arguments. - You cannot edit or delete the macro. Submit a customer request to Sumo Logic if you still need to edit or delete a macro. +- You can only use the below listed argument validations: + - `isValidIpV4` + - `contains` + - `isNumeric` + - `isPrivateIP` + - `isPublicIP` + - `isValidIP` + - `isReservedIP` + - `isValidIPv4` + - `isValidIPv6` ### Example without arguments @@ -86,6 +96,6 @@ _sourceCategory=error | `timeslice_macro()` To view any existing macro, follow the steps below: -1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
[**New UI**](/docs/get-started/sumo-logic-ui/). In the top menu, select **Manage Date**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**. +1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
[**New UI**](/docs/get-started/sumo-logic-ui/). In the top menu, select **Manage Data**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**. 1. In the **Macros** page, click on any of the macros that you want to view the macro details.
macro-logs-page 1. To use the selected macro in your log search query, copy the suggested **Usage** of the macro and include it in your query syntax.
view-macro-logs-details From 7c5059f6e06d041ab87f6550784877e38d06552a Mon Sep 17 00:00:00 2001 From: Jagadisha V <129049263+JV0812@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:37:09 +0530 Subject: [PATCH 2/2] Macro docs update --- docs/search/search-query-language/search-operators/macro.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/search/search-query-language/search-operators/macro.md b/docs/search/search-query-language/search-operators/macro.md index e722dda6ca..f4b86cc049 100644 --- a/docs/search/search-query-language/search-operators/macro.md +++ b/docs/search/search-query-language/search-operators/macro.md @@ -49,6 +49,7 @@ To create a macro, follow the steps below: - You can create a maximum of 50 macros. - You can add a maximum of 5 arguments. - You cannot edit or delete the macro. Submit a customer request to Sumo Logic if you still need to edit or delete a macro. +- You are only allowed to use single expression. - You can only use the below listed argument validations: - `isValidIpV4` - `contains`