Grafana config.
This commit is contained in:
57
services/grafana.hcl
Normal file
57
services/grafana.hcl
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
job "grafana" {
|
||||||
|
datacenters = ["alo"]
|
||||||
|
|
||||||
|
group "monitoring" {
|
||||||
|
network {
|
||||||
|
port "http" {
|
||||||
|
host_network = "tailscale"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
volume "data-volume" {
|
||||||
|
type = "csi"
|
||||||
|
source = "grafana-data"
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
task "grafana" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "grafana/grafana-enterprise"
|
||||||
|
ports = [ "http" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
env {
|
||||||
|
GF_AUTH_BASIC_ENABLED = "false"
|
||||||
|
GF_SERVER_HTTP_PORT = "${NOMAD_PORT_http}"
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "data-volume"
|
||||||
|
destination = "/var/lib/grafana"
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
port = "http"
|
||||||
|
name = "grafana"
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
"traefik.http.routers.grafana.entryPoints=websecure",
|
||||||
|
]
|
||||||
|
check {
|
||||||
|
type = "http"
|
||||||
|
path = "/"
|
||||||
|
interval = "10s"
|
||||||
|
timeout = "2s"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 100
|
||||||
|
memory = 128
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
26
storage/grafana-volume.hcl
Normal file
26
storage/grafana-volume.hcl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
id = "grafana-data"
|
||||||
|
name = "grafana-data"
|
||||||
|
type = "csi"
|
||||||
|
plugin_id = "seaweedfs"
|
||||||
|
|
||||||
|
capacity_min = "10GiB"
|
||||||
|
capacity_max = "20GiB"
|
||||||
|
|
||||||
|
capability {
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Optional: for 'nomad volume create', specify mount options to validate for
|
||||||
|
# 'attachment_mode = "file-system". Registering an existing volume will record
|
||||||
|
# but ignore these fields.
|
||||||
|
mount_options {
|
||||||
|
mount_flags = ["rw"]
|
||||||
|
}
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
# Available options: https://github.com/seaweedfs/seaweedfs-csi-driver/blob/master/pkg/driver/mounter_seaweedfs.go
|
||||||
|
collection = "appdata"
|
||||||
|
replication = "001"
|
||||||
|
path = "/appdata/grafana"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user