-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metaconfig/hnormalise: Add basic config test
Based on example config from https://github.com/hpcugent/hnormalise/blob/master/data/hnormalise.yaml
- Loading branch information
James Adams
committed
Jul 20, 2023
1 parent
012a262
commit 6606423
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
ncm-metaconfig/src/main/metaconfig/hnormalise/tests/profiles/config.pan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
object template config; | ||
|
||
include 'metaconfig/hnormalise/config'; | ||
|
||
prefix "/software/components/metaconfig/services/{/etc/hnormalise.yaml}/contents"; | ||
|
||
"logging" = dict( | ||
"frequency", 100000, | ||
); | ||
|
||
"input" = dict( | ||
"zeromq", dict( | ||
"method", "pull", | ||
"host", "lo", | ||
"port", 31338, | ||
), | ||
); | ||
|
||
"output" = dict( | ||
"zeromq", dict( | ||
"success", dict( | ||
"method", "push", | ||
"host", "localhost", | ||
"port", 27001, | ||
), | ||
"failure", dict( | ||
"method", "push", | ||
"host", "localhost", | ||
"port", 27002, | ||
), | ||
), | ||
); | ||
|
||
"fields" = list( | ||
list("@source_host", "hostname"), | ||
list("message", "msg"), | ||
list("syslog_version", "version"), | ||
list("syslog_abspri", "pri"), | ||
list("program", "app_name"), | ||
); |
32 changes: 32 additions & 0 deletions
32
ncm-metaconfig/src/main/metaconfig/hnormalise/tests/regexps/config/base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Base test for config | ||
--- | ||
/etc/hnormalise.yaml | ||
--- | ||
^fields:$ | ||
^- - '@source_host'$ | ||
^ - hostname$ | ||
^- - message$ | ||
^ - msg$ | ||
^- - syslog_version$ | ||
^ - version$ | ||
^- - syslog_abspri$ | ||
^ - pri$ | ||
^- - program$ | ||
^ - app_name$ | ||
^input:$ | ||
^ zeromq:$ | ||
^ host: lo$ | ||
^ method: pull$ | ||
^ port: 31338$ | ||
^logging:$ | ||
^ frequency: 100000$ | ||
^output:$ | ||
^ zeromq:$ | ||
^ failure:$ | ||
^ host: localhost$ | ||
^ method: push$ | ||
^ port: 27002$ | ||
^ success:$ | ||
^ host: localhost$ | ||
^ method: push$ | ||
^ port: 27001$ |