Our next-gen architecture is built to help you make sense of your ever-growing data Watch a 4-min demo video!

Back to All Docs

Coralogix Actions Coralogix Actions

Last Updated: Aug. 06, 2023

Coralogix provides you with an easy way to trigger third-party services based on your search results and/or values under specific keys.

Create an Action

STEP 1. In your Coralogix navigation pane, click on Explore > Logs screen page.

STEP 2. Click on Settings in upper right-hand corner. In the drop-down menu, select MANAGE ACTIONS.

STEP 3. A pop-up window, containing a list of defined Actions, will be displayed. If the list is empty, it will open a new Untitled Action.

STEP 4. If this is not your first Action, click on the + ADD NEW ACTION button to define a new Action.

STEP 5. Name the new Action within the Untitled Action pop-up.

STEP 6. In the URL field, add the URL for the external tool. Here is an example: https://test-my-url.com?type={{ $m.subsystemName === “frontend” ? “Front” : “Back” }}.

When you input curly brackets {{}}, a drop-down results menu will appear with 3 types of possible variables: $p, $m, $d.

VariableDescription
$pVariables which can be used with any log (START_DATE, END_DATE, SELECTED_VALUE)
$mCoralogix metadata fields (applicationName, subsystemName, severity, etc.)
$dSelected log

Notes:

  • Your URL must begin with ‘http://’ OR ‘https://’. Any other URL structure will trigger a message instructing you to add this.
  • Javascript syntax is supported for “Actions” when you type your code in the brackets. For example, one might use the if-else condition as follows: {{ condition ? “true value” : “false value” }}.
  • We support nearly all Javascript functions.

STEP 7. [Optional] Advanced. Make the Action available only for specific applications and/or subsystems. Share it with your teammates by activating the Make public when saved toggle button.

STEP 8. Click on the RESET button to clear the entered data. To save your data, click on SAVE ACTION.

Manage Custom Actions

STEP 1. In your Coralogix navigation pane, click on Explore > Logs screen page.

STEP 2. Click on Settings in upper right-hand corner. In the drop-down menu, select MANAGE ACTIONS.

STEP 3. A pop-up window, containing a list of defined Actions, will be displayed.

STEP 4. Take any of the following 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.
  • 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

STEP 1. In your Coralogix navigation pane, click on Explore > Logs screen page.

STEP 2. Define a query.

STEP 3. 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.
Plugin list under (...)
Plugin list under the value menu

Once the Action is chosen, the defined URL will be open in new tab.

Examples

Use this set of examples to guide you.

Jira bug Action

http://<company_name>.atlassian.net//secure/CreateIssueDetails!init.jspa?pid=<Jira_PID>&issuetype=<Jira_issueType>&description={{$d.logRecord.body}}&summary={{$d.msg}}

Query logs based on a key in the logs

https://<team_name>.app.coralogix.us/#/query-new/logs?query=<key>%3A%22{{$d.<key>}}%22&time=from:{{$p.start_date}},to:{{$p.end_date}}

Query spans based on a key in the logs

https://<team_name>.app.coralogix.us/#/query-new/tracing?query=<spans_key>:%22{{$d.<logs_key>}}%22&time=from:{{$p.start_date}},to:{{$p.end_date}}&page=0&onlyRootSpans=false&tracingTableView=spans

Jump to Grafana dashboard with filter from a key in the log

https://<team_name>.app.coralogix.us/#/grafana/d/WhANBmU4k/<grafana_dashboard_name>?orgId=342&var-<grafana_filter_name>={{$d.<log_key>}}

Support

Need help?

Our world-class customer success team is available 24/7 to answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].

On this page