feat(elk): add elastic-connectors task to job specification
This commit is contained in:
parent
61ad166089
commit
042b7baa00
1 changed files with 45 additions and 0 deletions
|
@ -167,6 +167,51 @@ job "elk" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group "connectors" {
|
||||||
|
|
||||||
|
network {
|
||||||
|
mode = "bridge"
|
||||||
|
}
|
||||||
|
|
||||||
|
task "elastic-connectors" {
|
||||||
|
driver = "docker"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "docker.elastic.co/integrations/elastic-connectors:${var.elastic_version}"
|
||||||
|
|
||||||
|
command = "/app/bin/elastic-ingest"
|
||||||
|
args = ["-c", "/config/config.yml"]
|
||||||
|
|
||||||
|
mount {
|
||||||
|
type = "bind"
|
||||||
|
source = "local/config.yml"
|
||||||
|
targe = "/config/config.yml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 500
|
||||||
|
memory = 512
|
||||||
|
}
|
||||||
|
|
||||||
|
template {
|
||||||
|
data = <<-EOF
|
||||||
|
{{with nomadVar "nomad/jobs/elk/connectors/elastic-connectors" }}
|
||||||
|
connectors:
|
||||||
|
- connector_id: "PDlTypMBJHtNrm356nUt"
|
||||||
|
service_type: "postgresql"
|
||||||
|
api_key: "{{.api_key}}"
|
||||||
|
elasticsearch:
|
||||||
|
host: "https://hestia.lan:9200"
|
||||||
|
api_key: "{{.api_key}}"
|
||||||
|
{{end}}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
destination = "local/config.yml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
group "kibana" {
|
group "kibana" {
|
||||||
|
|
||||||
count = 2
|
count = 2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue