diff options
author | zsdc <taras@vyos.io> | 2022-06-07 14:34:49 +0300 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-06-07 12:12:07 +0000 |
commit | 06c0d2f2f9f4b9c97eb9868df166d787ca367ee7 (patch) | |
tree | 4646ea28f7e04e2cbb179763bbf77a47762e4bd3 /interface-definitions | |
parent | 03d236f3905ac84db293d1dab8ac78556fb2bdbf (diff) | |
download | vyos-1x-06c0d2f2f9f4b9c97eb9868df166d787ca367ee7.tar.gz vyos-1x-06c0d2f2f9f4b9c97eb9868df166d787ca367ee7.zip |
event-handler: T3083: Extended event-handler features
* Added the ability to filter by a syslog identifier
* Added the ability to pass arguments to a script
* Added the ability to pass preconfigured environment variables to a script
* A message that triggered a script is now passed in the `message` variable and
can be used in a script
* Replaced `call()` to `run()`, since stdout are not need to be printed
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/service-event-handler.xml.in | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/interface-definitions/service-event-handler.xml.in b/interface-definitions/service-event-handler.xml.in index 3e96013c7..ed6d41d1b 100644 --- a/interface-definitions/service-event-handler.xml.in +++ b/interface-definitions/service-event-handler.xml.in @@ -7,11 +7,23 @@ <help>Event handler name</help> </properties> <children> - <leafNode name="pattern"> + <node name="filter"> <properties> - <help>Match pattern (regex)</help> + <help>Logs filter settings</help> </properties> - </leafNode> + <children> + <leafNode name="pattern"> + <properties> + <help>Match pattern (regex)</help> + </properties> + </leafNode> + <leafNode name="syslog-identifier"> + <properties> + <help>Identifier of a process in syslog (string)</help> + </properties> + </leafNode> + </children> + </node> <node name="script"> <properties> <help>Event handler script file</help> |