Simon Pasquier
81c0ab69e0
Don't reset FiredAt for inactive alerts
...
Otherwise AlertManager receives resolved alerts where StartsAt is zero which
fails the validation.
7 years ago
Brian Brazil
30b4439bbd
Remove rule_type label from rule metrics.
...
This is not really needed now that we have rule groups
to distinguish rules.
7 years ago
Brian Brazil
b97f4cf48c
Add metrics for rule group interval and last duration.
7 years ago
Brian Brazil
0a42a9fc8f
Copy over rule group duration on reload.
...
This is currently getting lost, this will soon be in a metric and we
don't want it dropping to 0 on every reload.
7 years ago
Brian Brazil
aa370fa568
Clarify metric names around rule groups.
...
Make it clear they're about overall rule groups.
7 years ago
Fabian Reinartz
62461379b7
rules: decouple notifier packages
...
The dependency on the notifier packages caused a transitive dependency
on discovery and with that all client libraries our service discovery
uses.
7 years ago
Fabian Reinartz
4d964a0a0d
rules: make glob expansion a concern of main
7 years ago
Fabian Reinartz
bd9f7460eb
rules: remove config package dependency
7 years ago
Fabian Reinartz
2d0e3746ac
rules: remove dependency on promql.Engine
7 years ago
Fabian Reinartz
83cd270ea4
*: adapt to storage interface changes
7 years ago
Goutham Veeramachaneni
a880c86375
Fix unexported method on exported interface.
...
Also move to model.Duration
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
7 years ago
conorbroderick
55aaece116
Add rule evaluation time
7 years ago
Goutham Veeramachaneni
e1117715fe
rules: remove skipped iterations cuz no throttling
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
7 years ago
Jorge Hernández
6cd0f63eb1
Use testutil in rules subpackage ( #3278 )
...
* Use testutil in rules subpackage
* Fix manager test
* Use testutil in rules subpackage
* Fix manager test
* Fix rebase
* Change to testutil for applyConfig tests
7 years ago
Krasi Georgiev
e86d82ad2d
Fix regression of alert rules state loss on config reload. ( #3382 )
...
* incorrect map name for the group prevented copying state from existing alert rules on config reload
* applyConfig test
* few nits
* nits 2
7 years ago
Julius Volz
099df0c5f0
Migrate "golang.org/x/net/context" -> "context" ( #3333 )
...
In some places, where ctxhttp or gRPC are concerned, we still need to use the
old contexts.
7 years ago
Brian Brazil
cc5499fcad
Only close after checking for err.
7 years ago
Brian Brazil
ee88f0d222
Ensure all values are used or _
7 years ago
Julius Volz
f7e8348a88
Re-add contexts to storage.Storage.Querier() ( #3230 )
...
* Re-add contexts to storage.Storage.Querier()
These are needed when replacing the storage by a multi-tenant
implementation where the tenant is stored in the context.
The 1.x query interfaces already had contexts, but they got lost in 2.x.
* Convert promql.Engine to use native contexts
7 years ago
beorn7
c2e9a151ab
Make all rule links link to the "Console" tab rather than "Graph"
...
Clicking on a rule, either the name or the expression, opens the rule
result (or the corresponding expression, repsectively) in the
expression browser. This should by default happen in the console tab,
as, more often than not, displaying it in the graph tab runs into a
timeout.
7 years ago
Fabian Reinartz
d21f149745
*: migrate to go-kit/log
7 years ago
Goutham Veeramachaneni
e1fc9dc78d
Move /rules to new format ( #2901 )
...
Fixes #2891
Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
7 years ago
Goutham Veeramachaneni
c472316fb3
Check done before every rule evaluation.
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
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>
8 years ago
Goutham Veeramachaneni
507790a357
Rework logging to use explicitly passed logger
...
Mostly cleaned up the global logger use. Still some uses in discovery
package.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
dc69645e92
Move back to go-yaml
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
5ff283a7b7
Reflect the grouping in the UI
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
8cca666cf2
Add file name to group.
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
e893c89333
Validate labels and annotations
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
a48a018368
Make sure groups are unique in a single file
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
cea1e99f78
Add update-rules command to promtool
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
8 years ago
Goutham Veeramachaneni
e8f55669ea
Move rules to new format
...
Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
8 years ago
Brian Brazil
dcea3e4773
Don't append a 0 when alert is no longer pending/firing
...
With staleness we no longer need this behaviour.
8 years ago
Brian Brazil
cc867dae60
Copy previous series and alert state more intelligently.
...
Usually rules don't more around, and if they do it's likely
that rules/alerts with the same name stay in the same order.
If rules/alerts with the same name are added/removed this
could cause a blip for one cycle, but this is unavoidable
without requiring rule and alert names to be unique - which we don't
want to do.
8 years ago
Brian Brazil
9bc68db7e6
Track staleness per rule rather than per group.
8 years ago
Brian Brazil
0451d6d31b
Add unittest for rule staleness, and rules generally.
8 years ago
Brian Brazil
0400f3cfd2
Very basic staleness handling for rules.
8 years ago
Alexey Palazhchenko
b0e1ea7c6c
Simplify code, fix typos. ( #2719 )
8 years ago
Julius Volz
ac203ef0ee
Add externalURL template function ( #2716 )
...
This allows users to e.g. add links back to the generating Prometheus
right in their alert templates.
8 years ago
Julius Volz
fe11c5933a
Fix mutation of active alert elements by notifier ( #2656 )
...
This caused the external label application in the notifier to bleed back
into the rule manager's active alerting elements.
8 years ago
Tobias Schmidt
eaf33759fb
Register forgotten prometheus_evaluator_iterations_total metric
8 years ago
Tobias Schmidt
aaaba57184
Export number of missed rule evaluations
...
In case the execution of all rules takes longer than the configured rule
evaluation interval, one or more iterations will be skipped. This needs
to be visible to the opterator.
8 years ago
Fabian Reinartz
5772f1a7ba
retrieval/storage: adapt to new interface
...
This simplifies the interface to two add methods for
appends with labels or faster reference numbers.
8 years ago
Fabian Reinartz
ad9bc62e4c
storage: extend appender and adapt it
8 years ago
Fabian Reinartz
e94b0899ee
rules: fix tests, remove model types
8 years ago
Fabian Reinartz
f8fc1f5bb2
*: migrate ingestion to new batch Appender
8 years ago
Fabian Reinartz
fecf9532b9
*: fix misc compile errors
8 years ago
Fabian Reinartz
622ece6273
*: fix recording tests, migrate matcher types
8 years ago
Fabian Reinartz
5817cb5bde
*: migrate from model.* to promql.* types
8 years ago
Fabian Reinartz
e68a3cf21f
rules: update annotations on each iteration
8 years ago