Skip to content

Commit 816c0e4

Browse files
JV0812jpipkin1
andauthored
Macro operator update (#5976)
* Macro operator update * Update docs/search/search-query-language/search-operators/macro.md Co-authored-by: John Pipkin (Sumo Logic) <[email protected]> * Update docs/search/search-query-language/search-operators/macro.md Co-authored-by: John Pipkin (Sumo Logic) <[email protected]> * Update docs/search/search-query-language/search-operators/macro.md Co-authored-by: John Pipkin (Sumo Logic) <[email protected]> * Update docs/search/search-query-language/search-operators/macro.md Co-authored-by: John Pipkin (Sumo Logic) <[email protected]> * Update macro.md --------- Co-authored-by: John Pipkin (Sumo Logic) <[email protected]>
1 parent f3804cf commit 816c0e4

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

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

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ To create a macro, follow the steps below:
3939
1. [**New UI**](/docs/get-started/sumo-logic-ui/). In the main Sumo Logic menu, select **Data Management**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**.<br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
4040
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" />
4141
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" />
42-
1. **Macro Details**. Enter the name for the macro. Description is optional.
43-
1. **Macro Definition**. Enter the definition for the macro. To add arguments use the `{{Arg}}` syntax or select a part of the definition and click on **Add Argument**.
44-
1. (Optional) **Arguments**. Enter the name and select the data type for the argument selected.
45-
1. (Optional) **Argument Validation**. Define the validation condition and enter the error message that needs to be shown when the validation expression returns false.
46-
1. **Usage**. Preview of how you use the macro in the log search.
47-
1. Click **Submit** to save the macro.
42+
1. In the **Create Macro** page, enter the following details: <br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/create-macro.png')} alt="create-macro" style={{border: '1px solid gray'}} width="800" />
43+
1. **Macro Details**. Enter the name for the macro. Description is optional.
44+
1. **Macro Definition**. Enter the definition for the macro. To add arguments use the `{{Arg}}` syntax or select a part of the definition and click on **Add Argument**.
45+
1. (Optional) **Arguments**. Enter the name and select the data type for the argument selected.
46+
1. (Optional) **Argument Validation**. Define the validation condition and enter the error message that needs to be shown when the validation expression returns false.
47+
1. **Usage**. Preview of how you use the macro in the log search.
48+
1. Click **Submit** to save the macro.
4849

4950
### Limitations
5051

5152
- You can create a maximum of 50 macros.
5253
- You can add a maximum of 5 arguments.
53-
- You cannot edit or delete the macro. Submit a customer request to Sumo Logic if you still need to edit or delete a macro.
5454
- You are only allowed to use single expression.
5555
- You can only use the below listed argument validations:
5656
- `isValidIpV4`
@@ -110,3 +110,18 @@ To view any existing macro, follow the steps below:
110110
1. [**New UI**](/docs/get-started/sumo-logic-ui/). In the main Sumo Logic menu, select **Data Managemenu**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**.<br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
111111
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" />
112112
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" />
113+
114+
## Edit a macro operator
115+
116+
1. [**New UI**](/docs/get-started/sumo-logic-ui/). In the main Sumo Logic menu, select **Data Management**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**.<br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
117+
1. In the **Macros** page, click on any of the macros that you want to edit.<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" />
118+
1. Click **Edit** button to open the pane for editing. <br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/macro-edit-button.png')} alt="macro-delete-pop-up" style={{border: '1px solid gray'}} width="400" />
119+
1. In the **Edit [macroname] macro** pop-up, click on **Continue**. You can also check where your macros have been used to avoid broken queries by clicking on **check queries that reference this macro**. <br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/macro-edit-pop-up.png')} alt="macro-delete-pop-up" style={{border: '1px solid gray'}} width="400" />
120+
1. In the macro editing pane, perform the required editing and click **Submit**.
121+
122+
## Delete a macro operator
123+
124+
1. [**New UI**](/docs/get-started/sumo-logic-ui/). In the main Sumo Logic menu, select **Data Management**, and then under **Logs**, select **Macros**. You can also click the **Go To...** menu at the top of the screen and select **Macros**.<br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data** > **Logs** > **Macros**.
125+
1. In the **Macros** page, click on any of the macros that you want to delete.<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" />
126+
1. Click **Delete** button to delete the macro. <br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/macro-delete-button.png')} alt="macro-delete-button" style={{border: '1px solid gray'}} width="400" />
127+
1. In the **Delete [macroname] macro** pop-up, click on **Delete**. You can also check where your macros have been used to avoid broken queries by clicking on **check queries that reference this macro**. <br/><img src={useBaseUrl('img/search/searchquerylanguage/search-operators/macro-delete-pop-up.png')} alt="macro-delete-pop-up" style={{border: '1px solid gray'}} width="400" />
212 KB
Loading
71.2 KB
Loading
43.9 KB
Loading
71.7 KB
Loading
36.5 KB
Loading

0 commit comments

Comments
 (0)