49 Commits

Author SHA1 Message Date
John Zheng
e49845dc93 Update README.md -- add kubernetes installation
update Readme.md, for adding kubernetes installation
 Signed-off-by: John Zheng<john.zheng@hp.com>

Signed-off-by: John <john.zheng@hp.com>
2024-05-16 06:19:51 +00:00
daftping
f9141fd882
adding Argo Rollouts object support for pod label selector
Signed-off-by: daftping <21245083+daftping@users.noreply.github.com>
2024-04-02 02:38:14 -07:00
Lucas Thiesen
1661d7c4bc
Fix typo on metric annotation for external RPS metric
Signed-off-by: Lucas Thiesen <lucassthiesen@gmail.com>
2024-01-19 10:38:28 +01:00
Mikkel Oscar Lyderik Larsen
8190553285 Fix type for value target
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-12-08 17:02:21 +01:00
Mikkel Oscar Lyderik Larsen
cb43919967 Fix table for nakadi docs
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-12-07 16:50:40 +01:00
Mikkel Oscar Lyderik Larsen
43dd2e9741 Update wording in README
Co-authored-by: Andrey <andrey.dyachkov@gmail.com>
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-12-07 10:30:43 +01:00
Mikkel Oscar Lyderik Larsen
4aeebc853c Add support for scaling based on Nakadi
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-12-04 17:20:15 +01:00
Alexander Yastrebov
16ec43c361 all: fix typos discovered by codespell
```
codespell --skip .git | less
```

See https://github.com/codespell-project/codespell

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
2023-06-12 11:48:39 +02:00
Mikkel Oscar Lyderik Larsen
35e3fe83e8 Update README.md
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2023-05-25 10:14:53 +02:00
Lucas Thiesen
d171e049bf
Update documentation with new metric name
Signed-off-by: Lucas Thiesen <lucas.thiesen@zalando.de>
2023-05-23 15:55:20 +02:00
Lucas Thiesen
d6a33fed63
Update documentation for multi hostnames per metric and weight param
Signed-off-by: Lucas Thiesen <lucas.thiesen@zalando.de>
2023-05-23 15:46:38 +02:00
Lucas Thiesen
65dd585813
Add documentation regarding hostname-rps collector to readme
Signed-off-by: Lucas Thiesen <lucas.thiesen@zalando.de>
2023-05-23 15:46:36 +02:00
Alexander Didenko
c4a1e08fdf
Update HPA to autoscaling/v2 apiVersion (#551) 2023-05-03 23:01:19 +02:00
Katyanna Moura
203aaeafb9 Update supported K8s version for skipper-collector
Signed-off-by: Katyanna Moura <amelie.kn@gmail.com>
2022-06-22 10:27:35 +02:00
Jonathan Juares Beber
fd4ead837e
Make the number of ramp steps configurable
In #371 we introduced steps to make the scaling up possible even when
the HPA forces a 10% change. The problem is that 10% might not be
sufficient for some specific scaling scenarios.

For example, a an application targeting 12 pods and using a
ScalingSchedule with the value of 10000 to achieve that, will require a
target of 833. With 10 ramp steps the 90% bucket will return a metric of
9000 and the HPA calculates (9000/833) 10.8 pods, rounding to 11 pods.
Once the metric reaches the time to return 100% it will won't be
effective, since the change of the current number of pods (11) and the
desired one (12) is less than 10%.

This commit does not try to tackle this problem completely, since the
10% rule is not fixed, might change among different clusters and is also
dependent on the value given to each ScalingSchedule. Therefore, this
commit makes the number of ramp steps configurable via the
`--scaling-schedule-ramp-steps` config flag, defaulting to 10.

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-10-22 15:35:11 +02:00
Mikkel Oscar Lyderik Larsen
190f0db092
Use labels for specifying Ingress/RouteGroup backend
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-08-20 09:33:17 +02:00
Mikkel Oscar Lyderik Larsen
6b0afe5180
Add support for scaling based on RouteGroup resource
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-08-19 18:28:58 +02:00
☃ pitr
c626f414db remove deprecated zmon aggregators in README
Signed-off-by: ☃ pitr <peter.vernigorov@zalando.de>
2021-07-26 11:14:27 +02:00
Jonathan Juares Beber
d7f9664d52
Remove HTTP collector check on identifier label
This commit removes the logic that checks for an identifier label in the
http collector config. It also removes the documentation on the README
that mentions that the metric has to be in an old format, removed in
the #219.

Fixes #331

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-06-01 12:33:32 +02:00
Jonathan Juares Beber
a382dbfe7b
Create ScalingSchedule collector
This commit adds two new collectors to the adapter:
- ClusterScalingScheduleCollector; and
- ScalingScheduleCollector

Also, it introduces the required collectors plugins, initialization
logic in the server startup, documentation and deployment example
(including the helm chart). A new config flag is created,
`-scaling-schedule`, and allows to enable and to disable the collection
of such metrics. It's disabled by default.

This collectors are the required logic to utilise the CRDs introduced in
the #284 pull request. It makes use of the kubernetes go-client
implementations of a [Store][0] and [Reflector][1].

[0]: https://pkg.go.dev/k8s.io/client-go/tools/cache#Store
[1]: https://pkg.go.dev/k8s.io/client-go/tools/cache#Reflector

Signed-off-by: Jonathan Juares Beber <jonathanbeber@gmail.com>
2021-05-21 14:29:11 +02:00
Anatolii Dutchak
5747b6c9de Renamed min-pod-age to min-pod-ready-age. Considering LastTransitionTime for pod ready age.
Signed-off-by: Anatolii Dutchak <adutchak-x@tunein.com>
2021-04-19 18:51:39 +03:00
Anatolii Dutchak
f216070630 Introduced min-pod-age configuration key. Added Pod condition handling
Signed-off-by: Anatolii Dutchak <adutchak-x@tunein.com>
2021-04-17 00:52:00 +03:00
Mikkel Oscar Lyderik Larsen
2d119e68e4
Clearly document interval config
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-04-13 11:28:50 +02:00
Mikkel Oscar Lyderik Larsen
b313c963b6
Update dependencies
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2021-02-01 10:26:01 +01:00
Mikkel Oscar Lyderik Larsen
df0ed1fca4
Use labels for mapping metric types to metrics (#219)
* Use labels for mapping metric types to metrics

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Log warning when old format is used

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Test NewCollector logic for external metrics

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2020-11-04 20:40:53 +01:00
Muaaz Saleem
2e09132f95
[prom collector ] Documenting scrape interval (#215)
There is a way to configure scrape interval

Signed-off-by: Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2020-10-26 17:37:24 +01:00
Mikkel Oscar Lyderik Larsen
cf369639d8
Support bracket notation in jsonPath
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2020-08-13 09:51:05 +02:00
Abe Friesen
f0b817629c Add support for custom timeouts
Allow configuration per metric for connect and request timeouts
when querying pods for JSON metrics.

Signed-off-by: Abe Friesen <2319792+doyshinda@users.noreply.github.com>
2020-05-16 07:15:58 -06:00
Arjun Naik
2d3ddc53ef Add and HTTP metrics collector
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2020-04-02 11:05:37 +02:00
Abe Friesen
5bf87cb10e
Add support for passing URL query params to pod metric endpoints (#109)
Adds a new metric-config option named `rawQuery`. The value of
this option will be appended to the metric `path` as URL query
parameters to be used by the pod's application. E.g.,:
```
metric-config.pods.requests-per-second.json-path/rawQuery: "foo=bar&baz=bop"
```
will apppend `?foo=bar&baz=bop` to the URL.

Signed-off-by: Abe Friesen <2319792+doyshinda@users.noreply.github.com>
2020-03-10 10:45:28 +01:00
Lorenzo Affetti
04ae6d955e
fix(influxdb): fix swap of org/token parameter passing to
InfluxDBCollector

Convert from `orgID` to `org`.

Signed-off-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
2020-02-21 19:13:17 +01:00
Mikkel Oscar Lyderik Larsen
9d78fff1b5
Only support autoscaling/v2beta2
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2020-01-29 15:59:20 +01:00
Lorenzo Affetti
5b55bea994 feat(collector): add InfluxDB collector
Signed-off-by: Lorenzo Affetti <lorenzo.affetti@gmail.com>
2020-01-22 10:09:29 +01:00
Tomás Pinho
f6b2aede5b Support for JSONPath expressions that return arrays of values (#85)
* This is the initial implementation of support for JSONPath expressions
that return arrays of values instead of a single value.

This extends the
collector to define a few handy reducer functions that take in the slice
of float64 and return a single value. It also allows the user to define
which reducer function to use via the
"metric-config.<metricType>.<metricName>.json-path/reducer-func"
annotation, which
can have the values of 'avg', 'min', 'max' and 'sum'.

For instance, the Ruby puma webserver exposes metrics of the form of $.worker_status[*].last_status.pool_capacity that have to be consumed as an array of values to be properly targetted.

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* Renames "reducerFunc" to "aggregator" for consistency with other
collectors. Renames the annotation from
"metric-config.<metricType>.<metricName>.json-path/reducer-func" to "metric-config.<metricType>.<metricName>.json-path/aggregator".

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* Return error instead of defaulting to the avg aggregator, when no valid
aggregator name was specified and the JSONPath value is a slice of
numbers.

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* Fix index out of range on initialized output slice that was found while
writing tests.

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* Add tests for all added functions + NewJSONPathMetricsGetter

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* Add documentation on the `aggregator` option.

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* reducer function -> aggregator function

Signed-off-by: Tomás Pinho <me@tomaspinho.com>

* Fix comment to account for returned error.

Signed-off-by: Tomás Pinho <me@tomaspinho.com>
2019-10-24 18:15:10 +02:00
Mikkel Oscar Lyderik Larsen
76d2f74743
Add support for averageValue for request-per-second Skipper metric
This adds support for `averageValue` for the `request-per-second` metric
based on Ingress Objects. This is only supported from Kubernetes
`>=v1.14` (https://github.com/kubernetes/kubernetes/pull/72872).

When defining the HPA with `autoscaling/v2beta1` you still need to
define `targetValue` even though it won't be used when `averageValue` is
set. Once we default to `autoscaling/v2beta2` this akward API will be
gone.

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-10-08 17:10:28 +02:00
Eduard Ganiukov
2d1d51e829
collector/prometheus: add prometheus server (optional) as an annotation in HPA.
Signed-off-by: Eduard Ganiukov <eduard.ganiukov@swisscom.com>
2019-08-14 13:05:50 +02:00
Arjun Naik
19e9be9671 Document how to use HTTPS for pod collector
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-07-14 15:49:00 +02:00
Mikkel Oscar Lyderik Larsen
8fed8538ad
Merge pull request #53 from zalando-incubator/prometheus-external-metric
Allow Prometheus metrics for External target
2019-05-19 23:19:29 +02:00
Sandor Szücs
9a234cbdac
add AWS IAM policy as requirement to integrate with AWS SQS (#58)
Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2019-05-17 11:07:18 +02:00
Mikkel Oscar Lyderik Larsen
9d2760e3fc
Allow Prometheus metrics for External target
Fix #45

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-04-30 23:22:18 +02:00
Arjun
04b212175e
Added clarification of dummy-pod (#42)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-03-25 16:15:54 +01:00
Arjun
75633d3082
Changed request-per-second metric separator to a comma (#28)
Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-01-17 13:46:57 +01:00
Arjun
72aa672f51
Added weighting of RPS metrics based on backend weights (#27)
* Added weighting of rps metrics based on backend weights

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Updated documented with instructions on how to use the backend weighting

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Changed separator for RPS metric and added flag to specify backend weights annotation.

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>

* Allow for multiple backends with for weighting.

Signed-off-by: Arjun Naik <arjun.rn@gmail.com>
2019-01-17 13:13:52 +01:00
Muaaz Saleem
217bf900a0
Adding test coverage (#13)
* Adding test coverage through coverall

Adding test coverage through coverall so we can see the current state of
test coverage

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>

* Fix go.sum for go 1.11.2

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Trying to make travis use go 1.11.2

Since go.mod and go.sum files don't seem to be compatible between
go1.11.1, trying to make travis use go 1.11.2

Signed-off-by: Muhammad Muaaz Saleem <muhammad.muaaz.saleem@zalando.de>
2018-11-14 11:02:53 +01:00
Mikkel Oscar Lyderik Larsen
c86a82ca88 Simple ZMON collector implementation (#2)
* Simple ZMON collector implementation

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Add tests for ZMON client

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Add tests for zmon collector

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Update ZMON collector docs

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Expose tags instead of entities for queries

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>

* Remove unused function

Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-29 14:26:25 +01:00
Mikkel Oscar Lyderik Larsen
7534702d02
travis-ci.org instead of travis-ci.com
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-09 13:23:50 +02:00
Mikkel Oscar Lyderik Larsen
b0d789d0fe
Update travis badge to point to the right repo
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2018-10-09 11:15:36 +02:00
Per Ploug
3db0cc3135 Adding boilerplate files
Signed-off-by: Per Ploug <per.ploug@zalando.de>
2018-10-08 13:17:05 +02:00
Per Ploug
e9b677605a
Initial commit 2018-10-08 13:16:59 +02:00