Tool to perform load tests on the Prometheus Alertmanager project.
Rails base app, Rspec, Devise, Dynamic Role System with CanCan and AngularJS
Jsonnet code to render Kubernetes manifests for coredns.
Analyzing coverage reports with go
Node chat (for fun, without security concern)
Pick me up app for codefest8
Prometheus Alertmanager
A lightweight Rails image based on Alpine Linux
issue openedconprof/conprof
There are various existing pprof libraries for various runtimes. Most resulting from the google cloud profiler, these can be used to build conprof client libraries:
- Nodejs: https://www.npmjs.com/package/pprof
- Python: https://pypi.org/project/pypprof/
- Java (seems more complicated as Google Cloud profiler also requires an agent loaded with the java application)
- Rust: https://github.com/tikv/pprof-rs
created time in 17 hours
push eventconprof/conprof
commit sha ef6fa6efb6c80dcb53275c18c78a0376c02b569f
Removed demotivating messag (:
commit sha 44eedbde0de47508223591862a79ae098c480d6f
Update README.md
commit sha 2391d0e46a8c51f4d80bcf1d1dce67926a6d92f4
Update README.md Co-authored-by: Frederic Branczyk <[email protected]>
commit sha 964334ae997645c201216380f426c25b98909d48
Merge pull request #96 from bwplotka/patch-1 Removed demotivating message (:
push time in 17 hours
Pull request review commentconprof/conprof
Removed demotivating message (:
# conprof - Continuous Profiling -> Note this repository is very much a proof of concept, it only works on a very basic level. Everything is prone to change, nothing is supported.+> NOTE: Conprof is already used on production however it's still in active devlopment phase. APIs are prone to change. Otherwise you are welcome to use Conprof and don't forget to give us feedback!
> NOTE: Conprof is already used in production, however, it's still in active development. APIs are prone to change. Otherwise, you are welcome to use Conprof, and don't forget to give us feedback!
comment created time in 17 hours
Pull request review commentconprof/conprof
Removed demotivating message (:
# conprof - Continuous Profiling -> Note this repository is very much a proof of concept, it only works on a very basic level. Everything is prone to change, nothing is supported.+> NOTE: ConProf is already used on production however it's still in active devlopment phase. APIs are prone to change. Otherwise you are welcome to use ConProf and don't forget to give usRE feedback!
It's Conprof :)
comment created time in 17 hours
issue commentprometheus-operator/kube-prometheus
anti-affinity fails if local prometheus isn't configured with a name/namespace
cc @s-urbaniak
comment created time in a day
push eventprometheus-operator/prometheus-operator
commit sha 27d1eb7fb7fb37fa94f29bd8298546c737c56263
tests, docs: update admissionregistration.k8s.io/v1beta1 to admissionregistration.k8s.io/v1
commit sha 59a2a22dba363be52d3ce25f6e130214cc50ed2c
Merge pull request #3599 from AshleyDumaine/update-admissionregistration-api-version tests, docs: update admissionregistration.k8s.io/v1beta1 to admissionregistration.k8s.io/v1
push time in a day
PR merged prometheus-operator/prometheus-operator
This PR resolves #3584 by updating all references to the deprecated api group admissionregistration.k8s.io/v1beta1
pr closed time in a day
issue closedprometheus-operator/prometheus-operator
Use admissionregistration.k8s.io/v1 instead of admissionregistration.k8s.io/v1beta1 everywhere
As mentioned in #3574, Prometheus operator requires at least Kubernetes 1.16 which itself supports admissionregistration.k8s.io/v1. We should remove all mentions of admissionregistration.k8s.io/v1beta1 in the code and docs to avoid confusion and bugs like #3473.
closed time in a day
simonpasquierpull request commentprometheus-operator/prometheus-operator
tests, docs: update admissionregistration.k8s.io/v1beta1 to admissionregistration.k8s.io/v1
Thank you! lgtm
comment created time in a day
issue commentprometheus-operator/kube-prometheus
How to add imagePullSecrets when using a private registry to all images
Happy to review when you have something :)
comment created time in a day
push eventprometheus-operator/prometheus-operator
commit sha 6e07b6ea3abf4da7d9466b3f6ba44241ea85296b
*: add topologySpreadConstraints to Prometheus, Alertmanager, and ThanosRuler
commit sha c31bc17ed04ab0220aa02023fb32db197fe52e02
add autogenerated files via make generate
commit sha 3f9aa94fad30558fa538e556558aa4d216e962be
Merge pull request #3598 from AshleyDumaine/add-pod-topology-spread-constraints Support for Pod Topology Spread Constraints for Prometheus, Alertmanager, and ThanosRuler CRDs
push time in a day
PR merged prometheus-operator/prometheus-operator
This PR resolves #3595
I forgot to mention ThanosRulers in the issue, but since that CRD also supports Pod and Node affinities, I figured it would make sense to add topologySpreadConstraints to the resulting StatefulSet as well.
pr closed time in a day
issue closedprometheus-operator/prometheus-operator
Support for Pod Topology Spread Constraints for Prometheus and Alertmanager CRDs
What is missing?
The Prometheus and Alertmanager CRDs support Pod affinities and anti-affinities as well as Node affinities, but not topologySpreadConstraints, which is a new feature (see https://kubernetes.io/blog/2020/05/introducing-podtopologyspread/ and https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/)
Why do we need it?
Having an even Pod spread across zones/regions for the StatefulSets generated by the Prometheus and Alertmanager CRDs would be useful for HA setups and is more flexible than using something like Pod anti-affinities with topology.kubernetes.io/zone for the topologyKey.
closed time in a day
AshleyDumaineissue commentthanos-io/thanos
receive: Every restart receive flushes and uploads, potentially same data.
Do we have data to back this up? As far as I know, the flush logic even deletes the WAL after it flushed and uploaded.
comment created time in a day
push eventprometheus-operator/prometheus-operator
commit sha ece1933ba476066824198d7cd20624e39f6fd7bd
Fix invalid fields for AlertManagerConfig Inhibit Rule
commit sha fd07e4cfddc858c0c41f098b9d88ad05e3c39fd9
Merge pull request #3597 from omegas27/fix-alertmanager-inhibit-rule Fix invalid fields for AlertManagerConfig Inhibit Rule
push time in a day
PR merged prometheus-operator/prometheus-operator
pr closed time in a day
push eventthanos-io/thanos
commit sha 4b89eea19e6c477e5d272aab9db6b46afee8d2bb
labelbp: Renamed Label->Zlabel, and FullCopyLabel to Label. (#3330) No logic changed. Also commented the caution. ZLabel vs Label: ``` /tmp/___BenchmarkZLabelsMarshalUnmarshal_in_github_com_thanos_io_thanos_pkg_store_labelpb -test.v -test.bench ^\QBenchmarkZLabelsMarshalUnmarshal\E$ -test.run ^$ goos: linux goarch: amd64 pkg: github.com/thanos-io/thanos/pkg/store/labelpb BenchmarkZLabelsMarshalUnmarshal BenchmarkZLabelsMarshalUnmarshal/Label BenchmarkZLabelsMarshalUnmarshal/Label-12 8 133253790 ns/op 212008374 B/op 1000005 allocs/op BenchmarkZLabelsMarshalUnmarshal/ZLabel BenchmarkZLabelsMarshalUnmarshal/ZLabel-12 9 121597711 ns/op 100008368 B/op 5 allocs/op PASS Process finished with exit code 0 ``` Signed-off-by: Bartlomiej Plotka <[email protected]>
push time in 4 days
PR merged thanos-io/thanos
No logic changed. Also commented the caution. Split of https://github.com/thanos-io/thanos/pull/3279 ZLabel vs Label:
/tmp/___BenchmarkZLabelsMarshalUnmarshal_in_github_com_thanos_io_thanos_pkg_store_labelpb -test.v -test.bench ^\QBenchmarkZLabelsMarshalUnmarshal\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/thanos-io/thanos/pkg/store/labelpb
BenchmarkZLabelsMarshalUnmarshal
BenchmarkZLabelsMarshalUnmarshal/Label
BenchmarkZLabelsMarshalUnmarshal/Label-12 8 133253790 ns/op 212008374 B/op 1000005 allocs/op
BenchmarkZLabelsMarshalUnmarshal/ZLabel
BenchmarkZLabelsMarshalUnmarshal/ZLabel-12 9 121597711 ns/op 100008368 B/op 5 allocs/op
PASS
Process finished with exit code 0
pr closed time in 4 days
pull request commentkubernetes/kube-state-metrics
feat(persistentvolume): claimRef info to labels
Let's squash the changes I'd say.
comment created time in 4 days
Pull request review commentkubernetes/kube-state-metrics
feat(persistentvolume): claimRef info to labels
import ( ) var (+ descPersistentVolumeClaimRefName = "kube_persistentvolume_claim_ref_info"
We tend to reserve the _info suffix for things that never change over the lifetime of an object, so this should just be kube_persistentvolume_claim_ref.
comment created time in 4 days
pull request commentkubernetes/kube-state-metrics
/lgtm /approve
comment created time in 4 days
push eventprometheus-operator/prometheus-operator
commit sha b6194596e8c2b619a782db771664fb2b44ce2252
improve documentation alertmanager
commit sha ad5c3deae757f782255a8cbb6f4794c5d9aea7ef
Merge pull request #3580 from kiddo3/alert-doc improve documentation alertmanager configuration
push time in 4 days
PR merged prometheus-operator/prometheus-operator
Hi, Reading the doc I find interesting to improve the doc, on how you can also specify you're custom secret name in the configuration.
pr closed time in 4 days
pull request commentprometheus-operator/prometheus-operator
improve documentation alertmanager configuration
Thanks!
comment created time in 4 days
issue commentprometheus-operator/prometheus-operator
I want to edit prometheus.yaml of prometheus-operator directly
Use the additional scrape configs feature for this: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/additional-scrape-config.md
comment created time in 4 days
issue commentprometheus-operator/prometheus-operator
Support for Pod Topology Spread Constraints for Prometheus and Alertmanager CRDs
This makes sense. Would you like to contribute this feature @AshleyDumaine ?
comment created time in 4 days
push eventprometheus-operator/prometheus-operator
commit sha 861271ade17a65237418ad7b1319a0fc9d5874e6
jsonnet/prometheus-operator: add RBAC permissions to list ingresses for Probes
commit sha 94a602737a68e3b32a33d1411b9a0391e476454f
regenerate
commit sha 07db0c30d277fddc74e792f50bbac93f76b1929f
Merge pull request #3594 from paulfantom/rbac-ingress example/rbac: add prometheus permissions to list ingresses
push time in 4 days
PR merged prometheus-operator/prometheus-operator
Specify necessary permissions to use Probes with Ingress selectors.
/cc @prometheus-operator/prometheus-operator-reviewers
pr closed time in 4 days
pull request commentprometheus-operator/prometheus-operator
Add OpsGenie Receiver type to AlertmanagerConfig CRD
cc @grdryn
comment created time in 4 days
push eventprometheus-operator/prometheus-operator
commit sha a882f751b9276188234837819f9282539956888c
*: fix reconciliation when 2 resources share the same secret When the operator detects a change to a secret, service monitor, ..., it enqueues the object's namespace and triggers a reconciliation for each operated resource that watches this namespace. Instead of looping over all operated resources, the operator stopped after the first resource. If 2 Prometheus objects were depending on the same secret (referenced by additionalScrapeConfigs for instance) then only one of them would be reconciled when the secret was updated. The regression has been introduced by #3440. Signed-off-by: Simon Pasquier <[email protected]>
commit sha e321ca8310898393f612878c29bc15a5f6dacbcf
Merge pull request #3590 from simonpasquier/fix-3552 *: fix reconciliation when 2 resources share the same secret
push time in 4 days
PR merged prometheus-operator/prometheus-operator
When the operator detects a change to a secret, service monitor, ..., it enqueues the object's namespace and triggers a reconciliation for each operated resource that watches this namespace. Instead of looping over all operated resources, the operator stopped after the first resource. If 2 Prometheus objects were depending on the same secret (referenced by additionalScrapeConfigs for instance) then only one of them would be reconciled when the secret was updated.
The regression has been introduced by #3440.
Fixes #3552
pr closed time in 4 days
issue closedprometheus-operator/prometheus-operator
Problem with secret refresh v0.42.1
<!--
Feel free to ask questions in #prometheus-operator on Kubernetes Slack!
Note: This repository is about prometheus-operator itself, if you have questions about:
- helm installation, go to https://github.com/helm/charts repository
- kube-prometheus setup, go to https://github.com/prometheus-operator/kube-prometheus
-->
What happened?
We were running v0.39.0 with additionalScrapeConfigs: Runtime changes to the referenced secret were being updated by prometheus-operator and the config changes loaded into Prometheus. After upgrading to 0.42.1 when prom-op starts the config is correctly loaded from the additionalScrapeConfigs secret and Prometheus updated. However after the initial update the configuration in Prometheus doesn't get updated when the configuration in the secret later changes.
when the secret is updated and resourceVersion changes then the prom-op logs show
level=debug ts=2020-09-28T13:08:47.038331903Z caller=operator.go:1583 component=prometheusoperator msg="updating Prometheus configuration secret"
level=debug ts=2020-09-28T13:08:47.042560064Z caller=operator.go:909 component=prometheusoperator msg="Secret updated"
But /etc/prometheus/config/prometheus.yaml.gz in the prometheus-config-reloader is not updated, nor is it updated after the resyncPeriod, however restarting the prometheus-operator binary does update the configuration, but only when it first initialises, after that it goes back to the behaviour described above.
Did you expect to see something different?
I expected changes to the additionalScrapeConfigs secret to continue to be loaded into Prometheus.
How to reproduce it (as minimally and precisely as possible):
Run v0.42.0 prom-op with additionalScrapeConfigs. Once everything is running, alter the configuration in the secret, the changes will not be loaded into Prometheus
Environment
Prometheus-operator v0.42.1, Prometheus v2.20.1, K8s v1.18.6
- Prometheus Operator version:
Prometheus-operator v0.42.1
- Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.0", GitCommit:"e19964183377d0ec2052d1f1fa930c4d7575bd50", GitTreeState:"clean", BuildDate:"2020-08-26T21:52:18Z", GoVersion:"go1.15", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
-
Kubernetes cluster kind:
insert how you created your cluster: kops, bootkube, etc.
-
Manifests:
I can send full configs if relevant, but I think there is enough in the description.
- Prometheus Operator Logs:
see above
Anything else we need to know?:
Assuming the problem was something to do with this https://github.com/prometheus-operator/prometheus-operator/pull/3355 I tried setting --secret-field-selector='type=Opaque'
closed time in 4 days
kirkharris1pull request commentprometheus-operator/prometheus-operator
*: fix reconciliation when 2 resources share the same secret
Nice!
comment created time in 4 days
issue commentprometheus-operator/prometheus-operator
hope add terminationGracePeriodSeconds support
@simonpasquier I think we should focus on the Prometheus improvements that are happening with checkpoints and snapshots on shutdown, so that won't be necessary.
comment created time in 4 days
issue commentprometheus-operator/prometheus-operator
Add objectStorageConfigFile for ThanosSpec
I don't think anyone has taken this up yet, if someone wants to propose something that would be appreciated! :)
comment created time in 4 days
pull request commentkubernetes/kube-state-metrics
fix html tag in service-metrics.md
Thanks!
/lgtm /approve
comment created time in 4 days
issue commentkubernetes/kube-state-metrics
Clarify and document stability guarantees for new metrics
Yes I think that makes sense.
comment created time in 4 days
pull request commentkubernetes/kube-state-metrics
feat(persistentvolume): claimRef info to labels
Taking all this information into consideration, I would say: let's drop the kind/apiversion, and have this be a separate metric and not part of the info metric since there is a chance this may change over the lifetime of the PV.
comment created time in 4 days
issue commentprometheus-operator/kube-prometheus
How to add imagePullSecrets when using a private registry to all images
@diegombeltran I don't think that happened, do you want to give it a shot? :)
comment created time in 4 days
issue commentprometheus-operator/kube-prometheus
KubeControllerManagerDown & kubeSchedulerDown firing on kubeadm 1.18 cluster
It would be amazing if you could propose a PR to add what you described in "the workaround" where you expected to find this documentation when you were looking for it! :)
comment created time in 4 days
push eventkubernetes-monitoring/kubernetes-mixin
commit sha aa83fe7275d72e25de534249ef1e508e989df2dd
Fix network tx packets query on resources namespace dashboard
commit sha c7982b570347b1af1d811eaaccced1a979d35741
Fix network tx packets query on resources cluster dashboard
commit sha 8a98e9c6fab000ef090b8d313292043696a8b3bb
Merge pull request #507 from slopezz/fix/network-queries-resources-dashboards Fix TX network queries resources dashboards
push time in 4 days
PR merged kubernetes-monitoring/kubernetes-mixin
Fix a couple of network TX queries on resources dashboards that were using receive metric instead of transmit metric.
pr closed time in 4 days
pull request commentkubernetes-monitoring/kubernetes-mixin
Fix TX network queries resources dashboards
Thanks!
comment created time in 4 days
pull request commentprometheus-operator/kube-prometheus
Add SD devices to the list of node disks
Upstream is updated, so we can move ahead here :)
comment created time in 4 days
push eventkubernetes-monitoring/kubernetes-mixin
commit sha 020b61cf9434d04805c86905431718f4f1377239
Update config.libsonnet Add SD cards to the list of devices to monitor
commit sha 4f70619fe5555fb47d602ef88349ed38769acefd
Merge pull request #506 from jontg/patch-1 Update config.libsonnet to add SD cards to the list of block devices to monitor
push time in 4 days
PR merged kubernetes-monitoring/kubernetes-mixin
Add SD cards to the list of devices to monitor
pr closed time in 4 days
pull request commentkubernetes-monitoring/kubernetes-mixin
Update config.libsonnet to add SD cards to the list of block devices to monitor
Thanks!
comment created time in 4 days
pull request commentkubernetes/enhancements
Revert part of #2098. Metrics stability is not GA
/lgtm /approve
comment created time in 4 days
issue commentetcd-io/etcd
Metrics not following Prometheus best practices
This should still be fixed :)
comment created time in 4 days
pull request commentbrancz/kube-rbac-proxy
Happy whenever @paulfantom approves :)
comment created time in 4 days
pull request commentbrancz/kube-rbac-proxy
*: update client-go and other dependencies
Could you open an issue for a follow up to replace the context.TODO() calls?
comment created time in 4 days
issue closedconprof/conprof
Panic in /api/v1/query handler when the fetched profile is nil
If the fetched profile is nil https://github.com/conprof/conprof/blob/master/api/api.go#L334, then it will panic when rendering top and flamegraph.
closed time in 4 days
yeya24issue commentconprof/conprof
Panic in /api/v1/query handler when the fetched profile is nil
Should be solved by https://github.com/conprof/conprof/commit/9e12a0f2f5dc427ffa7b8223d95da45a777d0704
comment created time in 4 days
push eventconprof/conprof
commit sha 9095c5afc5b4b4171ee1bfdf5032136b2a86661d
api: Add meta report type
commit sha 046ff224171a70dc2c81223780ba7c54eafdef05
api: Add ability to choose sample index for report
commit sha 83b099f595db09fa1cca35cce630d6980f9373b1
scrape: Always gzip compress individual samples
commit sha a3366c05b8770f51ad5e6f3ae1548c17dc6664b3
scrape: Use non-private way to add profile name label
commit sha 9e12a0f2f5dc427ffa7b8223d95da45a777d0704
api: Return HTTP not found when profiles are not found
commit sha f30d5bf77497452ca77d32799af73d670f1c6e19
Merge branch 'meta-report'
push time in 4 days
issue commentconprof/conprof
Getting duplicate series from query range API
hmm interesting, yes they should be
comment created time in 4 days
push eventconprof/conprof
commit sha 56adc4a55dba0aebc4e5a336ec654435eff5431e
Fix http-address flag Signed-off-by: Daniel González Lopes <[email protected]>
commit sha 1e5c41752c83edeae37f1a2cffb436cf125db932
Merge pull request #92 from dgzlopes/fix/example-http-flag Fix quickstart HTTP flag
push time in 4 days
PR merged conprof/conprof
Running conprof all --help displays --http-address flag instead of --web.listen-address.
Signed-off-by: Daniel González Lopes [email protected]
pr closed time in 4 days
push eventconprof/conprof
commit sha 0d43fd8a4b9b05c2131481a25b49947acd7a01b9
Fix typo on test target Signed-off-by: Daniel González Lopes <[email protected]>
commit sha 76055da62387dcc2d9a1df477178ce52107d0918
Merge pull request #91 from dgzlopes/fix/typo-on-target Fix typo on test target
push time in 4 days
PR merged conprof/conprof
From loaclhost to localhost :smile:
Signed-off-by: Daniel González Lopes [email protected]
pr closed time in 4 days
pull request commentmonitoring-mixins/mixtool
cmd/mixtool/server.go: Add server command
Yeah nice, with those features I think I'm on board with the namespacing approach.
comment created time in 4 days
release prometheus/prometheus
prometheus-2.22.0.darwin-amd64.tar.gz 61.36MB
prometheus-2.22.0.dragonfly-amd64.tar.gz 61.19MB
prometheus-2.22.0.freebsd-386.tar.gz 59.40MB
prometheus-2.22.0.freebsd-amd64.tar.gz 61.26MB
prometheus-2.22.0.freebsd-armv6.tar.gz 56.35MB
prometheus-2.22.0.freebsd-armv7.tar.gz 56.33MB
prometheus-2.22.0.linux-386.tar.gz 59.51MB
prometheus-2.22.0.linux-amd64.tar.gz 61.30MB
prometheus-2.22.0.linux-arm64.tar.gz 57.40MB
prometheus-2.22.0.linux-armv5.tar.gz 56.46MB
prometheus-2.22.0.linux-armv6.tar.gz 56.42MB
prometheus-2.22.0.linux-armv7.tar.gz 56.40MB
prometheus-2.22.0.linux-mips64.tar.gz 56.80MB
prometheus-2.22.0.linux-mips64le.tar.gz 54.53MB
prometheus-2.22.0.linux-ppc64.tar.gz 58.17MB
prometheus-2.22.0.linux-ppc64le.tar.gz 56.03MB
prometheus-2.22.0.linux-s390x.tar.gz 61.27MB
prometheus-2.22.0.netbsd-386.tar.gz 59.34MB
prometheus-2.22.0.netbsd-amd64.tar.gz 61.19MB
prometheus-2.22.0.netbsd-armv6.tar.gz 56.30MB
prometheus-2.22.0.netbsd-armv7.tar.gz 56.28MB
prometheus-2.22.0.openbsd-386.tar.gz 59.33MB
prometheus-2.22.0.openbsd-amd64.tar.gz 61.17MB
prometheus-2.22.0.openbsd-armv7.tar.gz 56.27MB
prometheus-2.22.0.windows-386.tar.gz 60.79MB
prometheus-2.22.0.windows-amd64.tar.gz 61.60MB
sha256sums.txt 2.64KB
released time in 5 days
pull request commentkubernetes/kube-state-metrics
Migrate ingress and certificates away from deprecated APIs
/lgtm /approve
comment created time in 5 days
created tagprometheus/prometheus
The Prometheus monitoring system and time series database.
created time in 5 days
push eventprometheus/prometheus
commit sha e1406c9406be0ae1bd8ea7f4d6df26747ab799c3
*: Cut v2.22.0 Signed-off-by: Frederic Branczyk <[email protected]>
commit sha 0a7fdd3b76960808c3a91d92267c3d815c1bc354
Merge pull request #8059 from brancz/cut-2.22.0 *: Cut v2.22.0
push time in 5 days
PR merged prometheus/prometheus
No major issues have been reported with the rc.0, so releasing the final v2.22.0.
@roidelapluie @brian-brazil @juliusv @gouthamve @codesome @bwplotka @beorn7 @simonpasquier
pr closed time in 5 days
push eventconprof/conprof
commit sha 233fe7530afeb285e029bd5dde764e321baf2423
*: Fix various linting issues
push time in 5 days
push eventconprof/conprof
commit sha 7d4709739f123b4074793a2c10a53ef83915c5bd
*: Fix license headers
push time in 5 days
push eventprometheus/docs
commit sha 35d86f6be4a903ebf678337d4820d00c5952eed7
content/governance.md: Change @brancz company association Signed-off-by: Frederic Branczyk <[email protected]>
push time in 5 days
push eventconprof/conprof
commit sha 2b2b578f74bc7bfef6764b93c7094e1b78cafb0e
scrape: Remove meta labels except __name__
push time in 5 days
push eventconprof/conprof
commit sha d579cfaa1dfb9e96b3373c31230ab7f38721ffca
*: Move cors flags to all binaries
commit sha a1367d62e76b142b2cbff0b0dc9c674ac34e65ec
api: Add query API returning single profiles
commit sha dc7b84ac2cf6b17a9777ab743f6b850cb3017c92
api: Add top report type support to query API
commit sha 8484c980f7cb2fe7964dd38d7e393dfa381898fb
api: Reorganize query API rendering code into individual files
commit sha c5033815da50aa592fc6db274d52c389c4b1d223
api: Add flamegraph report type
commit sha 5184135ec3a4fc446c23073d4c41428d16086e02
api: Add ability to request raw serialized profile for downloading
commit sha 81c448ec88fbaf70e355de27f603b6cee804eaa4
api: Report internal server error when failing to iterate series
commit sha 881263142f770fabe59aa476caeabdd1a5934770
store.go: Lower stream message size
commit sha a881eb7dca09c5c9be2bff6874263714a49deb8e
pkg/store: Merge results series distributed across series responses
commit sha 3f0b4f38299e9332ff676243e8e39888415c1d95
api: Add ability to diff absolute Profiles
commit sha b3d955a0a266b8848350d040a3288891b7b4a4cf
scrape: Fix heap profile series __name__
commit sha bcbb8a5599ae291b9aacc24dc7a4dedb33775687
api: Add ability to merge profiles
commit sha 411b66a4eb4dbca647fc9b9dd36eb74eaa510364
Merge branch 'api'
push time in 5 days
push eventbrancz/prometheus
commit sha e1406c9406be0ae1bd8ea7f4d6df26747ab799c3
*: Cut v2.22.0 Signed-off-by: Frederic Branczyk <[email protected]>
push time in 5 days
PR opened prometheus/prometheus
No major issues have been reported with the rc.0, so releasing the final v2.22.0.
@roidelapluie @brian-brazil @juliusv @gouthamve @codesome @bwplotka @beorn7 @simonpasquier
pr created time in 5 days
pull request commentmonitoring-mixins/mixtool
cmd/mixtool/server.go: Add server command
Yeah I think that's good to think about. If we can find a way that combines a workflow similar to pruning in kubectl and the namespacing approach you have, I would be happy with that as well.
comment created time in 7 days
push eventmonitoring-mixins/mixtool
commit sha 59d44357240dd71204820ad9a13edfd2cb5cdbd1
cmd/mixtool/server.go: Add server command (#25) * cmd/mixtool/server.go: Add server command The server command launches a server that provides an API for provisioning Prometheus rules into a directory and reloads the target Prometheus server. Tested against a local Prometheus server started with: ```bash prometheus --web.enable-lifecycle ``` Prometheus config: ```yaml rule_files: - rules/rules.yaml ``` And a rule file: ```yaml groups: - name: general rules: - alert: Watchdog expr: vector(1) ``` Call provisioning API with curl: ```bash curl -X PUT --data-binary @rules.yaml 127.0.0.1:8080/api/v1/rules ``` * cmd/mixtool/server.go: Improve error wrapping and checking * cmd/mixtool/server.go: Rename trigger function to triggerReload
push time in 7 days
PR merged monitoring-mixins/mixtool
This is a base that we can build on (validation, optimizing, etc.).
The server command launches a server that provides an API for provisioning Prometheus rules into a directory and reloads the target Prometheus server.
Tested against a local Prometheus server started with:
prometheus --web.enable-lifecycle
Prometheus config:
rule_files:
- rules/rules.yaml
And a rule file:
groups:
- name: general
rules:
- alert: Watchdog
expr: vector(1)
Call provisioning API with curl:
curl -X PUT --data-binary @rules.yaml 127.0.0.1:8080/api/v1/rules
@tomwilkie @metalmatze @sh0rez @sdboyer
pr closed time in 7 days
push eventmonitoring-mixins/mixtool
commit sha be418ae54bb549016a5e291fe79cf08b020aafbd
cmd/mixtool/server.go: Rename trigger function to triggerReload
push time in 8 days
pull request commentmonitoring-mixins/mixtool
cmd/mixtool/server.go: Add server command
Looks like in Cortex we do POST /api/v1/rules/{namespace}, where namespace is the rules filename (https://cortexmetrics.io/docs/api/#set-rule-group)
@brancz WDYT, support this here so each mixin can have its own file?
Also, can we implement DELETE? No is a valid answer ;-)
I quite like the characteristics of always replacing everything, it solves deleting nicely as well. If you don't mind, I would like to explore what possibilities there could be having the client side handle variations of mutations?
comment created time in 8 days
Pull request review commentmonitoring-mixins/mixtool
cmd/mixtool/server.go: Add server command
+// Copyright 2018 mixtool authors+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package main++import (+ "bufio"+ "bytes"+ "context"+ "fmt"+ "io"+ "io/ioutil"+ "net/http"+ "os"++ "github.com/pkg/errors"+ "github.com/urfave/cli"+)++func serverCommand() cli.Command {+ return cli.Command{+ Name: "server",+ Usage: "Start a server to provision Prometheus rule file(s) with.",+ Description: "Start a server to provision Prometheus rule file(s) with.",+ Flags: []cli.Flag{+ cli.StringFlag{+ Name: "bind-address",+ Usage: "Address to bind HTTP server to.",+ },+ cli.StringFlag{+ Name: "prometheus-reload-url",+ Value: "http://127.0.0.1:9090/-/reload",+ Usage: "Prometheus address to reload after provisioning the rule file(s).",+ },+ cli.StringFlag{+ Name: "rule-file",+ Usage: "File to provision rules into.",+ },+ },+ Action: serverAction,+ }+}++func serverAction(c *cli.Context) error {+ bindAddress := c.String("bind-address")+ http.Handle("/api/v1/rules", &ruleProvisioningHandler{+ ruleProvisioner: &ruleProvisioner{+ ruleFile: c.String("rule-file"),+ },+ prometheusReloader: &prometheusReloader{+ prometheusReloadURL: c.String("prometheus-reload-url"),+ },+ })+ return http.ListenAndServe(bindAddress, nil)+}++type ruleProvisioningHandler struct {+ ruleProvisioner *ruleProvisioner+ prometheusReloader *prometheusReloader+}++func (h *ruleProvisioningHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {+ ctx := r.Context()+ if r.Method != "PUT" {+ http.Error(w, "Bad request: only PUT requests supported", http.StatusBadRequest)+ return+ }++ reloadNecessary, err := h.ruleProvisioner.provision(r.Body)+ if err != nil {+ http.Error(w, fmt.Sprintf("Internal Server Error: %v", err), http.StatusInternalServerError)+ return+ }++ if reloadNecessary {+ if err := h.prometheusReloader.trigger(ctx); err != nil {+ http.Error(w, fmt.Sprintf("Internal Server Error: %v", err), http.StatusInternalServerError)+ return+ }+ }+}++type ruleProvisioner struct {+ ruleFile string+}++// provision attempts to provision the rule files read from r, and if identical+// to existing, does not provision them. It returns whether Prometheus should+// be reloaded and if an error has occurred.+func (p *ruleProvisioner) provision(r io.Reader) (bool, error) {+ b := bytes.NewBuffer(nil)+ tr := io.TeeReader(r, b)++ f, err := os.Open(p.ruleFile)+ if err != nil && !os.IsNotExist(err) {+ return false, err+ }+ if os.IsNotExist(err) {+ f, err = os.Create(p.ruleFile)+ if err != nil {+ return false, err+ }+ }++ equal, err := readersEqual(tr, f)+ if err != nil {+ return false, err+ }+ if equal {+ return false, nil+ }++ if err := f.Truncate(0); err != nil {+ return false, err+ }++ if _, err := io.Copy(f, b); err != nil {+ return false, err+ }++ return true, nil+}++func readersEqual(r1, r2 io.Reader) (bool, error) {+ buf1 := bufio.NewReader(r1)+ buf2 := bufio.NewReader(r2)+ for {+ b1, err1 := buf1.ReadByte()+ b2, err2 := buf2.ReadByte()+ if err1 != nil && err1 != io.EOF {+ return false, err1+ }+ if err2 != nil && err2 != io.EOF {+ return false, err2+ }+ if err1 == io.EOF || err2 == io.EOF {+ return err1 == err2, nil+ }+ if b1 != b2 {+ return false, nil+ }+ }+}++type prometheusReloader struct {+ prometheusReloadURL string+}++func (r *prometheusReloader) trigger(ctx context.Context) error {
triggerReload?
comment created time in 8 days
Pull request review commentmonitoring-mixins/mixtool
cmd/mixtool/server.go: Add server command
+// Copyright 2018 mixtool authors+//+// Licensed under the Apache License, Version 2.0 (the "License");+// you may not use this file except in compliance with the License.+// You may obtain a copy of the License at+//+// http://www.apache.org/licenses/LICENSE-2.0+//+// Unless required by applicable law or agreed to in writing, software+// distributed under the License is distributed on an "AS IS" BASIS,+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+// See the License for the specific language governing permissions and+// limitations under the License.++package main++import (+ "bufio"+ "bytes"+ "context"+ "fmt"+ "io"+ "io/ioutil"+ "net/http"+ "os"++ "github.com/pkg/errors"+ "github.com/urfave/cli"+)++func serverCommand() cli.Command {+ return cli.Command{+ Name: "server",+ Usage: "Start a server to provision Prometheus rule file(s) with.",+ Description: "Start a server to provision Prometheus rule file(s) with.",+ Flags: []cli.Flag{+ cli.StringFlag{+ Name: "bind-address",+ Usage: "Address to bind HTTP server to.",+ },+ cli.StringFlag{+ Name: "prometheus-reload-url",+ Value: "http://127.0.0.1:9090/-/reload",+ Usage: "Prometheus address to reload after provisioning the rule file(s).",+ },+ cli.StringFlag{+ Name: "rule-file",+ Usage: "File to provision rules into.",+ },+ },+ Action: serverAction,+ }+}++func serverAction(c *cli.Context) error {+ bindAddress := c.String("bind-address")+ http.Handle("/api/v1/rules", &ruleProvisioningHandler{+ ruleProvisioner: &ruleProvisioner{+ ruleFile: c.String("rule-file"),+ },+ prometheusReloader: &prometheusReloader{+ prometheusReloadURL: c.String("prometheus-reload-url"),+ },+ })+ return http.ListenAndServe(bindAddress, nil)+}++type ruleProvisioningHandler struct {+ ruleProvisioner *ruleProvisioner+ prometheusReloader *prometheusReloader+}++func (h *ruleProvisioningHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {+ ctx := r.Context()+ if r.Method != "PUT" {+ http.Error(w, "Bad request: only PUT requests supported", http.StatusBadRequest)+ return+ }++ reloadNecessary, err := h.ruleProvisioner.provision(r.Body)+ if err != nil {+ http.Error(w, fmt.Sprintf("Internal Server Error: %v", err), http.StatusInternalServerError)+ return+ }++ if reloadNecessary {+ if err := h.prometheusReloader.trigger(ctx); err != nil {+ http.Error(w, fmt.Sprintf("Internal Server Error: %v", err), http.StatusInternalServerError)+ return+ }+ }+}++type ruleProvisioner struct {+ ruleFile string+}++// provision attempts to provision the rule files read from r, and if identical+// to existing, does not provision them. It returns whether Prometheus should+// be reloaded and if an error has occurred.+func (p *ruleProvisioner) provision(r io.Reader) (bool, error) {+ b := bytes.NewBuffer(nil)+ tr := io.TeeReader(r, b)++ f, err := os.Open(p.ruleFile)+ if err != nil && !os.IsNotExist(err) {+ return false, err+ }+ if os.IsNotExist(err) {+ f, err = os.Create(p.ruleFile)+ if err != nil {+ return false, err+ }+ }++ equal, err := readersEqual(tr, f)+ if err != nil {+ return false, err+ }+ if equal {+ return false, nil+ }++ if err := f.Truncate(0); err != nil {+ return false, err+ }++ if _, err := io.Copy(f, b); err != nil {+ return false, err+ }++ return true, nil+}++func readersEqual(r1, r2 io.Reader) (bool, error) {+ buf1 := bufio.NewReader(r1)+ buf2 := bufio.NewReader(r2)+ for {+ b1, err1 := buf1.ReadByte()+ b2, err2 := buf2.ReadByte()+ if err1 != nil && err1 != io.EOF {+ return false, err1+ }+ if err2 != nil && err2 != io.EOF {+ return false, err2+ }+ if err1 == io.EOF || err2 == io.EOF {+ return err1 == err2, nil+ }+ if b1 != b2 {+ return false, nil+ }+ }+}++type prometheusReloader struct {+ prometheusReloadURL string+}++func (r *prometheusReloader) trigger(ctx context.Context) error {+ req, err := http.NewRequest("POST", r.prometheusReloadURL, nil)+ if err != nil {+ return errors.Wrap(err, "create request")+ }+ req = req.WithContext(ctx)++ resp, err := http.DefaultClient.Do(req)+ if err != nil {+ return errors.Wrap(err, "reload request failed")+ }++ if _, err := io.Copy(ioutil.Discard, resp.Body); err != nil {+ return errors.Wrap(err, "exhausting request body failed")+ }
if it's not exhausted the file handle sticks around, we can do this asynchronously as well, but it's not really a bottleneck or problem here right now in my opinion
comment created time in 8 days