summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2024-01-11 18:15:18 +0200
committerGitHub <noreply@github.com>2024-01-11 18:15:18 +0200
commit44fa2abdede25d73638816e3cbe9615424b49ebe (patch)
treea585eb034afa8f6d5c0b0965c8b1fbf67e03d370
parent1b3eb5b42fc8b5d04056c49f8b6d94668d913492 (diff)
add schemas to /usr/lib/netdata/conf.d/schema.d (#16757)
-rw-r--r--CMakeLists.txt5
-rw-r--r--collectors/systemd-journal.plugin/schema.d/systemd-journal:monitored-directories.json34
2 files changed, 39 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 640940bc83..5c193b32bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2137,6 +2137,7 @@ install(DIRECTORY DESTINATION etc/netdata/python.d)
install(DIRECTORY DESTINATION etc/netdata/ssl)
install(DIRECTORY DESTINATION etc/netdata/statsd.d)
install(DIRECTORY DESTINATION usr/lib/netdata/conf.d)
+install(DIRECTORY DESTINATION usr/lib/netdata/conf.d/schema.d)
install(DIRECTORY DESTINATION usr/libexec/netdata/plugins.d)
install(DIRECTORY DESTINATION ${WEB_DEST})
@@ -2424,6 +2425,10 @@ install(FILES
collectors/charts.d.plugin/sensors/sensors.conf
DESTINATION usr/lib/netdata/conf.d/charts.d)
+install(FILES
+ collectors/systemd-journal.plugin/schema.d/systemd-journal:monitored-directories.json
+ DESTINATION usr/lib/netdata/conf.d/schema.d)
+
#
# ebpf files
#
diff --git a/collectors/systemd-journal.plugin/schema.d/systemd-journal:monitored-directories.json b/collectors/systemd-journal.plugin/schema.d/systemd-journal:monitored-directories.json
new file mode 100644
index 0000000000..8ae75e05d6
--- /dev/null
+++ b/collectors/systemd-journal.plugin/schema.d/systemd-journal:monitored-directories.json
@@ -0,0 +1,34 @@
+{
+ "jsonSchema": {
+ "$schema": "http://json-schema.org/draft-07/schema#",
+ "type": "object",
+ "properties": {
+ "journalDirectories": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "pattern": "^/.*$"
+ },
+ "maxItems": 100,
+ "uniqueItems": true
+ }
+ },
+ "required": [
+ "journalDirectories"
+ ]
+ },
+ "uiSchema": {
+ "journalDirectories": {
+ "ui:options": {
+ "addable": true,
+ "orderable": false,
+ "removable": true
+ },
+ "items": {
+ "ui:placeholder": "Enter absolute directory path",
+ "ui:widget": "text",
+ "ui:emptyValue": ""
+ }
+ }
+ }
+}