Fixes #4416 Implement recipient/endpoint shell script (#4688)

* Fixes #4416 implement shell script endpoint

* removed debugging code

* Removed for windows env
This commit is contained in:
Matteo Biscosi 2020-11-09 16:35:39 +01:00 committed by GitHub
parent a805a0501a
commit cfac78e89e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 275 additions and 0 deletions

View file

@ -0,0 +1,23 @@
--
-- (C) 2020 - ntop.org
--
return {
shell_script = "Script PATH",
shell_options = "Options",
validation = {
empty_path = "Shell script path cannot be empty.",
invalid_path = "Invalid shell script path. The script must be into the directory \"/usr/share/ntopng/\".",
invalid_script = "Invalid script. Script not secure.",
},
shell_send_error = "Error trying to execute the script.",
shell_description = {
path_description = "Instructions:<ul><li>Copy here the path your script is in</ul>Note:<ul><li>The script must be inside \"/usr/share/ntopng/\"<li>The script is going to be called following this pattern \"script -options JSON\" where JSON is a JSON formatted string containing the alarms</lu>",
option_description = "Instructions<ul><li>Insert here the options you want to pass to the script</ul>",
}
}