"description":"Parameters to instantiate Grafana",
"type":"object",
"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":{
"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"
},
"smtp-username":{
...
...
@@ -33,33 +72,41 @@
"description":"Applications to monitor",
"type":"array",
"items":{
"oneOf":[
{
"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":{
"description":"SlapOS partitions to monitor",
"type":"array",
"items":{
"type":"object",
"required":[
"name",
"reference"
],
"properties":{
"name":{
"type":"string",
...
...
@@ -79,7 +126,7 @@
},
"type":{
"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":[
"erp5/mariadb",
"erp5/balancer",
...
...
@@ -88,78 +135,108 @@
"erp5/zeo",
"mariadb",
"default"
]
],
"default":"default"
},
"file-path":{
"type":"string",
"description":"Glob for the files to watch. This mostly makes sense for `default` type"
"log-file-patterns":{
"$refs":"#/$defs/log-file-patterns",
"description":"Glob pattern for log files to watch. This mostly makes sense for `default` partition type"
},
"static-tags":{
"type":"object",
"description":"Static tags for this partition",
"$refs":"#/$defs/static-tags"
}
},
"examples":[
{
"region":"eu",
"data-center":"abc123"
}
]
"name":"zope-backoffice",
"type":"erp5/zope-front",
"reference":"slappart1",
"static-tags":{
"instance":"instance-name"
}
},
"anyOf":[
{
"properties":{
"type":{
"const":"default"
}
"name":"mariadb",
"type":"erp5/mariadb",
"reference":"slappart2"
},
"required":[
"name",
"file-path"
{
"name":"Theia",
"type":"default",
"log-file-patterns":[
".slappart*log"
]
}
]
}
}
}
},
{
"type":"object",
"description":"Configuration for `system` type application",
"required":[
"type",
"name"
],
"properties":{
"type":{
"not":{
"const":"default"
}
}
"$ref":"#/$defs/type",
"const":"system"
},
"required":[
"name",
"reference"
"name":{
"$ref":"#/$defs/name"
},
"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":[
{
"name":"zope-backoffice",
"type":"erp5/zope-front",
"reference":"slappart1",
"static-tags":{
"instance":"instance-name"
}
"name":"syslog",
"log-file-patterns":[
"/var/log/syslog"
]
},
{
"name":"mariadb",
"type":"erp5/mariadb",
"reference":"slappart2"
"name":"kernel",
"log-file-patterns":[
"/var/log/kern.log",
"/var/log/messages"
]
},
{
"name":"syslog",
"type":"default",
"file-path":"/var/log/syslog"
"name":"re6stnet",
"log-file-patterns":[
"/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)",