Commit graph

281 commits

Author SHA1 Message Date
Simon Pasquier ec7929aaa8 documentation/prometheus-mixin: fix comment typo
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2022-09-09 17:03:53 +02:00
dependabot[bot] 6bfb1a2ce2
build(deps): bump github.com/prometheus/prometheus (#11247)
Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.36.2 to 0.38.0.
- [Release notes](https://github.com/prometheus/prometheus/releases)
- [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/prometheus/compare/v0.36.2...v0.38.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/prometheus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-08 10:41:08 +02:00
Julien Pivotto 96d5a32659
Update go to 1.19, set min version to 1.18 (#11279)
* Update go to 1.19, set min version to 1.18

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

* Update golangci-lint

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-07 11:30:48 +02:00
dependabot[bot] 6767f6e1a9
build(deps): bump github.com/influxdata/influxdb (#11245)
Bumps [github.com/influxdata/influxdb](https://github.com/influxdata/influxdb) from 1.9.8 to 1.10.0.
- [Release notes](https://github.com/influxdata/influxdb/releases)
- [Changelog](https://github.com/influxdata/influxdb/blob/master/CHANGELOG_OLD.md)
- [Commits](https://github.com/influxdata/influxdb/compare/v1.9.8...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/influxdata/influxdb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-02 20:08:16 +02:00
dependabot[bot] a6e0412d48
build(deps): bump github.com/prometheus/client_golang (#11246)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-02 13:48:55 -04:00
dependabot[bot] c2c5c105c4
build(deps): bump github.com/prometheus/common (#11086)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-02 12:42:31 +02:00
Iain Lane e5cd5a33d0
PrometheusHighQueryLoad alert: use configured selector
Currently we're hardcoding `job="prometheus-k8s"` as selector. This
doesn't work if your prometheus is elsewhere. Fortunately we have
`prometheusSelector` in `$._config`  which all the other alerts use.

Use that here too.

Signed-off-by: Iain Lane <iain@orangesquash.org.uk>
2022-07-15 10:04:32 +01:00
beorn7 20a3990500 documentation: fix example dependencies
The examples were still depending on an ancient prometheus
version. Updating caused some dependency shenanigans, but this should
work for now.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-07-13 20:50:10 +02:00
Björn Rabenstein b06a3222b9
Merge pull request #10908 from raptorsun/queryCapacityAlert
Add Alert PrometheusQueryOverload to mixins
2022-07-13 18:06:56 +02:00
Haoyu Sun 26a7f80aa1 add alert PrometheusHighQueryLoad.
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2022-07-13 14:08:24 +02:00
Bram Vogelaar 4456dcc26e feat(nomad): add nomad service discovery
Signed-off-by: Bram Vogelaar <bram@attachmentgenie.com>
2022-06-30 14:17:08 +02:00
dependabot[bot] 867d3bd78f
build(deps): bump github.com/go-kit/log (#10827)
Bumps [github.com/go-kit/log](https://github.com/go-kit/log) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/go-kit/log/releases)
- [Commits](https://github.com/go-kit/log/compare/v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: github.com/go-kit/log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 15:55:35 +02:00
dependabot[bot] 7b8ed5d36b
build(deps): bump github.com/prometheus/common (#10826)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.32.1 to 0.34.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.32.1...v0.34.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 15:55:01 +02:00
dependabot[bot] eef02a0334
build(deps): bump github.com/prometheus/client_golang (#10828)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 11:14:39 +02:00
dependabot[bot] 6bd75d5ba7
build(deps): bump github.com/stretchr/testify (#10829)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 11:14:29 +02:00
Matthieu MOREL 12de742ae4
refactor (documentation): move from github.com/pkg/errors to 'errors' and 'fmt' (#10808)
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:27:01 +02:00
David Leadbeater fba3e847dc
Check syntax of example configurations (#10753)
* Check syntax of example configurations

Fix a mistake in the hetzner and vultr configs.

Also it's easier not to fight the build system, and this will lint
example code, so ignore a lint issue in custom-sd.

Signed-off-by: David Leadbeater <dgl@dgl.cx>

* No need to import Makefile.common, it just complicates things

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2022-05-26 18:17:21 +10:00
Ryan Lonergan 0505ba81e1
Fixed spacing causing "field credentials not found in type linode.plain” error (#10752)
Signed-off-by: Ryan Lonergan <rlonergan@linode.com>

Co-authored-by: Ryan Lonergan <rlonergan@linode.com>
2022-05-25 22:46:02 +02:00
David Dymko 3ef153b00c vultr integration
Signed-off-by: David Dymko <dymkod@gmail.com>
2022-05-24 18:38:06 +02:00
Felix Ehrenpfort ce3bc818a8
Add service discovery for IONOS Cloud (#10514)
* Add service discovery for IONOS Cloud

Signed-off-by: Felix Ehrenpfort <felix@ehrenpfort.de>
2022-05-20 14:57:23 +02:00
Matthieu MOREL e2ede285a2
refactor: move from io/ioutil to io and os packages (#10528)
* refactor: move from io/ioutil to io and os packages
* use fs.DirEntry instead of os.FileInfo after os.ReadDir

Signed-off-by: MOREL Matthieu <matthieu.morel@cnp.fr>
2022-04-27 11:24:36 +02:00
fpetkovski 501a8a7865
Address code review comments
Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2022-03-30 09:35:08 +02:00
fpetkovski 877320784b
Add alert in mixin for exceeded sample limit
This commit adds an alert in the prometheus mixin which triggers when
Prometheus has failed scrapes that have exceeded the configured
sample_limit for that job.

Signed-off-by: fpetkovski <filip.petkovsky@gmail.com>
2022-03-30 09:31:35 +02:00
Björn Rabenstein 9d34ddc00e
Merge pull request #9873 from raptorsun/feature/AlertScrapeBodySizeLimitHit
Add Alert PrometheusScrapeBodySizeLimitHit
2022-03-22 21:46:31 +01:00
Haoyu Sun 3c903af474
Add Alert PrometheusScrapeBodySizeLimitHit
Signed-off-by: Haoyu Sun <hasun@redhat.com>
2022-03-22 15:13:00 +01:00
Łukasz Mierzwa a4317bf0ec
Run gofumpt on all files (#10392)
* Run gofumpt on all files

Getting golangci-lint errors when building on my laptop, possibly because I have newer version of gofumpt then what it was formatted with.
Run gofumpt -w -extra on all files as it will be needed in the future anyway.

* Update golangci-lint to v1.44.2

v1.44.0 upgraded gofumpt so bumping version in CI will help keep formatting correct for everyone

* Address golangci-lint error

Getting 'error-strings: error strings should not be capitalized or end with punctuation or a newline' from revive here.
Drop new line.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2022-03-03 17:21:05 +01:00
Julien Pivotto 8cc7b7e577
Split remote storage example in its own go mod (#10244)
This commit removes the dependency between Prometheus and influx.

Note: Go keeps adding the indirect dependencies in go.mod, I can't
remove them.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2022-02-02 14:54:13 +01:00
paulfantom 151a8daa98 documentation: align kubernetes example with the prom operator and mixins
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-11-22 11:13:47 +01:00
Björn Rabenstein 2234798f60
Merge pull request #9700 from nikosmeds/nikosmeds/hagroupcrashlooping-mixin-60m
Increase time range for PrometheusHAGroupCrashlooping alert
2021-11-19 12:53:55 +01:00
Niko Smeds 53ca693f9e Be specific
Signed-off-by: Niko Smeds <nikosmeds@gmail.com>
2021-11-18 11:28:38 -08:00
Niko Smeds 0bc2cbdd7d Leave time range for clean restarts as-is
Signed-off-by: Niko Smeds <nikosmeds@gmail.com>
2021-11-17 15:14:26 -08:00
Fatih Sarhan bc89e9e494 mixin: Reorder template variables on Remote Write dashboard
Signed-off-by: f9n <f9n@protonmail.com>
2021-11-12 14:38:05 +03:00
Niko Smeds fdcd423dfe Increase time range for PrometheusHAGroupCrashlooping alert
Signed-off-by: Niko Smeds <nikosmeds@gmail.com>
2021-11-08 15:06:42 -08: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
Arthur Silva Sens be2599c853
config: Make remote-write required for Agent mode (#9618)
* config: Make remote-write required for Agent mode

Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-10-30 01:41:40 +02:00
SuperQ 3cd2c033e2
Use Go 1.16+ install for mixin tests
Use new `go install` syntax to fetch tools.

Signed-off-by: SuperQ <superq@gmail.com>
2021-10-23 22:52:16 +02:00
Julien Pivotto 3458e338c6
docs: Improve PuppetDB example (#9547)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-20 21:03:17 +02:00
Witek Bedyk cda2dbbef6
Add Uyuni service discovery (#8190)
* Add Uyuni service discovery

Signed-off-by: Witek Bedyk <witold.bedyk@suse.com>

Co-authored-by: Joao Cavalheiro <jcavalheiro@suse.de>
Co-authored-by: Marcelo Chiaradia <mchiaradia@suse.com>
Co-authored-by: Stefano Torresi <stefano@torresi.io>
Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
2021-10-19 01:00:44 +02:00
Julien Pivotto 8920024323 Add PuppetDB service discovery
We have been Puppet user for 10 years and we are users of
https://github.com/camptocamp/prometheus-puppetdb-sd

However, that file_sd implementation contains business logic and
assumptions around e.g. the modules which you are using.

This pull request adds a simple PuppetDB service discovery, which will
enable more use cases than the upstream sd.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-09-16 16:54:26 +02:00
Paweł Szulik f5563bfe95
tests: Move from t.Errorf and others. (Part 2) (#9309)
* Refactor util tests.

Signed-off-by: Paweł Szulik <paul.szulik@gmail.com>
2021-09-13 21:19:20 +02:00
Julien Pivotto d5676fb9e0
Merge pull request #9254 from prometheus/superq/go1.17
Build with Go 1.17 / npm 7 / node 16
2021-08-28 18:36:42 +02:00
Frederic Hemberger 16b8911b1a
docs: Replace go get with go install for command installation (#9098)
`go get` is deprecated for installation of commands as of go v1.17
Ref: https://go.googlesource.com/go/+/ced0fdbad0655d63d535390b1a7126fd1fef8348

Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
2021-08-27 11:08:21 +02:00
SuperQ e167a45c65
Add new Go build tags.
Add new go:build comments based on 1.17 formatting[0].

[0]: https://golang.org/doc/go1.17#gofmt

Signed-off-by: SuperQ <superq@gmail.com>
2021-08-27 10:24:14 +02:00
Björn Rabenstein 9c43ac451c
Merge pull request #9129 from PhilipGough/bz-1984365
mixin: Filter instance by selected job for Prometheus overview dashboard
2021-08-13 14:03:16 +02:00
TJ Hoplock 7baf084092
optimize Linode SD by polling for event changes during refresh (#8980)
* optimize Linode SD by polling for event changes during refresh

Most accounts are fairly "static", in the sense that they're not cycling
through instances constantly. So rather than do a full refresh every
interval and potentially make several behind-the-scenes paginated API
calls, this will now poll the `/account/events/` endpoint every minute
with a list of events that we care about. If a matching event is found,
we then do a full refresh.

Co-authored-by: William Smith <wsmith@linode.com>
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
Signed-off-by: William Smith <wsmith@linode.com>
2021-08-04 12:05:49 +02:00
Philip Gough 751ca03fad mixin: Filter instance by job for Prometheus overview dashboard
Signed-off-by: Philip Gough <philip.p.gough@gmail.com>
2021-07-28 14:34:26 +01:00
Julius Volz 179b2155d1
Fix: Use json.Unmarshal() instead of json.Decoder (#9033)
* Fix: Use json.Unmarshal() instead of json.Decoder

See https://ahmet.im/blog/golang-json-decoder-pitfalls/

json.Decoder is for JSON streams, not single JSON objects / bodies.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Revert modifications to targetgroup parsing

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-07-02 09:38:14 +01:00
Ben Kochie 7cb55d5732
Merge pull request #8802 from mwasilew2/yaml-linting
Adds yamllinting to Makefile.common
2021-06-24 15:59:35 +02:00
Levi Harrison 4a4882d4c7 Replace godoc.org links
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-06-17 07:18:51 -04:00
Julien Duchesne 8855c2e626
Add prometheus_tsdb_clean_start metric (#8824)
Add cleanup of the lockfile when the db is cleanly closed

The metric describes the status of the lockfile on startup
0: Already existed
1: Did not exist
-1: Disabled

Therefore, if the min value over time of this metric is 0, that means that executions have exited uncleanly
We can then use that metric to have a much lower threshold on the crashlooping alert:

If the metric exists and it has been zero, two restarts is enough to trigger the alarm
If it does not exist (old prom version for example), the current five restarts threshold remains

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>

* Change metric name + set unset value to -1

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>

* Only check the last value of the clean start alert

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>

* Fix test + nit

Signed-off-by: Julien Duchesne <julien.duchesne@grafana.com>
2021-06-16 15:03:02 +05:30