Goutham Veeramachaneni
243419c007
Return tsdb.ErrOutOfBounds as storage.ErrOutOfBounds
...
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-07-06 14:18:31 +02:00
Goutham Veeramachaneni
643c5837a0
Stop metrics that are 10mins ahead from now
...
Fixes #2893
Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
2017-07-04 15:34:08 +02:00
Goutham Veeramachaneni
3069bd3996
Handle scrapes with OutOfBounds metrics better
...
fixes #2894
Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
2017-07-04 11:24:13 +02:00
Fabian Reinartz
9ea748e745
Don't reallocate label set if still known
...
If the storage deprecates a ref, we have to re-insert with the full
label set. Typically that doesn't correlate with a new series being
created.
We can still use the allocated label set from before.
2017-06-26 14:38:57 +02:00
Fabian Reinartz
2368d2c45b
retrieval: fix memory leak in scrape cache
2017-06-26 00:24:54 +02:00
Fabian Reinartz
98c2d8477a
Merge pull request #2844 from Gouthamve/cobra
...
Move CLI commander to cobra
2017-06-19 11:59:52 +02:00
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>
2017-06-16 15:52:44 +05:30
Julius Volz
6f66125809
retrieval: Fix "up" reporting for failed scrapes
2017-06-14 22:22:12 -04:00
Fabian Reinartz
669075c6b9
Merge branch 'master' into dev-2.0
2017-06-06 09:36:51 +02:00
Fabian Reinartz
eb651233ac
Merge pull request #2787 from prometheus/limit2
...
Rework sample limit to work for 2.0
2017-06-06 08:21:12 +02:00
Brian Brazil
37bc607e96
Rework sample limit to work for 2.0
...
Correctly update reported series.
Increment prometheus_target_scrapes_exceeded_sample_limit_total.
Add back unittests.
Ignore stale markers when calculating sample limit.
Fixes #2770
2017-05-31 15:41:51 +01:00
Fabian Reinartz
bc7aff8cef
retrieval: extract scrape cache
2017-05-30 09:37:23 -07:00
Fabian Reinartz
a83014f53c
retrieval: fix memory leak and consumption for caches
2017-05-26 08:44:24 +02:00
Fabian Reinartz
3d8661b8d5
Add comment
2017-05-24 17:05:42 +02:00
Fabian Reinartz
43ca652217
retrieval: Don't allocate map on every scrape
2017-05-24 16:23:48 +02:00
Fabian Reinartz
d3f662f15e
Merge branch 'dev-2.0' into grobie/reduce-noisy-append-errors
2017-05-24 15:29:30 +02:00
Fabian Reinartz
d289dc55c3
storage: update TSDB
2017-05-22 11:53:08 +02:00
Brian Brazil
0920972f79
Initilise scraped sample map, and rename to series map.
2017-05-16 18:33:51 +01:00
Brian Brazil
bf38963118
Plumb through logger with target field to scrape loop.
2017-05-16 18:33:51 +01:00
Brian Brazil
d657d722dc
Log count of dupliates/out of order samples as warnings.
...
Keep log of each sample as debug log.
2017-05-16 18:33:51 +01:00
Brian Brazil
8b9d3e7547
Put end of run staleness handler in seperate function.
...
Improve log message.
2017-05-16 18:33:51 +01:00
Brian Brazil
d532272520
Add stalemarkers to synthetic series too when target stops.
2017-05-16 18:33:51 +01:00
Brian Brazil
b87d3ca9ea
Create stale markers when a target is stopped.
...
When a target is no longer returned from SD stop()
is called. However it may be recreated before the
next scrape interval happens. So we wait to set stalemarkers
until the scrape of the new target would have happened
and been ingested, which is 2 scrape intervals.
If we're shutting down the context will be cancelled,
so return immediately rather than holding things up for potentially
minutes waiting to safely set stalemarkers no newer than now.
If the server starts immediately back up again all is well.
If not, we're missing some stale markers.
2017-05-16 18:33:51 +01:00
Brian Brazil
95162ebc16
Add log messages for out of order samples
2017-05-16 18:33:51 +01:00
Brian Brazil
3c45400130
Don't fail scrape if one sample violates ordering.
...
In Prometheus 1.x one sample that is out of order
or that has a duplicate timestamp is discarded, and
the rest of the scrape ingestion continues on.
This will now also be true for 2.0.
2017-05-16 18:33:51 +01:00
Brian Brazil
fd5c5a50a3
Add stale markers on parse error.
...
If we fail to parse the result of a scrape,
we should treat that as a failed scrape and
add stale markers.
2017-05-16 18:33:51 +01:00
Brian Brazil
c0c7e32e61
Treat a failed scrape as an empty scrape for staleness.
...
If a target has died but is still in SD, we want the previously
scraped values to go stale. This would also apply to brief blips.
2017-05-16 18:33:51 +01:00
Brian Brazil
850ea412ad
If an explicit timestamp is provided, bypass staleness.
2017-05-16 18:33:51 +01:00
Brian Brazil
a5cf25743c
Move stalness check into a function
2017-05-16 18:33:51 +01:00
Brian Brazil
4f35952cf3
Inject a stale NaN when sample disappears between scrapes.
2017-05-16 18:33:51 +01:00
Brian Brazil
beaa7d5a43
Move consistent NaN logic into the parser.
2017-05-16 18:33:51 +01:00
Brian Brazil
76acf7b9b1
Ensure all the NaNs we ingest have the same bit pattern.
2017-05-16 18:33:51 +01:00
Brian Brazil
0eabed8048
Remove unused metric
2017-05-15 15:06:54 +01:00
Fabian Reinartz
76b3378190
retrieval: add missing scrape context cancelation
2017-05-11 17:20:03 +02:00
Julius Volz
f160f17a6f
retrieval: fix missing scrape context cancellation ( #2599 )
2017-05-11 16:15:07 +02:00
Tobias Schmidt
368206d2f5
Handle errSeriesDropped correctly
...
If metrics_relabel_configs are used to drop metrics, an errSeriesDropped
is returned. This shouldn't be used to return an error at the end of a
append() call.
2017-05-05 14:58:36 +02:00
Fabian Reinartz
e829dbe2be
retrieval: comment out accept header again
2017-04-27 11:46:08 +02:00
Fabian Reinartz
73b8ff0ddc
Merge branch 'master' into dev-2.0
2017-04-27 10:19:55 +02:00
Matt Layher
5e4f5fb5ad
retrieval: make scrape timeout header consistent with others
2017-04-05 14:56:22 -04:00
Alexey Palazhchenko
17f15d024a
Small fixes. ( #2578 )
...
Fix typos. Simplify with gofmt -s
2017-04-05 14:24:22 +01:00
Matt Layher
fe4b6693f7
retrieval: add Scrape-Timeout-Seconds header to each scrape request ( #2565 )
...
Fixes #2508 .
2017-04-04 18:26:28 +01:00
Fabian Reinartz
8ffc851147
Merge branch 'master' into dev-2.0
2017-04-04 15:17:56 +02:00
Julius Volz
815762a4ad
Move retrieval.NewHTTPClient -> httputil.NewClientFromConfig
2017-03-20 14:17:04 +01:00
Fabian Reinartz
c389193b37
Merge branch 'master' into dev-2.0
2017-03-17 16:27:07 +01:00
Fabian Reinartz
d9fb57cde4
*: Simplify []byte to string unsafe conversion
2017-03-07 11:41:11 +01:00
Erdem Agaoglu
8809735d7f
Setting User-Agent header ( #2447 )
2017-02-28 09:59:33 -04:00
Fabian Reinartz
cc0ff26f1f
retrieval: handle GZIP compression ourselves
...
The automatic GZIP handling of net/http does not preserve
buffers across requests and thus generates a lot of garbage.
We handle GZIP ourselves to circumvent this.t
2017-02-22 13:25:25 +01:00
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.
2017-02-02 13:05:46 +01:00
Fabian Reinartz
1d3cdd0d67
Merge branch 'master' into dev-2.0-rebase
2017-01-30 17:43:01 +01:00
Fabian Reinartz
598e2f01c0
retrieval: don't erronously break appending
2017-01-17 08:39:18 +01:00