graphite
#
Description#
Plugin for sending data to a Graphite instance.
Configuration#
graphite:
# [Optional]
# Default Graphite host (default: 'localhost').
# host: localhost # type=str
# [Optional]
# Default Graphite port (default: 2003).
# port: 2003 # type=int
# [Optional]
# Communication timeout in seconds (default: 5).
# timeout: 5 # type=int
Actions#
Module reference#
- 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’).