running polling commands from automations

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

running polling commands from automations

L3 Networker

opsgenie-get-request is a polling command but when it is being run from an automation it results in an error. From CLI or through playbook tasks, the output returns to the war room once it finishes. That's doesn't seem to be the case in automations. Item not found (8) error is thrown with polling commands (polling: True on .yml file). Looking closely at the logs I came across the following

 

2023-04-25 13:04:32.2233 error command opsgenie-get-request was not found in module [error 'Item not found (8)'] (source: /builds/GOPATH/src/gitlab.xdr.pan.local/xdr/xsoar/server/services/investigation.go:1664)

 

Is this a bug? How can I run this command in an automation safely without having to create another task?

1 accepted solution

Accepted Solutions

L3 Networker

I resolved the issue by polling my own automation when received a polling result from a command. I believe this is the intended behavior.

 

https://xsoar.pan.dev/docs/integrations/scheduled-commands#how-to-use-with-demistoexecutecommand

 

View solution in original post

4 REPLIES 4

L3 Networker

As long as polling: true is in the YML it should work. You would receive a different error saying that the automation doesn't support polling if that was the issue. I tested using the opsgenie-get-request command in a custom automation and was able to successfully retrieve the request. I was able to duplicate the behavior though by putting in an invalid request ID. If the request ID was invalid, I would get the Item not found (8) error but as soon as I used a valid request ID it would work. I would also double check and confirm that you are on the latest integration version. The latest version of the content pack is 2.0.13 4771215 and the version of the integration is v3. Thanks!

Item not found error is not sent from the integration. The error you received is the same which is mentioned in my post.

L3 Networker

opsgenie-get-request schedules command execution when it receives error response from the server. Only in this case it sends a scheduled command and here I am having the error. If the command cannot pull the alert in its initial fetch, the automation fails with

error command opsgenie-get-request was not found in module [error 'Item not found (8)'] 

 

L3 Networker

I resolved the issue by polling my own automation when received a polling result from a command. I believe this is the intended behavior.

 

https://xsoar.pan.dev/docs/integrations/scheduled-commands#how-to-use-with-demistoexecutecommand

 

  • 1 accepted solution
  • 1639 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!