ContributionsMost RecentMost LikesSolutionsRe: SDTing via API, one source work the other does not Taking this suggestion I replaced the :" with %3A%22 and the trailing " with another %22. This time the call looks like it might have been sent. I need to add a couple more audit log actions. But it's a solid maybe! Re: SDTing via API, one source work the other does not Oh wait! I lied! I have a rule that's sending a web request to LM that ACK's an alert that's using a var in the url.. but it's not a filter query. https://xxxx.logicmonitor.com/santaba/rest/alert/alerts/{{LMalertID}} Re: SDTing via API, one source work the other does not So in a Jira automation rule there isn't 'code' in the traditional sense of the word. It's all visual like the application Tines. This might help: https://imgur.com/a/oK61qK8 So what happens is there's a manual trigger, if the servicename == logicmonitor on the Incident in question then create a var: lmalertid from field 'issue.labels', print that to the audit log. Create a second var: deviceHostname from 'issue.customfield_20574', which is supplied from the ##host## token when the custom http delivery Active rule is triggered from LM. Next we print that deviceHostname to the audit log, then send the first web request. The URL is https://xxxx.logicmonitor.com/santaba/rest/device/devices?filter=name:"{{deviceHostname}}*".The HTTP method is GET, with no body, and the following headers: Content-Type:application/json Authorization:Bearer <token> X-Version:3 Cache-Control:no-cache User-Agent:Jira/JSM Accept:/ Accept-Encoding:gzip, deflate, br So provided LM sends the ##host## token, which defines the customfield_20574, and the rule can use that field to define {{deviceHostname}} and the URL is correctly formatted then it will throw the value of deviceHostname into the filter and send it. I have other rules that successfully send these Jira variables in the body.. this is the first one I've tried using them in the URL. Re: SDTing via API, one source work the other does not Hmm so that 'translates' to {{deviceHostname}}* at the destination however it would not work in a Jira 'Send web request' URL with a variable in the url string. So the var won't get defined but instead passed as-is. I noticed Postman will send that encodes value as readily as the prior (name:"name-here*"). Any chance a filter can be part of the body? Re: SDTing via API, one source work the other does not As a test I removed the dbl-quotes, 'Invalid filter'.. same as what Postman says if I do the same. Re: SDTing via API, one source work the other does not I was kinda hoping someone would offer a suggestion on who to give the Solution to ;) Also wanted to come back.. I've encountered another small thing that directly related to this. I've added the call I mentioned earlier that gets the deviceId value from ../rest/device/devices?filter=name:"{{var1}}*" except Jira claims :Illegal character in query at index 72 The URL sent is: https://xxxxxx.logicmonitor.com/santaba/rest/device/devices?filter=name~"new-hostaa01.xxxx.net*" I've sanitized but maintained the number of characters.. Its complaining about the tilde, I tried replacing it with the colon but it generated the same error on the same character. Exact same call from Postman (like earlier) works. X-Version:3 header in both. Re: SDTing via API, one source work the other does not Well shoot, you can't pick more than one solution. The Action in Jira is working now! I can set a 1 hour SDT on a specific device! plus I can remove the 4 steps I had to calculate epoch in milliseconds because duration works. However I do have to add a step to GET the ID integer of the device. Either way though, it's working. Thank you guys! Re: SDTing via API, one source work the other does not It's working from Postman now.. resourceSDT and deviceId were the key. Also you can leave out the epoch fields and just use duration, it worked for me just now. Re: SDTing via API, one source work the other does not Ha! Yeah I'd think it'd be important to include 'deviceId' in the swagger docs. My main skill set is not developer related so I rarely think about dev tools like that. Good call. Re: SDTing via API, one source work the other does not So ResourceSDT, I don't see an obvious next field to define which resource. Looks like, perhaps, you can ignore the epoch time stuff and maybe specify a duration too?
Top ContributionsRe: SDTing via API, one source work the other does notMonitoring HAProxy?SDTing via API, one source work the other does notRe: SDTing via API, one source work the other does notBig Number widget showing a date?Monitoring a CRL (certificate revocation list)Re: Monitoring HAProxy?Re: Big Number widget showing a date?Re: Big Number widget showing a date?Re: Big Number widget showing a date?