Benji Visser
8bb6e0dd6e
Show rule evaluation errors on rules page ( #4457 )
...
* adding information about the health and errors for Rules
adding Health() and LastError() to the Rule interface. This will allow
us to easily surface information about rules.
Signed-off-by: noqcks <benny@noqcks.io>
* updating rules.html with fields for Rule errors and health state
Signed-off-by: noqcks <benny@noqcks.io>
* fix code comment grammar & access Rule health/error info using a mutex
Signed-off-by: noqcks <benny@noqcks.io>
* s/Errors/Error/ in rules.html to remain consistent with targets.html
Signed-off-by: noqcks <benny@noqcks.io>
* adding periods to code comments in reporting/alerting
Signed-off-by: noqcks <benny@noqcks.io>
* putting health/error below mutex in struct field
Signed-off-by: noqcks <benny@noqcks.io>
6 years ago
Julius Volz
90521a65f8
Remove error return value from NotifyFunc() ( #4459 )
...
It's always nil and we also forgot to check it.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
6 years ago
Ganesh Vernekar
f1db699dff
Persist alert 'for' state across restarts ( #4061 )
...
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
6 years ago
Max Leonard Inden
71fafad099
api/v1: Coninue work exposing rules and alerts
...
Signed-off-by: Max Leonard Inden <IndenML@gmail.com>
6 years ago
Bryan Boreham
afdb66dfac
Expose Group.CopyState() ( #4304 )
...
This makes the `rules` package more useful to projects that use
Prometheus as a library.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
6 years ago
Julius Volz
9e3171f6e3
rules: Minor naming/comment cleanups ( #4328 )
...
Signed-off-by: Julius Volz <julius.volz@gmail.com>
6 years ago
Alin Sinpalean
9dc763cc03
Run rule evaluation with timestamps precisely evaluation_interval apart ( #4201 )
...
* Run rule evaluation with timestamps precisely evaluation_interval apart from one another.
Signed-off-by: Alin Sinpalean <alin.sinpalean@gmail.com>
7 years ago
Mario Trangoni
464e747f1e
fix some comments typos ( #4059 )
7 years ago
Bryan Boreham
93494d8b7e
Add an OpenTracing span for each rule ( #4027 )
...
* Add an OpenTracing span for each rule
So that tags and child spans can be traced back to the rule that they
refer to.
7 years ago
ferhat elmas
ffa673f7d8
General simplifications ( #3887 )
...
Another try as in #1516
7 years ago
Fabian Reinartz
7ccd4b39b8
*: implement query params
...
This adds a parameter to the storage selection interface which allows
query engine(s) to pass information about the operations surrounding a
data selection.
This can for example be used by remote storage backends to infer the
correct downsampling aggregates that need to be provided.
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
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
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
ee88f0d222
Ensure all values are used or _
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
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
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
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
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
5817cb5bde
*: migrate from model.* to promql.* types
8 years ago
Jonathan Lange
d78dd3593d
Set evaluation interval on Group construction
...
Prevents having object in invalid state, and allows users of public API
to construct valid Groups.
8 years ago