Skip to content

Commit 2619176

Browse files
authored
Macro doc update (#4970)
* Macro doc update * Macro docs update
1 parent cc62513 commit 2619176

File tree

1 file changed

+14
-3
lines changed
  • docs/search/search-query-language/search-operators

1 file changed

+14
-3
lines changed

docs/search/search-query-language/search-operators/macro.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To use the `macro` operator, reference it in your query with backticks (``). Mac
2121

2222
:::note
2323
- Only **Administrators** and **Users** with access to **Query Reference** can run queries using macros.
24-
- Only users with **Administrator** access can create macros.
24+
- Only users with **Manage Macro** capability can create macros.
2525
:::
2626

2727
## Syntax
@@ -34,7 +34,7 @@ To use the `macro` operator, reference it in your query with backticks (``). Mac
3434

3535
To create a macro, follow the steps below:
3636

37-
1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**. <br/> [**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**.
37+
1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**. <br/> [**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**.
3838
1. Click **+ Add Macro**.<br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/macro-logs-page.png')} alt="macro-logs-page" style={{border: '1px solid gray'}} width="800" />
3939
1. Or, in the log search page, select the part of search query language that needs to be reused and click on **Create Macro**.<br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/macro-search-page.png')} alt="macro-search-page" style={{border: '1px solid gray'}} width="800" />
4040
1. **Macro Details**. Enter the name for the macro. Description is optional.
@@ -49,6 +49,17 @@ To create a macro, follow the steps below:
4949
- You can create a maximum of 50 macros.
5050
- You can add a maximum of 5 arguments.
5151
- You cannot edit or delete the macro. Submit a customer request to Sumo Logic if you still need to edit or delete a macro.
52+
- You are only allowed to use single expression.
53+
- You can only use the below listed argument validations:
54+
- `isValidIpV4`
55+
- `contains`
56+
- `isNumeric`
57+
- `isPrivateIP`
58+
- `isPublicIP`
59+
- `isValidIP`
60+
- `isReservedIP`
61+
- `isValidIPv4`
62+
- `isValidIPv6`
5263

5364
### Example without arguments
5465

@@ -86,6 +97,6 @@ _sourceCategory=error | `timeslice_macro(<arg1_value>)`
8697

8798
To view any existing macro, follow the steps below:
8899

89-
1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**. <br/> [**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**.
100+
1. [**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**. <br/> [**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**.
90101
1. In the **Macros** page, click on any of the macros that you want to view the macro details.<br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/view-macro-logs-page.png')} alt="macro-logs-page" style={{border: '1px solid gray'}} width="800" />
91102
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. <br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/view-macro-logs-details.png')} alt="view-macro-logs-details" style={{border: '1px solid gray'}} width="400" />

0 commit comments

Comments
 (0)