4918a5f5bdb7bd9b64c1d21a6b919bb4c6597902
[csit.git] / terraform-ci-infra / 1n_nmd / prometheus / conf / nomad / prometheus.hcl
1 job "${job_name}" {
2   # The "region" parameter specifies the region in which to execute the job.
3   # If omitted, this inherits the default region name of "global".
4   # region = "global"
5   #
6   # The "datacenters" parameter specifies the list of datacenters which should
7   # be considered when placing this task. This must be provided.
8   datacenters         = "${datacenters}"
9
10   # The "type" parameter controls the type of job, which impacts the scheduler's
11   # decision on placement. This configuration is optional and defaults to
12   # "service". For a full list of job types and their differences, please see
13   # the online documentation.
14   #
15   # For more information, please see the online documentation at:
16   #
17   #     https://www.nomadproject.io/docs/jobspec/schedulers
18   #
19   type                = "service"
20
21   update {
22     # The "max_parallel" parameter specifies the maximum number of updates to
23     # perform in parallel. In this case, this specifies to update a single task
24     # at a time.
25     max_parallel      = 1
26
27     health_check      = "checks"
28
29     # The "min_healthy_time" parameter specifies the minimum time the allocation
30     # must be in the healthy state before it is marked as healthy and unblocks
31     # further allocations from being updated.
32     min_healthy_time  = "10s"
33
34     # The "healthy_deadline" parameter specifies the deadline in which the
35     # allocation must be marked as healthy after which the allocation is
36     # automatically transitioned to unhealthy. Transitioning to unhealthy will
37     # fail the deployment and potentially roll back the job if "auto_revert" is
38     # set to true.
39     healthy_deadline  = "3m"
40
41     # The "progress_deadline" parameter specifies the deadline in which an
42     # allocation must be marked as healthy. The deadline begins when the first
43     # allocation for the deployment is created and is reset whenever an allocation
44     # as part of the deployment transitions to a healthy state. If no allocation
45     # transitions to the healthy state before the progress deadline, the
46     # deployment is marked as failed.
47     progress_deadline = "10m"
48
49 %{ if use_canary }
50     # The "canary" parameter specifies that changes to the job that would result
51     # in destructive updates should create the specified number of canaries
52     # without stopping any previous allocations. Once the operator determines the
53     # canaries are healthy, they can be promoted which unblocks a rolling update
54     # of the remaining allocations at a rate of "max_parallel".
55     #
56     # Further, setting "canary" equal to the count of the task group allows
57     # blue/green deployments. When the job is updated, a full set of the new
58     # version is deployed and upon promotion the old version is stopped.
59     canary            = 1
60
61     # Specifies if the job should auto-promote to the canary version when all
62     # canaries become healthy during a deployment. Defaults to false which means
63     # canaries must be manually updated with the nomad deployment promote
64     # command.
65     auto_promote      = true
66
67     # The "auto_revert" parameter specifies if the job should auto-revert to the
68     # last stable job on deployment failure. A job is marked as stable if all the
69     # allocations as part of its deployment were marked healthy.
70     auto_revert       = true
71 %{ endif }
72   }
73
74   # The "group" stanza defines a series of tasks that should be co-located on
75   # the same Nomad client. Any task within a group will be placed on the same
76   # client.
77   #
78   # For more information and examples on the "group" stanza, please see
79   # the online documentation at:
80   #
81   #     https://www.nomadproject.io/docs/job-specification/group
82   #
83   group "prod-group1-${service_name}" {
84     # The "count" parameter specifies the number of the task groups that should
85     # be running under this group. This value must be non-negative and defaults
86     # to 1.
87     count               = ${group_count}
88
89     # The volume stanza allows the group to specify that it requires a given
90     # volume from the cluster.
91     #
92     # For more information and examples on the "volume" stanza, please see
93     # the online documentation at:
94     #
95     #     https://www.nomadproject.io/docs/job-specification/volume
96     #
97     %{ if use_host_volume }
98     volume "prod-volume1-${service_name}" {
99       type              = "host"
100       read_only         = false
101       source            = "${host_volume}"
102     }
103     %{ endif }
104
105     # The constraint allows restricting the set of eligible nodes. Constraints
106     # may filter on attributes or client metadata.
107     #
108     # For more information and examples on the "volume" stanza, please see
109     # the online documentation at:
110     #
111     #     https://www.nomadproject.io/docs/job-specification/constraint
112     #
113     constraint {
114       attribute         = "$${attr.cpu.arch}"
115       operator          = "!="
116       value             = "arm64"
117     }
118
119     # The "task" stanza creates an individual unit of work, such as a Docker
120     # container, web application, or batch processing.
121     #
122     # For more information and examples on the "task" stanza, please see
123     # the online documentation at:
124     #
125     #     https://www.nomadproject.io/docs/job-specification/task
126     #
127     task "prod-task1-${service_name}" {
128       # The "driver" parameter specifies the task driver that should be used to
129       # run the task.
130       driver            = "exec"
131
132       %{ if use_host_volume }
133       volume_mount {
134         volume          = "prod-volume1-${service_name}"
135         destination     = "${data_dir}"
136         read_only       = false
137       }
138       %{ endif }
139
140       %{ if use_vault_provider }
141       vault {
142         policies        = "${vault_kv_policy_name}"
143       }
144       %{ endif }
145
146       # The "config" stanza specifies the driver configuration, which is passed
147       # directly to the driver to start the task. The details of configurations
148       # are specific to each driver, so please see specific driver
149       # documentation for more information.
150       config {
151         command         = "local/prometheus-${version}.linux-amd64/prometheus"
152         args            = [
153           "--config.file=secrets/prometheus.yml",
154           "--storage.tsdb.path=${data_dir}prometheus/",
155           "--storage.tsdb.retention.time=15d"
156         ]
157       }
158
159       # The artifact stanza instructs Nomad to fetch and unpack a remote resource,
160       # such as a file, tarball, or binary. Nomad downloads artifacts using the
161       # popular go-getter library, which permits downloading artifacts from a
162       # variety of locations using a URL as the input source.
163       #
164       # For more information and examples on the "artifact" stanza, please see
165       # the online documentation at:
166       #
167       #     https://www.nomadproject.io/docs/job-specification/artifact
168       #
169       artifact {
170         source          = "${url}"
171       }
172
173       # The "template" stanza instructs Nomad to manage a template, such as
174       # a configuration file or script. This template can optionally pull data
175       # from Consul or Vault to populate runtime configuration data.
176       #
177       # For more information and examples on the "template" stanza, please see
178       # the online documentation at:
179       #
180       #     https://www.nomadproject.io/docs/job-specification/template
181       #
182       template {
183         change_mode     = "noop"
184         change_signal   = "SIGINT"
185         destination     = "secrets/alerts.yml"
186         left_delimiter  = "{{{"
187         right_delimiter = "}}}"
188         data            = <<EOH
189 ---
190 groups:
191 - name: "Consul"
192   rules:
193   - alert: ConsulServiceHealthcheckFailed
194     expr: consul_catalog_service_node_healthy == 0
195     for: 0m
196     labels:
197       severity: critical
198     annotations:
199       summary: "Consul service healthcheck failed (instance {{ $labels.instance }})."
200       description: "Service: `{{ $labels.service_name }}` Healthcheck: `{{ $labels.service_id }}`."
201   - alert: ConsulMissingMasterNode
202     expr: consul_raft_peers < 3
203     for: 0m
204     labels:
205       severity: critical
206     annotations:
207       summary: "Consul missing master node (instance {{ $labels.instance }})."
208       description: "Numbers of consul raft peers should be 3, in order to preserve quorum."
209   - alert: ConsulAgentUnhealthy
210     expr: consul_health_node_status{status="critical"} == 1
211     for: 0m
212     labels:
213       severity: critical
214     annotations:
215       summary: "Consul agent unhealthy (instance {{ $labels.instance }})."
216       description: "A Consul agent is down."
217 - name: "Hosts"
218   rules:
219   - alert: NodeDown
220     expr: up == 0
221     for: 0m
222     labels:
223       severity: critical
224     annotations:
225       summary: "Prometheus target missing (instance {{ $labels.instance }})."
226       description: "A Prometheus target has disappeared. An exporter might be crashed."
227   - alert: HostHighCpuLoad
228     expr: 100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 95
229     for: 0m
230     labels:
231       severity: warning
232     annotations:
233       summary: "Host high CPU load (instance {{ $labels.instance }})."
234       description: "CPU load is > 95%."
235   - alert: HostOutOfMemory
236     expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10
237     for: 2m
238     labels:
239       severity: warning
240     annotations:
241       summary: "Host out of memory (instance {{ $labels.instance }})."
242       description: "Node memory is filling up (< 10% left)."
243   - alert: HostOomKillDetected
244     expr: increase(node_vmstat_oom_kill[1m]) > 0
245     for: 0m
246     labels:
247       severity: warning
248     annotations:
249       summary: "Host OOM kill detected (instance {{ $labels.instance }})."
250       description: "OOM kill detected."
251   - alert: HostMemoryUnderMemoryPressure
252     expr: rate(node_vmstat_pgmajfault[1m]) > 1000
253     for: 2m
254     labels:
255       severity: warning
256     annotations:
257       summary: "Host memory under memory pressure (instance {{ $labels.instance }})."
258       description: "The node is under heavy memory pressure. High rate of major page faults."
259   - alert: HostOutOfDiskSpace
260     expr: (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 10 and ON (instance, device, mountpoint) node_filesystem_readonly == 0
261     for: 2m
262     labels:
263       severity: warning
264     annotations:
265       summary: "Host out of disk space (instance {{ $labels.instance }})."
266       description: "Disk is almost full (< 10% left)."
267   - alert: HostRaidDiskFailure
268     expr: node_md_disks{state="failed"} > 0
269     for: 2m
270     labels:
271       severity: warning
272     annotations:
273       summary: "Host RAID disk failure (instance {{ $labels.instance }})."
274       description: "At least one device in RAID array on {{ $labels.instance }} failed. Array {{ $labels.md_device }} needs attention and possibly a disk swap."
275   - alert: HostConntrackLimit
276     expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
277     for: 5m
278     labels:
279       severity: warning
280     annotations:
281       summary: "Host conntrack limit (instance {{ $labels.instance }})."
282       description: "The number of conntrack is approching limit."
283   - alert: HostNetworkInterfaceSaturated
284     expr: (rate(node_network_receive_bytes_total{device!~"^tap.*"}[1m]) + rate(node_network_transmit_bytes_total{device!~"^tap.*"}[1m])) / node_network_speed_bytes{device!~"^tap.*"} > 0.8
285     for: 1m
286     labels:
287       severity: warning
288     annotations:
289       summary: "Host Network Interface Saturated (instance {{ $labels.instance }})."
290       description: "The network interface {{ $labels.interface }} on {{ $labels.instance }} is getting overloaded."
291   - alert: HostSystemdServiceCrashed
292     expr: node_systemd_unit_state{state="failed"} == 1
293     for: 0m
294     labels:
295       severity: warning
296     annotations:
297       summary: "Host SystemD service crashed (instance {{ $labels.instance }})."
298       description: "SystemD service crashed."
299   - alert: HostEdacCorrectableErrorsDetected
300     expr: increase(node_edac_correctable_errors_total[1m]) > 0
301     for: 0m
302     labels:
303       severity: info
304     annotations:
305       summary: "Host EDAC Correctable Errors detected (instance {{ $labels.instance }})."
306       description: '{{ $labels.instance }} has had {{ printf "%.0f" $value }} correctable memory errors reported by EDAC in the last 5 minutes.'
307   - alert: HostEdacUncorrectableErrorsDetected
308     expr: node_edac_uncorrectable_errors_total > 0
309     for: 0m
310     labels:
311       severity: warning
312     annotations:
313       summary: "Host EDAC Uncorrectable Errors detected (instance {{ $labels.instance }})."
314       description: '{{ $labels.instance }} has had {{ printf "%.0f" $value }} uncorrectable memory errors reported by EDAC in the last 5 minutes.'
315 - name: "Min.io"
316   rules:
317   - alert: MinioDiskOffline
318     expr: minio_offline_disks > 0
319     for: 0m
320     labels:
321       severity: critical
322     annotations:
323       summary: "Minio disk offline (instance {{ $labels.instance }})"
324       description: "Minio disk is offline."
325   - alert: MinioStorageSpaceExhausted
326     expr: minio_disk_storage_free_bytes / 1024 / 1024 / 1024 < 10
327     for: 2m
328     labels:
329       severity: warning
330     annotations:
331       summary: "Minio storage space exhausted (instance {{ $labels.instance }})."
332       description: "Minio storage space is low (< 10 GB)."
333 - name: "Prometheus"
334   rules:
335   - alert: PrometheusConfigurationReloadFailure
336     expr: prometheus_config_last_reload_successful != 1
337     for: 0m
338     labels:
339       severity: warning
340     annotations:
341       summary: "Prometheus configuration reload failure (instance {{ $labels.instance }})."
342       description: "Prometheus configuration reload error."
343   - alert: PrometheusTooManyRestarts
344     expr: changes(process_start_time_seconds{job=~"prometheus|pushgateway|alertmanager"}[15m]) > 2
345     for: 0m
346     labels:
347       severity: warning
348     annotations:
349       summary: "Prometheus too many restarts (instance {{ $labels.instance }})."
350       description: "Prometheus has restarted more than twice in the last 15 minutes. It might be crashlooping."
351   - alert: PrometheusAlertmanagerConfigurationReloadFailure
352     expr: alertmanager_config_last_reload_successful != 1
353     for: 0m
354     labels:
355       severity: warning
356     annotations:
357       summary: "Prometheus AlertManager configuration reload failure (instance {{ $labels.instance }})."
358       description: "AlertManager configuration reload error."
359   - alert: PrometheusRuleEvaluationFailures
360     expr: increase(prometheus_rule_evaluation_failures_total[3m]) > 0
361     for: 0m
362     labels:
363       severity: critical
364     annotations:
365       summary: "Prometheus rule evaluation failures (instance {{ $labels.instance }})."
366       description: "Prometheus encountered {{ $value }} rule evaluation failures, leading to potentially ignored alerts."
367   - alert: PrometheusTargetScrapingSlow
368     expr: prometheus_target_interval_length_seconds{quantile="0.9"} > 60
369     for: 5m
370     labels:
371       severity: warning
372     annotations:
373       summary: "Prometheus target scraping slow (instance {{ $labels.instance }})."
374       description: "Prometheus is scraping exporters slowly."
375   - alert: PrometheusTsdbCompactionsFailed
376     expr: increase(prometheus_tsdb_compactions_failed_total[1m]) > 0
377     for: 0m
378     labels:
379       severity: critical
380     annotations:
381       summary: "Prometheus TSDB compactions failed (instance {{ $labels.instance }})."
382       description: "Prometheus encountered {{ $value }} TSDB compactions failures."
383   - alert: PrometheusTsdbHeadTruncationsFailed
384     expr: increase(prometheus_tsdb_head_truncations_failed_total[1m]) > 0
385     for: 0m
386     labels:
387       severity: critical
388     annotations:
389       summary: "Prometheus TSDB head truncations failed (instance {{ $labels.instance }})."
390       description: "Prometheus encountered {{ $value }} TSDB head truncation failures."
391   - alert: PrometheusTsdbWalCorruptions
392     expr: increase(prometheus_tsdb_wal_corruptions_total[1m]) > 0
393     for: 0m
394     labels:
395       severity: critical
396     annotations:
397       summary: "Prometheus TSDB WAL corruptions (instance {{ $labels.instance }})."
398       description: "Prometheus encountered {{ $value }} TSDB WAL corruptions."
399   - alert: PrometheusTsdbWalTruncationsFailed
400     expr: increase(prometheus_tsdb_wal_truncations_failed_total[1m]) > 0
401     for: 0m
402     labels:
403       severity: critical
404     annotations:
405       summary: "Prometheus TSDB WAL truncations failed (instance {{ $labels.instance }})."
406       description: "Prometheus encountered {{ $value }} TSDB WAL truncation failures."
407 EOH
408       }
409
410       template {
411         change_mode     = "noop"
412         change_signal   = "SIGINT"
413         destination     = "secrets/prometheus.yml"
414         data            = <<EOH
415 ---
416 global:
417   scrape_interval:     5s
418   scrape_timeout:      5s
419   evaluation_interval: 5s
420
421 alerting:
422   alertmanagers:
423   - consul_sd_configs:
424     - server: '{{ env "NOMAD_IP_prometheus" }}:8500'
425       services: [ 'alertmanager' ]
426
427 rule_files:
428   - 'alerts.yml'
429
430 scrape_configs:
431
432   - job_name: 'Nomad Cluster'
433     consul_sd_configs:
434     - server: '{{ env "NOMAD_IP_prometheus" }}:8500'
435       services: [ 'nomad-client', 'nomad' ]
436     relabel_configs:
437     - source_labels: [__meta_consul_tags]
438       regex: '(.*)http(.*)'
439       action: keep
440     metrics_path: /v1/metrics
441     params:
442       format: [ 'prometheus' ]
443
444   - job_name: 'Consul Cluster'
445     static_configs:
446       - targets: [ '10.30.51.28:8500' ]
447       - targets: [ '10.30.51.29:8500' ]
448       - targets: [ '10.30.51.30:8500' ]
449       - targets: [ '10.30.51.32:8500' ]
450       - targets: [ '10.30.51.33:8500' ]
451       - targets: [ '10.30.51.34:8500' ]
452       - targets: [ '10.30.51.35:8500' ]
453       - targets: [ '10.30.51.39:8500' ]
454       - targets: [ '10.30.51.40:8500' ]
455       - targets: [ '10.30.51.50:8500' ]
456       - targets: [ '10.30.51.51:8500' ]
457       - targets: [ '10.30.51.65:8500' ]
458       - targets: [ '10.30.51.66:8500' ]
459       - targets: [ '10.30.51.67:8500' ]
460       - targets: [ '10.30.51.68:8500' ]
461       - targets: [ '10.30.51.70:8500' ]
462       - targets: [ '10.30.51.71:8500' ]
463       - targets: [ '10.32.8.14:8500' ]
464       - targets: [ '10.32.8.15:8500' ]
465       - targets: [ '10.32.8.16:8500' ]
466       - targets: [ '10.32.8.17:8500' ]
467     metrics_path: /v1/agent/metrics
468     params:
469       format: [ 'prometheus' ]
470
471   - job_name: 'Blackbox Exporter (icmp)'
472     static_configs:
473       - targets: [ 'gerrit.fd.io' ]
474       - targets: [ 'jenkins.fd.io' ]
475       - targets: [ '10.30.51.32' ]
476     params:
477       module: [ 'icmp_v4' ]
478     relabel_configs:
479       - source_labels: [__address__]
480         target_label: __param_target
481       - source_labels: [__param_target]
482         target_label: instance
483       - target_label: __address__
484         replacement: localhost:9115
485     metrics_path: /probe
486
487   - job_name: 'Blackbox Exporter (http)'
488     static_configs:
489       - targets: [ 'gerrit.fd.io' ]
490       - targets: [ 'jenkins.fd.io' ]
491     params:
492       module: [ 'http_2xx' ]
493     relabel_configs:
494       - source_labels: [__address__]
495         target_label: __param_target
496       - source_labels: [__param_target]
497         target_label: instance
498       - target_label: __address__
499         replacement: localhost:9115
500     metrics_path: /probe
501
502   - job_name: 'cAdvisor Exporter'
503     static_configs:
504       - targets: [ '10.30.51.28:8080' ]
505       - targets: [ '10.30.51.29:8080' ]
506       - targets: [ '10.30.51.30:8080' ]
507       #- targets: [ '10.30.51.32:8080' ]
508       - targets: [ '10.30.51.33:8080' ]
509       - targets: [ '10.30.51.34:8080' ]
510       - targets: [ '10.30.51.35:8080' ]
511       - targets: [ '10.30.51.39:8080' ]
512       - targets: [ '10.30.51.40:8080' ]
513       - targets: [ '10.30.51.50:8080' ]
514       - targets: [ '10.30.51.51:8080' ]
515       - targets: [ '10.30.51.65:8080' ]
516       - targets: [ '10.30.51.66:8080' ]
517       - targets: [ '10.30.51.67:8080' ]
518       - targets: [ '10.30.51.68:8080' ]
519       - targets: [ '10.30.51.70:8080' ]
520       - targets: [ '10.30.51.71:8080' ]
521       - targets: [ '10.32.8.14:8080' ]
522       - targets: [ '10.32.8.15:8080' ]
523       - targets: [ '10.32.8.16:8080' ]
524       - targets: [ '10.32.8.17:8080' ]
525
526   - job_name: 'Node Exporter'
527     static_configs:
528       - targets: [ '10.30.51.28:9100' ]
529       - targets: [ '10.30.51.29:9100' ]
530       - targets: [ '10.30.51.30:9100' ]
531       - targets: [ '10.30.51.32:9100' ]
532       - targets: [ '10.30.51.33:9100' ]
533       - targets: [ '10.30.51.34:9100' ]
534       - targets: [ '10.30.51.35:9100' ]
535       - targets: [ '10.30.51.39:9100' ]
536       - targets: [ '10.30.51.40:9100' ]
537       - targets: [ '10.30.51.50:9100' ]
538       - targets: [ '10.30.51.51:9100' ]
539       - targets: [ '10.30.51.65:9100' ]
540       - targets: [ '10.30.51.66:9100' ]
541       - targets: [ '10.30.51.67:9100' ]
542       - targets: [ '10.30.51.68:9100' ]
543       - targets: [ '10.30.51.70:9100' ]
544       - targets: [ '10.30.51.71:9100' ]
545       - targets: [ '10.32.8.14:9100' ]
546       - targets: [ '10.32.8.15:9100' ]
547       - targets: [ '10.32.8.16:9100' ]
548       - targets: [ '10.32.8.17:9100' ]
549
550   - job_name: 'Alertmanager'
551     consul_sd_configs:
552     - server: '{{ env "NOMAD_IP_prometheus" }}:8500'
553       services: [ 'alertmanager' ]
554
555   - job_name: 'Grafana'
556     consul_sd_configs:
557     - server: '{{ env "NOMAD_IP_prometheus" }}:8500'
558       services: [ 'grafana' ]
559
560   - job_name: 'Prometheus'
561     consul_sd_configs:
562     - server: '{{ env "NOMAD_IP_prometheus" }}:8500'
563       services: [ 'prometheus' ]
564
565   - job_name: 'Minio'
566     bearer_token: eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjQ3NjQ1ODEzMzcsImlzcyI6InByb21ldGhldXMiLCJzdWIiOiJtaW5pbyJ9.oeTw3EIaiFmlDikrHXWiWXMH2vxLfDLkfjEC7G2N3M_keH_xyA_l2ofLLNYtopa_3GCEZnxLQdPuFZrmgpkDWg
567     consul_sd_configs:
568     - server: '{{ env "NOMAD_IP_prometheus" }}:8500'
569       services: [ 'storage' ]
570     metrics_path: /minio/prometheus/metrics
571 EOH
572       }
573
574       # The service stanza instructs Nomad to register a service with Consul.
575       #
576       # For more information and examples on the "task" stanza, please see
577       # the online documentation at:
578       #
579       #     https://www.nomadproject.io/docs/job-specification/service
580       #
581       service {
582         name            = "${service_name}"
583         port            = "${service_name}"
584         tags            = [ "${service_name}$${NOMAD_ALLOC_INDEX}" ]
585         check {
586           name          = "Prometheus Check Live"
587           type          = "http"
588           path          = "/-/healthy"
589           interval      = "10s"
590           timeout       = "2s"
591         }
592       }
593
594       # The "resources" stanza describes the requirements a task needs to
595       # execute. Resource requirements include memory, network, cpu, and more.
596       # This ensures the task will execute on a machine that contains enough
597       # resource capacity.
598       #
599       # For more information and examples on the "resources" stanza, please see
600       # the online documentation at:
601       #
602       #     https://www.nomadproject.io/docs/job-specification/resources
603       #
604       resources {
605         cpu             = ${cpu}
606         memory          = ${mem}
607         # The network stanza specifies the networking requirements for the task
608         # group, including the network mode and port allocations. When scheduling
609         # jobs in Nomad they are provisioned across your fleet of machines along
610         # with other jobs and services. Because you don't know in advance what host
611         # your job will be provisioned on, Nomad will provide your tasks with
612         # network configuration when they start up.
613         #
614         # For more information and examples on the "template" stanza, please see
615         # the online documentation at:
616         #
617         #     https://www.nomadproject.io/docs/job-specification/network
618         #
619         network {
620           port "${service_name}" {
621             static      = ${port}
622           }
623         }
624       }
625     }
626   }
627 }