Am I able to use fieldnames as variables in webhooks?



  • Official comment
    Nick Wilson

    Hi Jan & Jas,

    This is actually a feature that our team is working on now and should be available soon. Please see this feature request for more information:

    If I've misunderstood your request, or you have any other questions please let me know.

    Nick Wilson
    Customer Success Manager, Sumo Logic

    Comment actions Permalink
  • Avatar
    Mario Sanchez
    Jas,Although you cannot specifically call out the field names, you can include the results of your scheduled search into the webhook alert: Cheers,Mario
    Comment actions Permalink
  • Avatar
    Jan Deelstra

    For example, it means my pager duty now has a description like this: `[{"ident":"sudo","message":"pam_unix(sudo:auth): authentication failure; logname=....` while my query in sumologic returns: `Failed sudo from: 'user' on 'hostname'`. (I could live with `[{"error": "Failed sudo from: 'user' on 'hostname'"}]`.

    Basically this means that every time we get paged from pagerduty, we need to go into sumologic to check what exactly is going on. 

    Only way to fix this is to build some intermediate service that parses what is being returned?


    Comment actions Permalink
  • Avatar
    Paul Hirschorn

    Jan - we're facing the same issue and we're trying to work it out as well.   

    One option with PagerDuty is to use the custom event transforms, these are only compatible with the V1 Event API ( You can write your own handler in javascript and fix the fields to your liking.  

    If you only want to see certain data and you're sort of ok with the format of `[{"error": "Failed sudo from: 'user' on 'hostname'"}]`.

    It's a bit more work but you can play with the fields as well to customize your errors, concat or format a few fields ( /  and remove all fields except your concat field.  (

    Granted, this is quite a bit of work it does get you to where you're trying to be.  




    Comment actions Permalink
  • Avatar
    Nick Wilson

    Hi Paul,

    I just want to make sure you saw my reply above which cited this enhancement request which is currently in beta:

    I believe one of our product managers is still looking for customers to beta test this feature. You can email him directly to request to be added and discuss the functionality further. Look for his post on that page including his email address.

    If I misunderstood your requirements please feel free to reply back and let me know.

    Customer Success, Sumo Logic

    Comment actions Permalink
  • Avatar
    Perry Ogwuche

    Hi Nick Wilson, was this feature ever released? It seems like I am able to send certain fields from my search result as payload variables (specifically to Pager Duty). However, when I try to parse certain fields from my search result so I can do something like: {{Result.field_name}} in my payload, it doesn't seem to work quite well.

    Specifically, the issue I am having is this:

    I am trying to access a nested Results field in Sumo and have it sent as part of my payload via a Webhook to Pager Duty. 

    In Sumo, as part of the Result of a search, I have a message field, _sourceName field etc which I can easily access by doing Results.message or Results._sourceName.

    However, when I have something like this as part of Result

    error: {
    code: 123,
    meta: { id: 112 }

    I am not able to do Results.error.code

    I modified the search to copy the desired fields into new fields that have a field name with no dots. e.g. parse field=%"error.code" as error_code, so I can do something like: {{Results.error_code}} in my payload but for some reason that doesn't work consistently. 

    It doesn't work when my search looks something like this:

    | json auto
    | parse field=%"error.code" "*" as error_code nodrop

    But works when I have something like:

    | json "error.code" as  error_code, nodrop

    Seems like it doesn't like when I combine the use of json auto and try to parse individual fields. 

    I hope this makes sense. Any suggestion for this?

    Comment actions Permalink

Please sign in to leave a comment.