Graphite plugin
Overview
The Graphite plugin connects QALIPSIS to Graphite using the pickle or plaintext protocol.
- Technology addressed
-
Graphite: https://graphiteapp.org/
- Dependency
-
io.qalipsis:plugin-graphite - Namespace in scenario
-
graphite() - Client library
- Supported steps
Example scenarios using a combination of Graphite supported steps are provided in Github.
Poll step
The poll step within the the Graphite plugin collects metrics from a Graphite server and broadcasts them to other components.
- Ancestor
-
Scenario or Step
- Functionality
-
The ‘poll’ step is typically used to collect and distribute metrics for monitoring and visualization purposes.
- Example
graphite().poll {
name = "my-poll-step"
connect {
server("http://localhost:8080")
}
query(
GraphiteQuery("device.battery-state.*")
.from(
GraphiteMetricsTime(
2,
GraphiteMetricsTimeSignUnit.MINUS,
GraphiteMetricsTimeUnit.DAYS
)
)
.noNullPoints(true)
)
broadcast(123, Duration.ofSeconds(20))
pollDelay(Duration.ofSeconds(1))
}
- Notable parameters
-
-
connect(required): configures the connection to the Graphite server. -
query(required): specifies a query to retrieve metrics from the Graphite server. -
broadcast(required): specifies the broadcast parameters for the step. -
pollDelay(required):query(required): specifies a query to retrieve metrics from the Graphite server.
-
- Reference documentation
-
Refer to the Graphite documentation for parameter and configuration information.
Save step
The save step within the Graphite plugin persists records into a Graphite database using the save query.
- Ancestor
-
Scenario or Step
- Functionality
-
The
savestep’s input and step context are used to generate documents to save into Graphite. - Example
.graphite()
.save {
connect {
server("localhost", 2003)
}
records { _, input ->
listOf(
GraphiteRecord(
metricPath = "device.battery-state.${input.deviceId.lowercase()}",
value = input.batteryLevel,
timestamp = input.timestamp
)
)
}
}
Configuration of publication of events and meters to Graphite.
Example configuration file
events:
export:
graphite:
enabled: true
min-level: INFO
host: localhost
port: 2004
protocol: pickle
batch-size: 2
linger-period: 10s
publishers: 2
meters:
export:
graphite:
host: localhost
port: 2004
enabled: true
step: PT10S
- Event parameters
-
-
enabled(required): boolean flag that activates/deactivates event publishing to Graphite; defaults tofalse; must be set totrue. -
min-level(required): minimal accepted level of events; defaults to INFO; allowed values areEventLevelvalues:TRACE,DEBUG,INFO,WARN,ERROR,OFF. -
host(required): defaults tolocalhost; cannot be blank. -
port(required): positive integer; defaults to2004 -
protocol(required): the GraphiteProtocol type; default ispickle; available choices arepickleorplaintext. -
batch-size(required): maximum number of events buffered between two publications of events to Graphite; positive integer; defaults to2. -
linger-period(required): maximum period between two publications of events to Graphite; positive duration; defaults to10s. -
publishers(required): maximum number of concurrent publication of events to Graphite; positive integer; defaults to2.
-
- Meter parameters
-
-
enabled(required): boolean flag that activates/deactivates meter publishing to Graphite; defaults tofalse; must be set totrue. -
host(required): defaults to localhost; cannot be blank. -
port(required): positive integer; defaults to2004. -
step(required): The step size (reporting frequency); defaults toPT10S.
-