-
Notifications
You must be signed in to change notification settings - Fork 0
/
outputs.tpl
55 lines (39 loc) · 1.82 KB
/
outputs.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[[- if var "nomad_pack_verbose_output" . ]]
# Job: _[[ var "nomad_job_name" . ]]_ (`v[[ meta "pack.version" . ]]`)
Region: `[[ var "nomad_job_region" . ]]`
DC(s): `[[ var "nomad_job_datacenters" . | toJson ]]`
Namespace: `[[ var "nomad_job_namespace" . ]]`
Name: `[[ var "nomad_job_name" . ]]`
Count: `[[ var "nomad_group_count" . ]]`
## Ports
[[- $ports := var "nomad_group_ports" . ]]
[[- range $name, $config := $ports ]]
- `[[ $name ]]`: `[[ $config.port ]]` (type: `[[ $config.type ]]` [[ if and (eq $config.type "http") (eq $config.protocol "https") ]]protocol: `https`[[ end ]])
[[- end ]]
## Resources
CPU: [[ var "nomad_task_resources.cpu" . ]] MHz
Memory: [[ var "nomad_task_resources.memory" . ]] MB
[[- if var "nomad_group_volumes" . ]]
## Volumes
[[- range $name, $mounts := var "nomad_group_volumes" . ]]
- `[[ $mounts.name ]]` = `[[ $mounts.destination | toPrettyJson ]]` (type: `[[ $mounts.type ]]`[[ if $mounts.read_only ]], read-only[[ end ]])
[[- end ]]
[[ end ]]
## Service
Service Provider: `[[ var "nomad_group_service_provider" . ]]`
Service Name: `[[ var "nomad_job_name" . | replace "_" "-" | trunc 63 | quote ]]`
Service Tags:
[[- range $name := var "nomad_group_tags" . ]]
- `[[ $name ]]`
[[- end ]]
## Application Configuration
```env
[[- template "configuration" . ]]
```
## URLs:
Datadog Interface: [[ var "app_dd_url" . ]]
Infrastructure Map: [[ var "app_dd_url" . ]]/infrastructure/map?fillby=avg%%3Adatadog.agent.running&filter=[[ first ( var "dd_tags" . ) | replace ":" "%%3A" ]]
[[- if var "nomad_group_ports.gui" . ]]
Datadog Agent Manager: [[ var "nomad_group_ports.gui.protocol" . ]]://[[ var "app_dd_bind_host" . ]]:[[ var "nomad_group_ports.gui.port" . ]][[ var "nomad_group_ports.gui.path" . ]]
[[- end ]]
[[ end -]]