Menu

Nomad integration for Grafana Cloud

Nomad is a simple and flexible workload orchestrator to deploy and manage containers and non-containerized applications across on-prem and clouds at scale.

Install Nomad integration for Grafana Cloud

  1. In your Grafana instance, Click Integrations and Connections (lightning bolt icon), then click on install integration on Nomad tile.
  2. Wait for the integration to be installed and then follow the steps shown to setup Grafana Agent to automatically scrape and send Nomad metrics to your Cloud Instance.

Pre-install configuration for the Nomad integration

Add the stanza below in your Nomad client and server configuration files, by default it would be /etc/nomad.d/nomad.hcl:

telemetry {
  collection_interval = "1s"
  disable_hostname = true
  prometheus_metrics = true
  publish_allocation_metrics = true
  publish_node_metrics = true
}

Post-install configuration for the Nomad integration

In the agent configuration file, the agent must be pointed to each nomad server and nomad client that compose the Nomad cluster, such as nomad:4646 in the example below, that exposes a /metrics endpoint.

metrics:
  wal_directory: /tmp/wal
  configs:
    - name: integrations
      scrape_configs:
        - job_name: integrations/nomad
          metrics_path: /v1/metrics
          params:
            format: ['prometheus']
          static_configs:
            - targets: ['nomad1:4646', 'nomad2:4646', 'nomad3:4646', 'nomad-client1:4646']

Instead of using static discovery, consul service discovery can be used to discover all the nodes of the Nomad cluster:

- job_name: 'integrations/nomad'
  consul_sd_configs:
  - server: 'consul.service.consul:8500'
    services: ['nomad-client', 'nomad']
  metrics_path: /v1/metrics
  params:
    format: ['prometheus']
  relabel_configs:
  - source_labels: ['__meta_consul_tags']
    regex: '(.*)http(.*)'
    action: keep
  - source_labels: [__meta_consul_node]
    target_label: instance

Dashboards

This integration includes the following dashboards.

  • Nomad cluster
  • Nomad jobs

Nomad overview

image

Nomad jobs

image

Metrics

Below is a list of the metrics used on the dashboards and in alerts of the integration and are automatically written to your Grafana Cloud instance.

  • nomad_client_allocs_cpu_total_percent
  • nomad_client_allocs_cpu_total_ticks
  • nomad_client_allocs_memory_cache
  • nomad_client_allocs_memory_rss
  • nomad_client_host_disk_available
  • nomad_client_host_disk_inodes_percent
  • nomad_client_host_disk_size
  • nomad_client_host_memory_available
  • nomad_client_host_memory_free
  • nomad_client_host_memory_total
  • nomad_client_host_memory_used
  • nomad_client_uptime

Changelog

# 0.0.3 - May 2022

* Update nomad-cluster dashboard:
  - Fix allocated gauges
* Update nomad-jobs dashboard:
  - Set decimal from fixed '3' to auto
  - Add tooltip sort: desc for tasks
  - Transform memory cache panel to timeseries graph
  - Fix units for CPU percentage

# 0.0.2 - April 2022

* Add Nomad setup prerequisites
* Add Nomad screenshot
* Add Nomad summary panels
* Fix panels repeat by $instance
* Fix queries: Remove not common service label from nomad selector
* Fix allocations and nomad clients gauge thresholds
* Flip CPU idle to CPU usage
* Fix instructions: Include format=prometheus in agent.jsonnet
* Update titles to Title case
* Rename $instance label from host to 'Nomad client'
* Remove vendor/ prefix from integration tag
* Transform nomad dashboards to jsonnet as is.

# 0.0.1 - July 2021

* Initial release

Cost

By connecting your Nomad instance to Grafana Cloud you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see Active series and dpm usage and Cloud tier pricing.