Hashicorp Nomad and Google Cloud Monitoring Integration

Powerful performance with an easy integration, powered by Telegraf, the open source data connector built by InfluxData.

info

This is not the recommended configuration for real-time query at scale. For query and compression optimization, high-speed ingest, and high availability, you may want to consider Nomad and InfluxDB.

5B+

Telegraf downloads

#1

Time series database
Source: DB Engines

1B+

Downloads of InfluxDB

2,800+

Contributors

Table of Contents

Powerful Performance, Limitless Scale

Collect, organize, and act on massive volumes of high-velocity data. Any data is more valuable when you think of it as time series data. with InfluxDB, the #1 time series platform built to scale with Telegraf.

See Ways to Get Started

Input and output integration overview

This plugin allows users to collect metrics from Hashicorp Nomad agents in distributed environments.

The Stackdriver plugin allows users to send metrics directly to a specified project in Google Cloud Monitoring, facilitating robust monitoring capabilities across their cloud resources.

Integration details

Hashicorp Nomad

The Hashicorp Nomad input plugin is designed to gather metrics from every Nomad agent within a cluster. By deploying Telegraf on each node, it can connect to the local Nomad agent, typically available at ‘http://127.0.0.1:4646’. With this setup, users can systematically collect and monitor metrics related to the performance and status of their Nomad environment, ensuring they maintain a healthy and efficient cluster operational state. This plugin enables visibility into the operational aspects of Nomad, which is essential for maintaining reliable cloud infrastructure.

Google Cloud Monitoring

This plugin writes metrics to a project in Google Cloud Monitoring, which used to be known as Stackdriver. Authentication is a prerequisite and can be achieved via service accounts or user credentials. The plugin is designed to group metrics by a namespace variable and metric key, facilitating organized data management. However, users are encouraged to use the official naming format for enhanced query efficiency. The plugin supports additional configurations for managing metric representation and allows tags to be treated as resource labels. Notably, it imposes certain restrictions on the data it can accept, such as not allowing string values or points that are out of chronological order.

Configuration

Hashicorp Nomad

[[inputs.nomad]]
  ## URL for the Nomad agent
  # url = "http://127.0.0.1:4646"

  ## Set response_timeout (default 5 seconds)
  # response_timeout = "5s"

  ## Optional TLS Config
  # tls_ca = /path/to/cafile
  # tls_cert = /path/to/certfile
  # tls_key = /path/to/keyfile

Google Cloud Monitoring

[[outputs.stackdriver]]
  ## GCP Project
  project = "project-id"

  ## Quota Project
  ## Specifies the Google Cloud project that should be billed for metric ingestion.
  ## If omitted, the quota is charged to the service account’s default project.
  ## This is useful when sending metrics to multiple projects using a single service account.
  ## The caller must have the `serviceusage.services.use` permission on the specified project.
  # quota_project = ""

  ## The namespace for the metric descriptor
  ## This is optional and users are encouraged to set the namespace as a
  ## resource label instead. If omitted it is not included in the metric name.
  namespace = "telegraf"

  ## Metric Type Prefix
  ## The DNS name used with the metric type as a prefix.
  # metric_type_prefix = "custom.googleapis.com"

  ## Metric Name Format
  ## Specifies the layout of the metric name, choose from:
  ##  * path: 'metric_type_prefix_namespace_name_key'
  ##  * official: 'metric_type_prefix/namespace_name_key/kind'
  # metric_name_format = "path"

  ## Metric Data Type
  ## By default, telegraf will use whatever type the metric comes in as.
  ## However, for some use cases, forcing int64, may be preferred for values:
  ##   * source: use whatever was passed in
  ##   * double: preferred datatype to allow queries by PromQL.
  # metric_data_type = "source"

  ## Tags as resource labels
  ## Tags defined in this option, when they exist, are added as a resource
  ## label and not included as a metric label. The values from tags override
  ## the values defined under the resource_labels config options.
  # tags_as_resource_label = []

  ## Custom resource type
  # resource_type = "generic_node"

  ## Override metric type by metric name
  ## Metric names matching the values here, globbing supported, will have the
  ## metric type set to the corresponding type.
  # metric_counter = []
  # metric_gauge = []
  # metric_histogram = []

  ## NOTE: Due to the way TOML is parsed, tables must be at the END of the
  ## plugin definition, otherwise additional config options are read as part of
  ## the table

  ## Additional resource labels
  # [outputs.stackdriver.resource_labels]
  #   node_id = "$HOSTNAME"
  #   namespace = "myapp"
  #   location = "eu-north0"

Input and output integration examples

Hashicorp Nomad

  1. Cluster Health Monitoring: Use the Hashicorp Nomad plugin to aggregate metrics across all nodes in a Nomad deployment. By monitoring health metrics such as allocation status, job performance, and resource utilization, operations teams can gain insights into the overall health of their deployment, quickly identify and resolve issues, and optimize resource allocation based on real-time data.

  2. Performance Analytics for Job Execution: Leverage the metrics provided by Nomad to analyze job execution times and resource consumption. This use case enables developers to adjust job parameters effectively, optimize task performance, and illustrate trends over time, ultimately leading to increased efficiency and reduced costs in resource allocation.

  3. Alerting on Critical Conditions: Implement alerting mechanisms based on metrics scraped from Nomad agents. By setting thresholds for critical metrics like CPU usage or failed job allocations, teams can proactively respond to potential issues before they escalate, ensuring higher uptime and reliability for applications running on the Nomad platform.

  4. Integration with Visualization Tools: Use the data collected by the Hashicorp Nomad plugin to feed into visualization tools for real-time dashboards. This setup allows teams to monitor cluster workloads, job states, and system performance at a glance, facilitating better decision-making and strategic planning based on visual insights into the Nomad environment.

Google Cloud Monitoring

  1. Multi-Project Metric Aggregation: Use this plugin to send aggregated metrics from various applications across different projects into a single Google Cloud Monitoring project. This use case helps centralize metrics for teams managing multiple applications, providing a unified view for performance monitoring and enhancing decision-making. By configuring different quota projects for billing, organizations can ensure proper cost management while benefiting from a consolidated monitoring strategy.

  2. Anomaly Detection Setup: Integrate the plugin with a machine learning-based analytics tool that identifies anomalies in the collected metrics. Using the historical data provided by the plugin, the tool can learn normal baseline behavior and promptly alert the operations team when unusual patterns arise, enabling proactive troubleshooting and minimizing service disruptions.

  3. Dynamic Resource Labeling: Implement dynamic tagging by utilizing the tags_as_resource_label option to adaptively attach resource labels based on runtime conditions. This setup allows metrics to provide context-sensitive information, such as varying environmental parameters or operational states, enhancing the granularity of monitoring and reporting without changing the fundamental metric structure.

  4. Custom Metric Visualization Dashboards: Leverage the data collected by the Google Cloud Monitoring output plugin to feed a custom metrics visualization dashboard using a third-party framework. By visualizing metrics in real-time, teams can achieve better situational awareness, notably by correlating different metrics, improving operational decision-making, and streamlining performance management workflows.

Feedback

Thank you for being part of our community! If you have any general feedback or found any bugs on these pages, we welcome and encourage your input. Please submit your feedback in the InfluxDB community Slack.

Powerful Performance, Limitless Scale

Collect, organize, and act on massive volumes of high-velocity data. Any data is more valuable when you think of it as time series data. with InfluxDB, the #1 time series platform built to scale with Telegraf.

See Ways to Get Started

Related Integrations

HTTP and InfluxDB Integration

The HTTP plugin collects metrics from one or more HTTP(S) endpoints. It supports various authentication methods and configuration options for data formats.

View Integration

Kafka and InfluxDB Integration

This plugin reads messages from Kafka and allows the creation of metrics based on those messages. It supports various configurations including different Kafka settings and message processing options.

View Integration

Kinesis and InfluxDB Integration

The Kinesis plugin allows for reading metrics from AWS Kinesis streams. It supports multiple input data formats and offers checkpointing features with DynamoDB for reliable message processing.

View Integration