Coralogix provides you an easy way to trigger 3rd party services/websites based on your search results and/or values under specific keys. It will allow you to use your external tools and pass to them values and/or filters with one click, for example, to Grafana or to any other service where you can narrow your investigation.
Create an Action
Open the Logs screen page.
Click on Settings in the top right corner and then on Manage Actions Configurations at the bottom.
A pop-up window will be displayed. It contains the list of defined Actions or if the list is empty it will open a new Untitled Action.
Click on the +ADD NEW ACTION button to define a new Action if it is not the first action.
Name the new Action within the Untitled Action pop-up.
In the URL field add the url for the external tool.
When you start typing the curly brackets in {{}} you will see the hints list. There are 3 types of variables:
$p – variables which can be used with any log (START_DATE, END_DATE, SELECTED_VALUE)
Javascript syntax is supported for “Actions”: You can utilize the power of JS by typing your code in the brackets. You can, for instance, use if-else condition as follows: {{ “value if true” if Condition else “value if false” }}.
Example: https://test-my-url.com?type={{ “Front” if $m.subsystemName==”frontend” else “Back” }}
**Please note: While typing in the Url, make sure it starts with ‘http://’ OR ‘https://’. Any other structure of Url will trigger a message telling you you must add it to the Url.
Example URL:
In the Advanced option you can make the Action available only for specific Applications and/or Subsystems and also you can share it with your team mates by clicking on Make Public when saved.
Click on the Reset button to clear the entered data or on the SAVE ACTION button to save it.
Manage Custom Actions
Open Logs screen page.
Click on Settings in the top right corner and then on Manage Actions Configurations at the bottom.
A pop-up window will be displayed. It contains a list of defined Actions.
Available Actions:
Click on the rectangle icon next to each Action to clone the action to easily edit it and save it under new name.
Click on the eye icon next to each Action to disable/enable the action.
Click on the arrow button next to each Action to edit or delete it.
Click on the +ADD NEW ACTION button to define a new Action (see the section Create an Action).
Click on the group of small gray rectangles on the left side of an Action name to move it and set the right order inside each section Private / Shared.
Custom Action Usage
Open the Logs page and define your query.
Trigger the Action by:
Clicking on (…) next to the specific log or on the JSON key. Only Actions are visible which don’t contain “$p.SELECTED_VALUE” variable in the URL definition)
Clicking on a value will list all defined Actions (including Actions which contain “$p.SELECTED_VALUE” variable in the URL definition). If the Action is defined with “$p.SELECTED_VALUE” then the value from that JSON key will be passed.
Once the Action is chosen, the defined URL will be open in new tab.