3.11.0 (29-03-2022)
- Added
notificationUids
toAlertBuilder
. - Fixed fields
onNoData
,onExecutionError
type inAlertBuilder
. - Methods
metric
andprometheusMetric
inMetricsBuilder
return referenceId of the metric created. - Added
ConditionBuilder.min
condition.
3.10.0 (18-02-2022)
Add aliasSub
function
3.9.0 (15-10-2021)
- Predefined "Prometheus" datasource added;
- Custom datasource factory methods implemented:
graphiteDatasource(name: String)
,prometheusDatasource(name: String)
,zabbixDatasource(name: String)
; - String alert notificationIds supported.
3.8.1 (07-09-2021)
- Fix generation referenceId for prometheus metric.
3.8.0 (07-09-2021)
- For PrometheusMetric added the ability to pass lables for not equals match, regex-match, not regex-match.
3.7.0 (07-09-2021)
- Added
referenceId
,hidden
optional parameters toMetricsBuilder.prometheusMetric
. - Parameter
metric
inAlertQuery
is now optional. - Added method
query(metricId, duration)
toConditionBuilder
.
3.6.0 (01-09-2021)
- Added functions and operators to support PromQl metrics.
- Added generic methods to PanelBuilders to support different datasources.
3.5.0 (26-08-2021)
- The repository moved yoomoney-tech -> yoomoney
3.4.0 (24-08-2021)
instant
parameter was added for promQl metric
3.3.0 (24-08-2021)
- Datasource
Datasources.PromQl
was added - Panel with type
stat
was added
3.2.3 (24-05-2021)
- Change version library-project-plugin 7.1.2 -> 7.+
3.2.2 (20-05-2021)
- Сборка проекта переведена на library-project-plugin.
3.2.1 (12-03-2021)
- Fix tests
3.2.0 (12-03-2021)
- Add the ability to configure
fields
parameter in classStatPanelReduceOptions
used to set select the fields that should be included in the panel
3.1.0 (01-03-2021)
- Add
for
alert property - Add
No data
andKeep last state
alerting states
3.0.0 (01-03-2021)
- Move changes from private version
- Build and publication via artifact-release-plugin
- breaking-changes everything has been moved from package
ru.yandex.money.tools
toru.yoomoney.tech
2.25.0 (18-02-2021)
- Change yamoney-kotlin-module-plugin to ru.yoomoney.gradle.plugins.kotlin-plugin
2.24.0 (08-12-2020)
- Add
removeAbovePercentile
graphite function implementation - Add
max
alert condition
2.23.0 (01-12-2020)
- Add
movingMax
graphite function implementation
2.22.0 (11-11-2020)
- Added new Stat panel. Single stat now deprecated
2.21.0 (22-07-2020)
Zabbix
datasource metric withText
query mode now support parametertextFilter
.
2.20.0 (08-07-2020)
- Update gradle version 6.0.1 -> 6.4.1.
2.19.0 (24-04-2020)
- Add
keepLastValue
graphite function implementation
2.18.1 (27-02-2020)
- Don't add bibucket pull request link into changelog.md on release
2.18.0 (07-02-2020)
- Added java 11 support
2.17.0 (03-02-2020)
- Update gradle version 4.10.2 -> 6.0.1
2.16.0 (24-12-2019)
- Add the ability to configure dashboard annotation with Graphite datasource. See
AnnotationDemo.kts
2.15.0 (17-12-2019)
- Add an
alignTo
attribute to thesummarize
function - Add graphite function
Group
. Takes an arbitrary number of seriesLists and adds them to a single seriesList. - Add
TablePanel
class and builder. The table panel is very flexible, supporting both multiple modes for time series as well as for table, annotation and raw JSON data. It also provides date formatting and value formatting and coloring options. See usage examples inGrafanaDemoLayouts.kts
2.14.0 (12-12-2019)
- Update repeating panels. Grafana 6.0 and newer
minSpan
replaced by propertymaxPerRow
. SetmaxPerRow
to tell grafana how many panels per row you want at most.
2.13.1 (04-12-2019)
- Replace static code analyzer from
spotbugs
todetekt
2.13.0 (04-12-2019)
- Add graphite functions:
AliasByMetric
,Derivative
,NonNegativeDerivative
- Add
fillGradient
field toGraphPanelBuilder
- Make
referenceId
param optional inMetricsBuilder#metric
by auto generation (sequence 'A'..'Z')
2.12.0 (03-12-2019)
- Added
current
field of typeCurrentVariableValue
in classQueryVariable
used to set default value for this variable type
2.11.0 (27-11-2019)
- Add
BYTES_PER_SECOND
Unit for YAxis - Add the ability to group the values of query variable into selectable tags
val variable by builder.query(datasource = Zabbix, query = "App version") {
tags = VariableTags("*.*", "*.\$tag")
}
2.10.0 (22-11-2019)
- Add
MICROSECONDS
Unit for YAxis
2.9.0 (21-10-2019)
- Grafana dashboard links are now supported.
There are two types of links:
LinkToUrl
a link implementation that points to an arbitrary resource.LinkToDashboards
a link implementation that dynamically forms links to other dashboards by their tags
See usage examples in LinksDemo.kts
2.8.0 (17-10-2019)
- Some changes in YooMoney internal build cycle. No new functionality was added.
2.7.1 (10-10-2019)
- The validation for Dashboard#uid field has been added. It can contain no more than 40 characters now, according to the Grafana API. Otherwise exception will be thrown.
2.7.0 (09-10-2019)
- Add the ability to make the dashboard editable
Dashboards will be created editable by default
dashboard(title = "Editable dashboard") {
editable = true
panels {
panel(title = "Test Panel") {
properties {
it["type"] = "graph"
}
}
}
}
2.6.0 (08-10-2019)
- Add the ability to make rows collapsed
row("Collapsed row", collapsed = true) {
panel("Test panel") {}
}
2.5.1 (04-10-2019)
- Make the text panel title optional
2.5.0 (03-10-2019)
- Add the ability to change the x-axis mode.
You can select one of the 3 modes: time, series, histogram by specifying the required properties for each of them.
dashboard(title = "My dashboard") {
panels {
graphPanel(title = "Graph with Time X-Axis") {
xAxis = XAxis()
}
graphPanel(title = "Graph Histogram") {
val xAxis = XAxis(mode = Histogram(buckets = 10))
}
graphPanel(title = "Graph Series") {
val xAxis = XAxis(show = false, mode = Series(value = Series.ValueType.COUNT))
}
}
}
- Add repeating Graph panels
Template variables can be very useful to dynamically change your queries across a whole dashboard. If you want Grafana to dynamically create new panels or rows based on what values you have selected you can use the Repeat feature. If you have a variable with Multi-value or Include all value options enabled you can choose one panel and have Grafana repeat that panel for every selected value.
dashboard(title = "My dashboard") {
panels {
val graphiteHosts by variables.query(datasource = Graphite, query = "*.*")
graphPanel(title = "Graph by ${graphiteHosts.asVariable()}") {
repeat(graphiteHosts) {
direction = Horizontal(6)
}
metrics {
metric("A") {
"*.another.metric.mean" groupByNodes 0
}
}
}
}
}
- Add the panel description, displayed on hover of info icon in the upper left corner of the panel.
dashboard(title = "My dashboard") {
panels {
graphPanel(title = "Graph") {
description = "Panel description"
metrics {
metric("A") {
"*.another.metric.mean" groupByNodes 0
}
}
}
}
}
2.4.1 (01-10-2019)
- Fix the generation of the
id
andposition
fields for the panels for each dashboard:
- Generator now resets an id to 1 for new panels
- Generator now resets an position to x=0 y=0 for new panels
- Now you can use
override
function in the metrics builder
2.4.0 (30-09-2019)
- Add
TextPanel
class and builder. text panel lets you make information and description panels etc. for your dashboards.
mode
- Here you can choose between markdown, HTML or text.content
- Here you write your content.
dashboard(title = "Dashboard with Text Panel") {
panels {
textPanel("Description") {
mode = ContentMode.MARKDOWN
content = "### Text Panel with MD content"
}
}
}
- Update
Legend.kt
class:
- Added new field
sideWidth
Available when To the right is checked. Value to control the minimum width for the legend (default 0)
- Added
ConsolidateBy
graphite function and correspondingconsolidateBy()
extension functions forMetric
val metric = "*.*.*.requests.incoming.*.*.process_time.*.count" consolidateBy MAX
2.3.0 (26-09-2019)
Singlestat
panel are now supported. The panel can be configured with metrics fromZabbix
withMetrics
andText
query modes. Can also be customizedValue Mappings
andTime Range
tabs andReapeat
function that can apply panel for all values from variable.
2.2.0 (23-09-2019)
- Added ability to set a selected index in a custom variable
- Update
CustomVariable
class:
- Remove condition for setting selected index in
constructor
- Add field
selectedIndex
with default value "0"
2.1.0 (19-09-2019)
- Added possibility to specify names of options in a custom variable.
2.0.1 (12-09-2019)
- Delete deprecated objects:
Interval
Query
- Delete deprecated builders:
VariableBuilder
QueryBuilder
2.0.0 (11-09-2019)
- Update class
Dashboard
:
- Add field
uid
to change dashboard url:https://localhost:8500/d/uid/dashboard-name
- Refactor class
YAxis
:
- Field
format
change name tounit
and type to enumYAxis.Unit
- Change field
decimals
default value from1
tonull
(auto
in Grafana)
- Refactor class
GraphPanel
:
- Change field
decimals
default value from2
tonull
(auto
in Grafana) - Change field
lineWidth
default value from2
to1
- Change field
fill
default value from0
to1
- Change field
nullPointMode
name tonullValue
and default value fromnull as zero
tonull
- Delete field
type
and add fieldslines
andbars
. Setlines
default value totrue
- Change field
stacked
default value tofalse
1.11.0 (10-09-2019)
- New fields at
GraphPanel
class:
staircase
field can be changeStaircase
display parameter on graph paneldecimals
field can be changeDecimals
legend parameter that override automatic decimal precision
- New functions for
metrics
:
sortByTotal
sorts the list of metrics in descending order by the sum of values across the time period specified.perSecond
represents packets of metric per second if packets are higher.asPercent
represents the ratio of one metric to another as a percentage.override
accepts onalias(...)
function and overrides parameters
- New classes:
HoverTooltip
overrides default Hover tooltip parameters on graph display menu
1.10.0 (13-06-2019)
- Added possibility to specify several nodes in
aliasByNode
function
1.9.0 (15-05-2019)
- Build configuration moved to
yoomoney-kotlin-module-plugin
1.8.1 (14-05-2019)
- Added repository with Gradle plugins
1.8.0 (17-04-2019)
- Grafana Annotations are now supported. There is
ZabbixAnnotation
an annotation implementation that uses Zabbix as query datasource. See usage examples inAnnotationsDemo.kts
example Color
class has changes:- New method
asRgbaString
that returns string representation of color in formatrgba(red,green,blue,1)
- New method
asHexString
that returns string representation of color in format#hex(reg)hex(green)hex(blue)
- Method
asString
is alias forasHexString
now - Companion factory method
of
is alias for new secondary constructor
1.7.0 (10-04-2019)
- Added
GroupByNodes
graphite function and correspondinggroupByNodes()
extension functions forMetric
1.6.1 (28-03-2019)
- Fix aggregation in
Highest
graphite function
1.6.0 (22-03-2019)
- Added ability to specify minimum and maximum values for Y axis
1.5.0 (20-03-2019)
- Methods that created variables delegates in
DashboardBuilder
are deprecated now and will be deleted in next major release. To create variable delegate useVariablesBuilder
class instead.
The old way to create variable delegate:
dashboard(title = "My dashboard") {
val myVar by variable {
interval(1.m, 10.m)
}
}
Since 1.5.0
this code should be like this:
dashboard(title = "My dashboard") {
val myVar by variables.interval(1.m, 10.m) // variables is an instance of VariablesBuilder class provided by DashboardBuilder
}
-
Method
Variable.asVariable()
now have default implementation -
BaseVariable
was reworked: -
hidden
property was removed, usehidingMode
property instead. Now,hidden = true
equals tohidingMode = HidingMode.VARIABLE
andhidden = false
equals tohidingMode = HidingMode.NONE
-
query
property was moved to other variable implementations (e.g.QueryVariable
) -
includeAll
property was moved to other variable implementations (e.g.CustomVariable
) -
Added optional
displayName
property for Grafana variables labels
To support backward compatibility with 1.4.0
there is new companion object's method invoke
that supports old-style
format of BaseVariable
. This method is marked as deprecated and will be deleted in next major release.
-
Query
class marked as deprecated and will be deleted in next major release. UseQueryVariable
instead -
Interval
class marked as deprecated and will be deleted in next major release. UseIntervalVariable
instead -
More types of variable added:
-
const
variable with fixed value -
custom
variable with array of fixed values -
textbox
variable with ability to edit variable value on the fly -
null
s are not supported forDatasource.asDatasourceName()
any more. Since1.5.0
, this method should return non-null values only.NullDatasource
marked as deprecated and will be deleted in next major release -
New graphite function was added:
highest(metric, n, aggregation)
that can be used to draw N metrics aggregated by given function. SeeHighest
class for details
1.4.0 (19-03-2019)
- Improve CHANGELOG.md next version description format
1.3.0 (14-03-2019)
- Now it's possible to change decimal value for Y-axis. You can specify precision of values by Y-axis correspond with your requirements.
dashboard(title = "My dashboard") {
panels {
graphPanel(title = "MyPanel") {
leftYAxis = YAxis(decimals = 3)
}
}
}
- Support for repeatable rows has been added. It's possible to use repeatable row with set of panels, based on variable.
dashboard(title = "My dashboard") {
val values by variable(datasource = Zabbix) {
query("My variable") {
regex = ".*"
}
}
panels {
row("My Row", repeatFor = values) {
}
}
}
1.2.1 (29-01-2019)
- Translate README, CHANGELOG and comments to english
1.2.0 (10-01-2019)
- Block
Legend
forGraphPanel
can now be customised. There are two default implementations:DEFAULT
- showsmin
,max
,avg
,current
,total
for each metricEMPTY
- shows only names/aliases for metrics
GraphPanel
can now be configured to showpoints
with the specifiedpointradius
- Can now configure null point mode in
GraphPanel
viaNullPointMode
- Fill ratio can now be configured for
fill
graphic inGraphPanel
- Added some common colors for Grafana to
Color
- Block
aliasColors
can now be configured forGraphPanel
- Parameter
averageSeries
can now be specified inMetric
Dashboard
can now accept time interval from start of a day -now/d
1.1.1 (05-12-2018)
- Fix link to examples in build-script
1.1.0 (04-12-2018)
- Examples of DSL usage
- Function
movingMedian
can now acceptVariable
1.0.5 (29-11-2018)
- Improved README.md
- Publish javadoc
1.0.2 (26-11-2018)
- Fix public build
1.0.1 (26-11-2018)
- Gradle build for github
1.0.0 (22-11-2018)
- First release