Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to run linux.netstat action with arguments #4946

Closed
scguoi opened this issue May 13, 2020 · 1 comment · Fixed by #4947
Closed

how to run linux.netstat action with arguments #4946

scguoi opened this issue May 13, 2020 · 1 comment · Fixed by #4947
Labels

Comments

@scguoi
Copy link

scguoi commented May 13, 2020

PLEASE READ: If you are a paid Extreme Workflow (EWC) customer, please contant Extreme
Network GTAC

or send an email to [email protected]

For free community support, please use out forum at https://forum.stackstorm.com

I try to run linux.netstat action with args, but result are error as follow.

$ st2 run linux.netstat hosts=172.31.114.68 args="-antp"
ERROR: 'type'

@Sheshagiri
Copy link
Contributor

looks like type attribute is missing for netstat action. I hope #4947 will fix that permanently.

In the meantime, you can add the type attribute and re-register the Linux pack and that should fix the issue.
update /opt/stackstorm/packs/linux/actions/netstat.yaml to

---
  name: "netstat"
  runner_type: "remote-shell-cmd"
  description: "Run netstat"
  enabled: true
  entry_point: ""
  parameters:
    cmd:
      immutable: true
      default: "netstat {{args}}"
    args:
      description: "Command line arguments"
      default: " "
      type: "string"

and re-register the Linux pack using the following command

st2 pack register linux

This should resolve the issue for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants