Frederic Branczyk
f6c5a75661
discovery/kubernetes: Add Kubernetes EndpointSlice discovery
...
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
5 years ago
Martin Lee
b5d61fb66c
Add AMI to labels scraped during service discovery. ( #7386 )
...
Signed-off-by: Martin Lee <martin@martinlee.org>
5 years ago
Frederic Branczyk
7b1c0d6b66
discovery/kubernetes: Fix incorrect premature break of reading results
...
Previously `max` results stopped reading from results in tests
prematurely, as it stopped when `max` number of items were received from
the channel instead of `max` number of unique target groups received.
This caused flaky tests where the same target group was received
multiple times, as Kubernetes informers may emit the same event multiple
times.
Before this patch, running this test repeatedly failed eventually. After
this patch I have run the test many thousand times without failure.
```bash
go test -run TestEndpointsDiscoveryNamespaces -count 1000 -test.v
```
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
5 years ago
Tariq Ibrahim
06a6621b6c
update kubernetes to v1.18.x and update ingress apiVersion
...
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
5 years ago
Jop Zinkweg
1f69c38ba4
Add discovery support for triton compute nodes ( #7250 )
...
Added optional configuration item role, defaults to 'container' (backwards-compatible).
Setting role to 'cn' will discover compute nodes instead.
Human-friendly compute node hostname discovery depends on cmon 1.7.0:
c1a2aeca36
Adjust testcases to use discovery config per case as two different types are now supported.
Updated documentation:
* new role setting
* clarify what the name 'container' covers as triton uses different names in different locations
Signed-off-by: jzinkweg <jzinkweg@gmail.com>
5 years ago
Guangming Wang
5b4006ac86
cleanup: remove unnacessary nil check before range ( #7194 )
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
5 years ago
Bartlomiej Plotka
ee72599e5d
Reverted k8s-client-go
...
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
Bartlomiej Plotka
86ff4a1717
Updated all deps.
...
Pinned github.com/googleapis/gnostic as they introduced braking change.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
5 years ago
ZouYu
2b7437d60e
Fix some warnings: 'redundant type from array, slice, or map composite literal' ( #7109 )
...
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
5 years ago
Marek Slabicki
8224ddec23
Capitalizing first letter of all log lines ( #7043 )
...
Signed-off-by: Marek Slabicki <thaniri@gmail.com>
5 years ago
ZouYu
f494426f73
fix warning redundant type from array, slice, or map composite literal ( #7106 )
...
Signed-off-by: ZouYu <zouy.fnst@cn.fujitsu.com>
5 years ago
Tariq Ibrahim
0730d6eb74
remove deprecated methods from the MetricProvider interface
...
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
5 years ago
Deepjyoti Mondal
c38ca2ca95
Fix #6999 : Add architecture meta label for EC2 ( #7000 )
...
This PR adds architecture meta labels for EC2 instances
Signed-off-by: Deepjyoti Mondal <djmdeveloper060796@gmail.com>
5 years ago
coding3min
4dfbf328f2
[OpenStack SD] Add HypervisorID meta labels about id ( #6962 )
...
Add extra meta labels which will be useful in the case
Prometheus discovery hypervisor .
Signed-off-by: pzqu <pzqu@qq.com>
Co-authored-by: pzqu <pzqu@example.com>
5 years ago
Alex Gaganov
df92a00838
Expose EC2 instance lifecycle as label ( #6914 )
...
Signed-off-by: Alex Gaganov <alex.gaganov@fiverr.com>
5 years ago
Julien Pivotto
c67f81937c
discovery: updateGroup should not create targets[poolKey] in the loop ( #6903 )
...
We can assume that not all target groups are nil in normal scernarios,
so we can create targets[poolKey] outside the loop.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
5 years ago
Mathilde Gilles
9b9c58aea8
[Consul] Add health label to metrics ( #5313 )
...
Label metrics with the target health using consul's /health endpoint.
Signed-off-by: Mathilde Gilles <m.gilles@criteo.com>
5 years ago
Frederic Branczyk
d06f1034db
discovery/kubernetes: Fix race in test setup
...
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
5 years ago
李国忠
029b45aa30
add service type metadata to kubernetes_sd_config service role #6496 ( #6684 )
...
* [service discovery] add service type metadata to kubernetes_sd_config service role
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
* [fix] ServiceType -> string
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
* [fix] fix testcase
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
* [style]
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
* [doc] add service type
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
* [doc] sort
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
5 years ago
Simon Pasquier
06c1a07d5a
discovery/kubernetes: remove extraneous parameters from send()
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5 years ago
Aleksandra Gacek
8e53c19f9c
discovery/kubernetes: expose label_selector and field_selector
...
Close #6807
Co-authored-by @shuttie
Signed-off-by: Aleksandra Gacek <algacek@google.com>
5 years ago
Grebennikov Roman
b4445ff03f
discovery/kubernetes: expose label_selector and field_selector
...
Closes #6096
Signed-off-by: Grebennikov Roman <grv@dfdx.me>
5 years ago
Simon Pasquier
fe76ccbfe3
discovery/consul: fix logging of tags ( #6783 )
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5 years ago
Ben Ye
1a18594176
keep kubernetes metrics in global vars ( #6765 )
...
Signed-off-by: yeya24 <yb532204897@gmail.com>
5 years ago
Ben Ye
60527de355
keep consul service metrics in global variables ( #6764 )
...
Signed-off-by: yeya24 <yb532204897@gmail.com>
5 years ago
Julien Pivotto
cf42888e4d
Fix order of testutil.Equals ( #6695 )
...
Equals takes the expected value as first parameter, and the actual value
as second parameter.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
5 years ago
johncming
17683d074c
discovery: fix bug that use rlock for read. ( #5928 )
...
Signed-off-by: johncming <johncming@yahoo.com>
5 years ago
Julien Pivotto
2b2eb79e8b
Add windows tests for query logger ( #6653 )
...
* Add windows tests
* Do not rely on time.Time in timer
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
5 years ago
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>
5 years ago
Simon Pasquier
75470f86b4
discovery/kubernetes: fix client metrics
...
The Kubernetes client records workqueue duration and latency metrics as
seconds so there's no need to convert the values from microseconds to
seconds anymore.
The cache metrics (prometheus_sd_kubernetes_cache_*) are removed because
they aren't used anymore by the client though still exposed by its API.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5 years ago
Callum Styan
7bf17b654c
As per dev summit, SD moratorium has been lifted. ( #6324 )
...
Signed-off-by: Callum Styan <callumstyan@gmail.com>
5 years ago
Jean-Baptiste Le Duigou
5973227434
adding additional unit tests for getDataCenter() in consul ( #6192 )
...
* adding additional unit tests for getDataCenter() in consul
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Consult Tests : update comments to start with uppercase and end with point
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Consult Test : using table-driven tests
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Consul Test : cleaner syntax
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Consul Test : even cleaner syntax
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Consul Test : update comments
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Fixing naming convention by removing underscore in function name
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
* Removing duplicated test case for getDatacenter()
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
5 years ago
Yao Zengzeng
1afa476b8a
minor fix for making map ( #6076 )
...
Signed-off-by: YaoZengzeng <yaozengzeng@huawei.com>
5 years ago
Simon Pasquier
19ce6b7f5f
discovery: fix more error logs on context cancelation ( #6133 )
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5 years ago
Jean-Baptiste Le Duigou
0939d566f3
Improve test by asserting on whole Target Group object
...
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
5 years ago
Jean-Baptiste Le Duigou
3309ffa482
Fix imports
...
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
5 years ago
Jean-Baptiste Le Duigou
1f9eb09e8e
Improve unit tests for target group
...
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
5 years ago
Jean-Baptiste Le Duigou
5146bb14ef
adding unit test for target group ( #6138 )
...
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
5 years ago
Jean-Baptiste Le Duigou
15de05d55e
adding unit test for target group
...
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
5 years ago
Simon Pasquier
8ec6f02854
discovery: don't log errors on context cancelation
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5 years ago
Nevill
7465f27ea5
Refactor on discovery/manager_test.go
...
- Use testutil.ToFloat64 to collect testing metrics
- Declare ServiceDiscoveryConfig directly instead of calling Unmarshal on a piece of YAML
Signed-off-by: Nevill <nevill.dutt@gmail.com>
5 years ago
陈谭军
c6928b5c6e
fix-up typo unkown->unknown ( #6055 )
...
Signed-off-by: chentanjun <2799194073@qq.com>
5 years ago
Simon Pasquier
80bc8553be
discovery/file: fix flaky tests ( #5948 )
...
* discovery/file: fix flaky tests
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fix typos
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Add copyFileTo() method
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
5 years ago
Nevill
55661ab004
Set failedConfigs only once right after registerProviders finished
...
Signed-off-by: Nevill <nevill.dutt@gmail.com>
5 years ago
johncming
31a8ac3219
discovery/dns: add test case for SDConfig.UnmarshalYAML. ( #6035 )
...
* discovery/dns: Add code coverage.
Signed-off-by: johncming <johncming@yahoo.com>
* discovery/dns: add test case for SDConfig.UnmarshalYAML.
Signed-off-by: johncming <johncming@yahoo.com>
5 years ago
Nevill
048f81218d
Change prometheus_sd_configs_failed_total to Gauge
...
Signed-off-by: Nevill <nevill.dutt@gmail.com>
5 years ago
Harkishen Singh
d98d4a9bf0
remove resetting of manager properties and init manager props under locking ( #5979 )
...
Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
5 years ago
Tariq Ibrahim
f0a5f88b95
[prometheus_sd/kubernetes]add new node address types for discover ( #5902 )
...
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
5 years ago
Bartek Plotka
f0863a604e
Removed extra tsdb/testutil after merge.
...
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
5 years ago
Julius Volz
b5c833ca21
Update go.mod dependencies before release ( #5883 )
...
* Update go.mod dependencies before release
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Add issue for showing query warnings in promtool
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Revert json-iterator back to 1.1.6
It produced errors when marshaling Point values with special float
values.
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Fix expected step values in promtool tests after client_golang update
Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Update generated protobuf code after proto dep updates
Signed-off-by: Julius Volz <julius.volz@gmail.com>
5 years ago