Charles Korn
2329fba0e5
Fix linting issues in comments ( #13178 )
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2023-11-23 09:07:23 +00:00
Etourneau Gwenn
b37258c99b
Added Caching of network interface for Azure ( #12622 )
...
* Added Caching of network interface for Azure
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Rename Counter for Azure cache
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Format with goimports
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Updated duration comparaison
Enabled cache by default with 5x the default refresh time
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Change random function
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Remove refresh interval
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Remove from config as well
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
* Reformat config_test
Removed uneeded error
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
---------
Signed-off-by: Etourneau Gwenn <getourneau@yugabyte.com>
2023-11-21 11:59:17 +00:00
Oleksandr Redko
fa90ca46e5
ci(lint): enable godot; append dot at the end of comments
...
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-10-31 19:53:38 +02:00
Matthieu MOREL
bbdc7d5902
Update Azure SDK For Go
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-10-14 03:39:31 +00:00
Jayapriya Pai
e44d5dfb3a
AZURE SD: Validate HTTP config
...
Related-to #12810
Signed-off-by: Jayapriya Pai <janantha@redhat.com>
2023-09-08 13:10:31 +05:30
David Fridman
52adf55631
Add VM size label to azure service discovery ( #11575 ) ( #11650 )
...
* Add VM size label to azure service discovery (#11575 )
Signed-off-by: davidifr <davidfr.mail@gmail.com>
* Add VM size label to azure service discovery (#11575 )
Signed-off-by: davidifr <davidfr.mail@gmail.com>
* Add VM size label to azure service discovery (#11575 )
Signed-off-by: davidifr <davidfr.mail@gmail.com>
Signed-off-by: davidifr <davidfr.mail@gmail.com>
2022-12-16 13:14:35 -05:00
Matthieu MOREL
f43749e82f
refactor (discovery): move from github.com/pkg/errors to 'errors' and 'fmt' ( #10807 )
...
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
Co-authored-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
2022-06-03 13:47:14 +02:00
David N Perkins
ed0c68224e
Azure SD Failure metric and 404 Handling ( #10476 )
...
* For Azure sd, added failure counter and skipping of 404's from Nic lookup
Signed-off-by: David N Perkins <David.N.Perkins@ibm.com>
2022-03-31 14:50:17 +02:00
David N Perkins
b13aec9167
Merge pull request #10365 from David-N-Perkins/azure-resource-group-filter
...
Azure Service Discovery resource group filter
2022-03-29 01:21:23 +02:00
Julien Pivotto
b0d70557b7
Merge pull request #10285 from prometheus/release-2.33
2022-02-12 00:02:24 +01:00
Julien Pivotto
002ceb7232
Fix panic in Azure SD when no public interface is set.
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-02-11 21:25:45 +01:00
Levi Harrison
1b3443ede1
Azure: Fix panic when IP Address isn't set ( #10280 )
2022-02-11 00:31:18 +01:00
Julien Pivotto
18d737de3e
Azure SD: Set Prometheus user agent ( #10209 )
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-01-28 13:36:04 +01:00
Mateusz Gozdek
1a6c2283a3
Format Go source files using 'gofumpt -w -s -extra'
...
Part of #9557
Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2021-11-02 19:52:34 +01:00
Levi Harrison
89a6ebd799
Add common HTTP client to Azure SD ( #9267 )
...
* Add `proxy_url` option to Azure SD
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-10-20 23:09:58 +02:00
Julien Pivotto
1681a8d539
Azure: Fix panic when no computername is set ( #9387 )
...
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-09-25 00:30:18 +02:00
darshanime
898afa2fd9
Add nil checks
...
Signed-off-by: darshanime <deathbullet@gmail.com>
2021-07-28 19:23:17 +05:30
darshanime
c8a2ffdb72
Add computer name to azure sd
...
Signed-off-by: darshanime <deathbullet@gmail.com>
2021-07-25 22:07:44 +05:30
Levi Harrison
b5f6f8fb36
Switched to go-kit/log
...
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-11 12:28:36 -04:00
code1305
9c705ffdfb
err fix if target creation fails
...
return right error if any target creation fails. Need to wrap the right error.
Signed-off-by: Anshul <anshulkhandelwal.nitj@gmail.com>
2021-04-16 20:37:52 +05:30
Andy Bursavich
4e6a94a27d
Invert service discovery dependencies ( #7701 )
...
This also fixes a bug in query_log_file, which now is relative to the config file like all other paths.
Signed-off-by: Andy Bursavich <abursavich@gmail.com>
2020-08-20 13:48:26 +01:00
Guangming Wang
5b4006ac86
cleanup: remove unnacessary nil check before range ( #7194 )
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2020-05-02 07:25:44 +01:00
Dmitry Shmulevich
d81df5609d
fix nil pointer dereference in azure discovery ( #5587 )
...
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
2019-05-21 20:03:24 +01:00
EarthmanT
35be8c9e25
Add azure public ip label ( #5475 )
...
* Update Azure SD Config with Public IP label
Signed-off-by: earthmant <trammell@cloudify.co>
2019-04-17 16:05:44 +01: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
Simon Pasquier
782d00059a
discovery: factorize for SD based on refresh ( #5381 )
...
* discovery: factorize for SD based on refresh
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* discovery: use common metrics for refresh
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-25 11:54:22 +01:00
Tariq Ibrahim
0d7104b7eb
discovery/azure:optimize iteration logic for VMScalesets, VMScalesetVMs, and VMs ( #5363 )
...
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-20 09:03:47 +00:00
Tariq Ibrahim
5f933e99d0
discovery/azure: make local virtualMachine struct more generic by removing the go sdk field reference ( #5350 )
...
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-03-15 16:18:37 +00:00
Simon Pasquier
9040dddd0c
discovery/azure: pass context to the client ( #5255 )
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-02-26 14:47:26 +01:00
Jannick Fahlbusch ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎
63f375e80a
[FIX] Azure DS: Return error when request failed ( #4719 )
...
This fixes the issue that the error is swallowed when the request failed.
Signed-off-by: Jannick Fahlbusch <git@jf-projects.de>
2019-01-28 21:31:45 +00:00
Tariq Ibrahim
f4275d2352
Use the latest versions of azure go sdk and go-autorest ( #5015 )
...
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-01-28 18:30:29 +00:00
Simon Pasquier
68e4c211f2
discovery/azure: more robust handling of go routines ( #5106 )
...
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-18 09:55:47 +01:00
Simon Pasquier
22a1def98d
Merge pull request #5099 from prometheus/release-2.6
...
Merge release-2.6 to master
2019-01-16 09:26:00 +01:00
Sylvain Rabot
d9f4a8c95f
sd: Fix stuck Azure service discovery ( #5088 )
...
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2019-01-14 15:09:27 +00:00
Fabian Reinartz
ca93c8e19b
Merge pull request #4969 from prometheus/azuresubid
...
Add Azure tenant and subscription ID labels
2019-01-06 12:25:06 +01:00
Simon Pasquier
f678e27eb6
*: use latest release of staticcheck ( #5057 )
...
* *: use latest release of staticcheck
It also fixes a couple of things in the code flagged by the additional
checks.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Use official release of staticcheck
Also run 'go list' before staticcheck to avoid failures when downloading packages.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 14:47:38 +01:00
Fabian Reinartz
7a41038695
Add Azure tenant and subscription ID labels
...
Signed-off-by: Fabian Reinartz <freinartz@google.com>
2019-01-03 13:09:13 +01:00
Marcel D. Juhnke
c7d83b2b6a
discovery: add support for Managed Identity authentication in Azure SD ( #4590 )
...
Signed-off-by: Marcel Juhnke <marrat@marrat.de>
2018-12-19 10:03:33 +00:00
Tariq Ibrahim
e3bdc463fa
Revert "add logic to check if an azure VM is deallocated or not ( #4908 )" ( #4980 )
...
This reverts commit 61cf4365
Signed-off-by: tariqibrahim <tariq.ibrahim@microsoft.com>
2018-12-12 09:27:12 +01:00
Tariq Ibrahim
61cf4365d6
add logic to check if an azure VM is deallocated or not ( #4908 )
...
* add logic to check if an azure VM is deallocated or not
* update documentation with the new azure power state label
Signed-off-by: tariqibrahim <tariq.ibrahim@microsoft.com>
2018-11-30 11:32:40 +00:00
mengnan
a5d39361ab
discovery/azure: Fail hard when Azure authentication parameters are missing ( #4907 )
...
* discovery/azure: fail hard when client_id/client_secret is empty
Signed-off-by: mengnan <supernan1994@gmail.com>
* discovery/azure: fail hard when authentication parameters are missing
Signed-off-by: mengnan <supernan1994@gmail.com>
* add unit test
Signed-off-by: mengnan <supernan1994@gmail.com>
* add unit test
Signed-off-by: mengnan <supernan1994@gmail.com>
* format code
Signed-off-by: mengnan <supernan1994@gmail.com>
2018-11-29 16:47:59 +01:00
Ben Kochie
c6399296dc
Fix spelling/typos ( #4921 )
...
* Fix spelling/typos
Fix spelling/typos reported by codespell/misspell.
* UK -> US spelling changes.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-27 17:44:29 +01:00
Sylvain Rabot
1fd3b33dcd
Prevent Azure SD panic ( fix #4779 ) ( #4867 )
...
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2018-11-19 12:23:12 +00:00
Tariq Ibrahim
f708fd5c99
Adding support for multiple azure environments ( #4569 )
...
Signed-off-by: Tariq Ibrahim <tariq.ibrahim@microsoft.com>
2018-09-04 17:55:40 +02:00
Johannes Scheuermann
f978f5bba3
Fixes #4202 , correctly parse VMs with empty tags ( #4450 )
...
Signed-off-by: Johannes M. Scheuermann <joh.scheuer@gmail.com>
2018-08-02 10:10:17 +01:00
Johannes Scheuermann
7608ee87d0
Inital support for Azure VMSS ( #4202 )
...
* Inital support for Azure VMSS
Signed-off-by: Johannes Scheuermann <johannes.scheuermann@inovex.de>
* Add documentation for the newly introduced label
Signed-off-by: Johannes M. Scheuermann <joh.scheuer@gmail.com>
2018-08-01 12:52:21 +01:00
Ivan Voronchihin
59d214d277
Update autorest vedoring ( #4147 )
...
Signed-off-by: bege13mot <bege13mot@gmail.com>
2018-07-18 05:24:15 +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
Marek Siarkowicz
86011047ca
Validate required fields in sd configuration ( #3911 )
2018-03-05 19:27:54 +00:00
Pedro Araújo
575f665944
Add OS type meta label to Azure SD ( #3863 )
...
There is currently no way to differentiate Windows instances from Linux
ones. This is needed when you have a mix of node_exporters /
wmi_exporters for OS-level metrics and you want to have them in separate
scrape jobs.
This change allows you to do just that. Example:
```
- job_name: 'node'
azure_sd_configs:
- <azure_sd_config>
relabel_configs:
- source_labels: [__meta_azure_machine_os_type]
regex: Linux
action: keep
```
The way the vendor'd AzureSDK provides to get the OsType is a bit
awkward - as far as I can tell, this information can only be gotten from
the startup disk. Newer versions of the SDK appear to improve this a
bit (by having OS information in the InstanceView), but the current way
still works.
2018-02-19 15:40:57 +00:00