20c/vaping

Example for plugins.commands?

penguin02007 opened this issue · 1 comments

Not sure if this is the right place to ask question - Is there an example on plugins.commands how to connect to a device and run ping commands? Basically I am trying to reproduce this feature:

https://oss.oetiker.ch/smokeping/probe/OpenSSHJunOSPing.en.html

vegu commented

Hi

Sorry for the delayed response, somehow this was missed. There currently is no example for direct use of the commands plugin. But the fping plugin extends it and can perhaps provide some pointers.

  • the command property takes a single command that will executed for each target host in the config, at the specified interval
  • the current host is available as a formatting variable called {host}
  • since it only supports a single command to do anything sophisticated you will either need to use a shell script that the command can call or do a custom plugin that does what you need.

If you do end up giving a custom plugin a go and run into problems please don't hesitate to ask for help.