This is a plugin which can ping an IP/Host using the Net::Ping module.
Currently this takes 3 parameters: host, wait (time to wait for response, defaults to 5s), and format (with a default format). It's a single ping (i.e. I don't foresee adding support for
count ). Simple.
One thing I want is to have it handle other plugin variables in the
format parameters, like
format="$percntCALC{$IF($EXACT($result,1),$host good,$host bad)}$percnt" , but it doesn't (re-)process it. How do I make TWiki re-analyze the data, other than by plugin order?
expandCommonVariables only expands common variables
--
AaronLWalker - 2012-06-07
I currently only have a single
format for the result. Would it be preferable to have a
success format and
failure format? Then what to do if they only specify one...
--
AaronLWalker - 2012-06-07
If you write
format="%CALC{...}%" it will evaluate once before the PING variable, not what you want. If your write
format="$percntCALC{...}$percnt", nothing happens because
$percnt is not evaluated. That var is resolved case by case, such as in IF's then and else, and in SEARCH'es format. That is, you need to handle that in your plugin explicitly at the end of the format handling.
--
PeterThoeny - 2012-06-07
On multiple formats, how about single format and an onerror parameter? That way users can customize the error message, such as:
onerror="| %RED% $error %ENDCOLOR% |"
--
PeterThoeny - 2012-06-07