# prometheus Tasks


Tasks for interacting with Prometheus. The main task are using pushgateway

# PushGaugeToGateway

class

prefect.tasks.prometheus.pushgateway.PushGaugeToGateway

(pushgateway_url=None, counter_name=None, counter_description=None, grouping_key=None, job_name=None, **kwargs)[source]

Task that allow you to push a Gauge to prometheus [PushGateway] (https://prometheus.io/docs/practices/pushing/).This method is using the prometheus_client.

This is a push mode task that it will remove all previous items that match the grouping key.

Some of the main usage of that task is to allow to push inside of your workflow to prometheus like number of rows, quality of the values or anything you want to monitor.

Args:

  • pushgateway_url (str, optional): Url of the prometheus pushgateway instance
  • counter_name (str, optional): Name of the counter
  • counter_description (str, optional): description of the counter
  • grouping_key (str, optional): List of the key used to calculate the grouping key
  • job_name (str, optional): Name of the job
  • **kwargs (dict, optional): additional keyword arguments to pass to the Task constructor



# PushAddGaugeToGateway

class

prefect.tasks.prometheus.pushgateway.PushAddGaugeToGateway

(pushgateway_url=None, counter_name=None, counter_description=None, grouping_key=None, job_name=None, **kwargs)[source]

Task that allow you to push add a Gauge to prometheus [PushGateway] (https://prometheus.io/docs/practices/pushing/). This method is using the prometheus_client.

This is a push add mode task that will add value into the same grouping key.

Some of the main usage of that task is to allow to push inside of your workflow to prometheus like number of rows, quality of the values or anything you want to monitor.

Args:

  • pushgateway_url (str, optional): Url of the prometheus pushgateway instance
  • counter_name (str, optional): Name of the counter
  • counter_description (str, optional): description of the counter
  • grouping_key (str, optional): List of the key used to calculate the grouping key
  • job_name (str, optional): Name of the job
  • **kwargs (dict, optional): additional keyword arguments to pass to the Task constructor



This documentation was auto-generated from commit e699fce
on October 14, 2021 at 18:31 UTC