graphite#

class platypush.plugins.graphite.GraphitePlugin(host: str = 'localhost', port: int = 2003, timeout: int = 5, **kwargs)[source]#

Bases: Plugin

Plugin for sending data to a Graphite instance.

__init__(host: str = 'localhost', port: int = 2003, timeout: int = 5, **kwargs)[source]#
Parameters:
  • host – Default Graphite host (default: ‘localhost’).

  • port – Default Graphite port (default: 2003).

  • timeout – Communication timeout in seconds (default: 5).

send(metric: str, value, host: str | None = None, port: int | None = None, timeout: int | None = None, tags: Dict[str, str] | None = None, prefix: str = '', protocol: str = 'tcp')[source]#

Send data to a Graphite instance.

Parameters:
  • metric – Metric name.

  • value – Value to be sent.

  • host – Graphite host (default: default configured host).

  • port – Graphite port (default: default configured port).

  • timeout – Timeout in seconds.

  • tags – Map of tags for the metric.

  • prefix – Metric prefix name (default: empty string).

  • protocol – Communication protocol - possible values: ‘tcp’, ‘udp’ (default: ‘tcp’).