"description":"Parameters to instantiate Grafana",
"description":"Parameters to instantiate Grafana",
"type":"object",
"type":"object",
"additionalProperties":false,
"additionalProperties":false,
"$defs":{
"type":{
"description":"Type of the application. With `SlapOS` type, some metrics are collected from supervisor and from some known partition types (for example: ERP5's mariadb or ERP5's zopes). With `system` type, only log files are ingested.",
"type":"string",
"default":"SlapOS",
"enum":[
"SlapOS",
"system"
]
},
"name":{
"description":"Name of this application",
"type":"string"
},
"urls":{
"description":"URLs to monitor for availability and certificate lifetime",
"type":"array",
"items":{
"type":"string"
}
},
"log-file-patterns":{
"type":"array",
"items":{
"type":"string"
},
"description":"Glob patterns for watched log files."
},
"static-tags":{
"type":"object",
"description":"Static tags for this partition",
"examples":[
{
"region":"eu",
"data-center":"abc123"
}
]
}
},
"properties":{
"properties":{
"smtp-server":{
"smtp-server":{
"description":"SMTP server used by grafana to send emails (in host:port format). Leaving this empty will disable email sending.",
"description":"SMTP server used by Grafana to send emails (in host:port format). Leaving this empty will disable email sending.",
"type":"string"
"type":"string"
},
},
"smtp-username":{
"smtp-username":{
...
@@ -33,33 +72,41 @@
...
@@ -33,33 +72,41 @@
"description":"Applications to monitor",
"description":"Applications to monitor",
"type":"array",
"type":"array",
"items":{
"items":{
"oneOf":[
{
"type":"object",
"type":"object",
"additionalProperties":false,
"description":"Configuration for SlapOS type application",
"description":"URLs to monitor for availability and certificate lifetime",
"type":"array",
"items":{
"type":"string"
}
},
"partitions":{
"partitions":{
"description":"SlapOS partitions to monitor",
"description":"SlapOS partitions to monitor",
"type":"array",
"type":"array",
"items":{
"items":{
"type":"object",
"type":"object",
"required":[
"name",
"reference"
],
"properties":{
"properties":{
"name":{
"name":{
"type":"string",
"type":"string",
...
@@ -79,7 +126,7 @@
...
@@ -79,7 +126,7 @@
},
},
"type":{
"type":{
"type":"string",
"type":"string",
"description":"Type of the partition. Known types have extra metrics and logs collected",
"description":"Type of the partition. Known types have metrics and logs collected",
"enum":[
"enum":[
"erp5/mariadb",
"erp5/mariadb",
"erp5/balancer",
"erp5/balancer",
...
@@ -88,78 +135,108 @@
...
@@ -88,78 +135,108 @@
"erp5/zeo",
"erp5/zeo",
"mariadb",
"mariadb",
"default"
"default"
]
],
"default":"default"
},
},
"file-path":{
"log-file-patterns":{
"type":"string",
"$refs":"#/$defs/log-file-patterns",
"description":"Glob for the files to watch. This mostly makes sense for `default` type"
"description":"Glob pattern for log files to watch. This mostly makes sense for `default` partition type"
},
},
"static-tags":{
"static-tags":{
"type":"object",
"$refs":"#/$defs/static-tags"
"description":"Static tags for this partition",
}
},
"examples":[
"examples":[
{
{
"region":"eu",
"name":"zope-backoffice",
"data-center":"abc123"
"type":"erp5/zope-front",
}
"reference":"slappart1",
]
"static-tags":{
"instance":"instance-name"
}
}
},
},
"anyOf":[
{
{
"properties":{
"name":"mariadb",
"type":{
"type":"erp5/mariadb",
"const":"default"
"reference":"slappart2"
}
},
},
"required":[
{
"name",
"name":"Theia",
"file-path"
"type":"default",
"log-file-patterns":[
".slappart*log"
]
}
]
]
}
}
}
},
},
{
{
"type":"object",
"description":"Configuration for `system` type application",
"required":[
"type",
"name"
],
"properties":{
"properties":{
"type":{
"type":{
"not":{
"$ref":"#/$defs/type",
"const":"default"
"const":"system"
}
}
},
},
"required":[
"name":{
"name",
"$ref":"#/$defs/name"
"reference"
},
"urls":{
"$ref":"#/$defs/urls"
},
"partitions":{
"type":"array",
"items":{
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"Friendly name of the partition",
"examples":[
"syslog",
"email"
]
]
},
"log-file-patterns":{
"$refs":"#/$defs/log-file-patterns"
},
"static-tags":{
"$refs":"#/$defs/static-tags"
}
}
],
},
"examples":[
"examples":[
{
{
"name":"zope-backoffice",
"name":"syslog",
"type":"erp5/zope-front",
"log-file-patterns":[
"reference":"slappart1",
"/var/log/syslog"
"static-tags":{
]
"instance":"instance-name"
}
},
},
{
{
"name":"mariadb",
"name":"kernel",
"type":"erp5/mariadb",
"log-file-patterns":[
"reference":"slappart2"
"/var/log/kern.log",
"/var/log/messages"
]
},
},
{
{
"name":"syslog",
"name":"re6stnet",
"type":"default",
"log-file-patterns":[
"file-path":"/var/log/syslog"
"/var/log/re6stnet/*.log"
]
}
}
]
]
}
}
}
}
}
}
}
}
},
]
"promtail-extra-scrape-config":{
}
"description":"Raw promtail config (experimental parameter, see https://github.com/grafana/loki/blob/v0.3.0/docs/promtail.md#scrape-configs for detail)",