Levi Harrison
dc2f1993d8
Limit number of alerts or series produced by a rule ( #9260 )
...
* Add limit to rules
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 09:48:26 +02:00
Paweł Szulik
f5563bfe95
tests: Move from t.Errorf and others. (Part 2) ( #9309 )
...
* Refactor util tests.
Signed-off-by: Paweł Szulik <paul.szulik@gmail.com>
2021-09-13 21:19:20 +02:00
George Robinson
049b4f4f13
Support customization of template options in TemplateExpander ( #9290 )
...
Signed-off-by: George Robinson <george.robinson@grafana.com>
2021-09-13 17:19:08 +05:30
Michal Wasilewski
3f686cad8b
fixes yamllint errors
...
Signed-off-by: Michal Wasilewski <mwasilewski@gmx.com>
2021-06-12 12:47:47 +02:00
Levi Harrison
17ea8d006a
Added external URL access
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-30 23:35:26 -04:00
Julien Pivotto
6c56a1faaa
Testify: move to require ( #8122 )
...
* Testify: move to require
Moving testify to require to fail tests early in case of errors.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
* More moves
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-29 09:43:23 +00:00
Julien Pivotto
4e5b1722b3
Move away from testutil, refactor imports ( #8087 )
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-22 11:00:08 +02:00
Max Neverov
7c8bbd6bcb
Add fmt rule check: labels with the name __name__ are invalid ( #7787 )
...
Signed-off-by: Max Neverov <neverov.max@gmail.com>
2020-08-12 23:37:31 +02:00
Julien Pivotto
fd06416057
Use strict unmarshalling of rules ( #7767 )
...
* Fix unmarshalling of rules
Fix #7042
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-09 15:42:25 +02:00
Callum Styan
0f76024eeb
Clarify error messaging, group names must be provided. ( #7529 )
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-07-08 15:00:06 -07:00
Mikael Johansson
a98be49c52
Change rule index numbering from 0 to n+1 on errors found in rule files ( #7495 )
...
* Change rule index numbering from 0 to n+1 on errors found in rule files
Signed-off-by: Mikael Johansson <mik.json@gmail.com>
2020-07-02 11:09:01 +01:00
johncming
51c824543b
fix bug missing an error. ( #7020 )
...
Signed-off-by: johncming <johncming@yahoo.com>
2020-03-21 12:05:19 +00:00
Tobias Guggenmos
20b1f596f6
Fix build errors in rest of prometheus
...
Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2020-02-17 16:09:23 +01:00
Harkishen Singh
84e6459c4d
Adds support for line-column numbers for invalid rules, promtool ( #6533 )
...
Signed-off-by: Harkishen Singh <harkishensingh@hotmail.com>
2020-01-15 18:07:54 +00:00
Josh Soref
91d76c8023
Spelling ( #6517 )
...
* spelling: alertmanager
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: attributes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: autocomplete
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: bootstrap
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: caught
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: chunkenc
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: compaction
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: corrupted
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: deletable
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: expected
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: fine-grained
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: initialized
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: iteration
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: javascript
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: multiple
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: number
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: overlapping
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: possible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: postings
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: procedure
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: programmatic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: queuing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: querier
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: repairing
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: received
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: reproducible
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: retention
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: sample
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: segements
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: semantic
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: software [LICENSE]
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: staging
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: timestamp
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: unfortunately
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: uvarint
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: subsequently
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: ressamples
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-01-02 15:54:09 +01:00
Simon Pasquier
06066a3619
*: improve error messages when parsing bad rules ( #5965 )
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-08-28 17:36:48 +02:00
Bjoern Rabenstein
38d518c0fe
Rework #5009 after comments
...
Signed-off-by: Bjoern Rabenstein <bjoern@rabenste.in>
2019-04-17 01:40:10 +02:00
Sylvain Rabot
335a34486e
Add external labels to template expansion
...
This affects the expansion of templates in alert labels and
annotations and console templates.
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2019-04-17 01:40:10 +02:00
Tariq Ibrahim
8fdfa8abea
refine error handling in prometheus ( #5388 )
...
i) Uses the more idiomatic Wrap and Wrapf methods for creating nested errors.
ii) Fixes some incorrect usages of fmt.Errorf where the error messages don't have any formatting directives.
iii) Does away with the use of fmt package for errors in favour of pkg/errors
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-26 00:01:12 +01:00
AixesHunter
29f21b8d0c
import aliases yaml that can be omitted ( #5018 )
...
Signed-off-by: aixeshunter <aixeshunter@gmail.com>
2018-12-20 09:45:30 +00:00
Ganesh Vernekar
05726c5ea2
Test template expansion while loading groups ( #4537 )
...
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-13 13:55:58 +01:00
Manos Fokas
25f929b772
Yaml UnmarshalStrict implementation. ( #4033 )
...
* Updated yaml vendor package.
* remove checkOverflow duplicate in rulefmt
* remove duplicated HTTPClientConfig.Validate()
* Added yaml static check.
2018-04-04 09:07:39 +01:00
Julius Volz
192e665317
rulefmt: Allow parsing from bytes instead of file
...
This makes the rulefmt package more reusable for users whose rulesets are not
stored in files on disk. Concrete example: Cortex.
2018-01-22 11:46:55 +01:00
Conor Broderick
59d4c539d1
Added rule name to rule error for easier debugging ( #3549 )
2017-12-06 15:39:06 +00:00
Krasi Georgiev
3697075b8f
validates that the recording name to include only allowed characters. ( #3305 )
2017-10-17 10:22:59 +01:00
Goutham Veeramachaneni
592cb00c2f
Remove version from RuleGroups
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-19 16:38:46 +05:30
Goutham Veeramachaneni
6b70a4d850
Incorporate PR feedback
...
* Move fingerprint to Hash()
* Move away from tsdb.MultiError
* 0777 -> 0666 for files
* checkOverflow of extra fields
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-16 16:44:33 +05:30
Goutham Veeramachaneni
dc69645e92
Move back to go-yaml
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-16 10:46:21 +05:30
Goutham Veeramachaneni
e893c89333
Validate labels and annotations
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-14 15:07:54 +05:30
Goutham Veeramachaneni
c884881f7d
Add License Header
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-14 13:34:13 +05:30
Goutham Veeramachaneni
2d1e92513b
Add tests
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-14 13:21:32 +05:30
Goutham Veeramachaneni
a48a018368
Make sure groups are unique in a single file
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-14 12:19:21 +05:30
Goutham Veeramachaneni
cea1e99f78
Add update-rules command to promtool
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-14 11:38:54 +05:30
Goutham Veeramachaneni
e8f55669ea
Move rules to new format
...
Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
2017-06-12 18:14:39 +05:30
Fabian Reinartz
c843a0cd29
pkg/rulefmt: Add rule group parsing
2017-06-07 17:06:23 +02:00