Commit Graph

43 Commits

Author SHA1 Message Date
Manuel Rüger 2a7a96b659 Rename cli flag from label-metrics-allow-list to metric-labels-allowlist
This might be more clear on what the flag is doing. There were two ways
to spell allow-list / allowlist which it removes as well

Fixes: https://github.com/kubernetes/kube-state-metrics/issues/1421
2021-03-26 13:11:19 +01:00
Mikulas (Mike) Dite ffa4c7bf0e fix labels-metric-allow-list documentation
The parser defined in types.go does not expect quotes
https://github.com/kubernetes/kube-state-metrics/blob/master/pkg/options/types.go#L136-L140
https://github.com/kubernetes/kube-state-metrics/blob/master/pkg/options/types_test.go#L168
2021-03-03 11:07:09 +00:00
Lili Cosic 3b23d01afe pkg/options/types.go: Adjust Set to parse new flag params 2020-11-18 15:59:19 +01:00
Lili Cosic 0f4c5128ec internal/store: Rework label allow list for label metrics 2020-11-18 15:59:19 +01:00
Lili Cosic 4093cb34de Adjust klog to klog/v2 2020-10-05 15:29:12 +02:00
Joel Whittaker-Smith 908f87b2cd apply boundaries to metrics and allow via flag what labels to include
Signed-off-by: Joel Whittaker-Smith <jdws.dev@gmail.com>
2020-08-26 12:42:30 +02:00
vikkyomkar 1be1b9d77b Renamed --namespace flag to --namespaces 2020-03-14 21:35:15 +05:30
Alexander Carpenter ec66bad60e
Update pkg/options/options.go
Co-Authored-By: Lili Cosic <cosiclili@gmail.com>
2020-02-06 08:30:09 -06:00
Alexander-Carpenter 69fe7da267 Rename collector to resource 2020-02-05 19:43:23 -06:00
yeya24 da2dadcd3e remove deprecated metrics
Signed-off-by: yeya24 <yb532204897@gmail.com>

remove deprecated options

Signed-off-by: yeya24 <yb532204897@gmail.com>
2020-02-05 08:48:23 -05:00
Thibault Le Reste cb655340d6 Rename black-/whitelist to allow/deny-list 2020-02-03 17:05:11 +01:00
Kubernetes Prow Robot 0ff33c2137
Merge pull request #1005 from yeya24/same-port
v2: change metrics port to 8080, telemetry port to 8081
2020-01-31 01:54:20 -08:00
asidorovj f5729a5ccb add leases collector 2020-01-30 08:31:01 +03:00
yeya24 53af563a6a change metrics port to 8080, telemetry port to 8081
Signed-off-by: yeya24 <yb532204897@gmail.com>
2019-12-13 12:47:07 -05:00
Tariq Ibrahim ea4c2eb764
Merge branch 'master' into networkpolicy-collector 2019-10-17 10:10:45 -07:00
Miles Bryant e780fc34f3
store: export NetworkPolicy objects 2019-10-17 11:49:29 +01:00
Jens Erat 4e637854a2
add VolumeAttachment collector
Kubernetes has a new resource type: `VolumeAttachments`. They provide
helpful information on where a volume is attached and to alert on
unexpected attachment status (for example, differences between
information scraped from node-exporter and kube-state-metrics).

The collector adds a bunch of new metrics. Each VolumeAttachment (ie.,
each CSI-attached volume) will have one of each, so we do not overly
pollute the metrics space. Most metrics are rather unsurprising.

- `kube_volumeattachment_status_attachment_metadata`: provides a
  label-like export of the attachment metadata map. Generalizing the
  label-conversion function slightly helps at providing this metric.
- `kube_volumeattachment_created`: as VolumeAttachments are
  automatically created and we already suffered from duplicate
  `VolumeAttachments`, this can be invaluable for debugging
  misattachments.
- `kube_volumeattachment_spec_source_persistentvolume`: will only be
  generated when the volume source is of `PersistentVolume` type. The
  other type `inlineVolumeSpec` is still alpha-level and hard to map to
  metrics.

No end-to-end test manifest was added, as `VolumeAttachment`s are
automatically generated when mounting volumes.

Signed-off-by: Jens Erat <email@jenserat.de>
2019-10-13 21:36:50 +02:00
Ben Wells a9c5ff9164 Simplify collector/metric set 2019-10-07 09:04:25 +01:00
Nataly Sheinin 99623defbe
add mutatingwebhookconfiguration, validatingwebhookconfiguration metrics 2019-10-03 14:23:18 -04:00
Frederic Branczyk f3d41de450
Add auto detecting of sharding
main_test.go: Add model based test for sharding

In order to ensure a sharded system behaves equal to an unsharded
system, a model based test has been introduced. It scrapes an unsharded
setup and compares its output with the union of a sharded setup
therefore ensuring semantic equality.
2019-08-30 22:45:35 +02:00
Frederic Branczyk 84d61f9a93
Introduce sharding 2019-08-30 13:51:30 +02:00
Kubernetes Prow Robot 3b1c7c268d
Merge pull request #773 from tariq1890/regex
feat: implement black/white- listing of metrics by regex
2019-06-19 06:48:32 -07:00
Tariq Ibrahim 2a3c696347
feat: implement black/white- listing of metrics by regex 2019-06-19 02:16:52 -07:00
Miles Bryant e1b45de7f6
builder/main: allow collectors not enabled by default
This fixes an issue where it was impossible to specify a collector that
was available but not selected by default.

Instead of checking whether chosen collectors are valid at flag parse
time, this moves the check into the builder, where we can reference it
against the availableStores in the builder. As a bonus, the error
message also prints out a list of available collectors:

```
kube-state-metrics --collectors non-existent-collector
I0618 15:23:34.517532   50719 main.go:88] Using collectors non-existent-collector
F0618 15:23:34.519132   50719 main.go:90] Error: collector non-existent-collector does not exist. Available collectors: persistentvolumeclaims,configmaps,limitranges,nodes,namespaces,persistentvolumes,pods,replicasets,services,cronjobs,deployments,ingresses,horizontalpodautoscalers,jobs,poddisruptionbudgets,secrets,certificatesigningrequests,daemonsets,endpoints,storageclasses,replicationcontrollers,resourcequotas,statefulsets
```
2019-06-18 16:28:11 +01:00
xieyanker c18dfa26cf Add Metrics About StorageClass 2019-06-05 11:32:54 +08:00
reetasingh ddeda94f99 Adding unit test 2019-04-25 02:37:04 -04:00
reetasingh 2720645a94 Adding unit test and fixing typo 2019-04-21 05:13:09 -04:00
tariqibrahim d1c88bd26a use a more idiomatic way of handling error messages 2019-04-14 00:00:51 -07:00
tariqibrahim 9325e38af8 use kubernetes 1.14 dependencies in kube-state-metrics 2019-03-28 12:13:00 -07:00
Haoran Wang 6793b6881d Add collector for csr 2019-03-21 09:03:42 +08:00
tariqibrahim 68573d75a5 fix all golint issues in kube-state-metrics 2019-03-02 10:11:18 -08:00
tariqibrahim 1d4c741f84 use klog instead of glog 2019-02-19 20:03:04 -08:00
tariqibrahim f7416852bf Changed the collector name from ingress to ingresses to match the convention 2019-02-10 19:37:38 -08:00
Raphael Deem 535ddb5a06 add ingress labels 2019-02-05 11:19:07 -08:00
tariqibrahim ab128fedf4 correct some typographical mistakes in kube-state-metrics 2019-02-02 21:55:12 -08:00
Max Leonard Inden 7ac0ab7410
pkg/builder: Make collector order deterministic
Instead of iterating a map of enabled collectors, iterate a sorted
slice to achieve determinism across scrapes.

Having a consistent order in the metrics output enables Proemetheus to
apply optimizations during metric parsing and ingestion.
2018-11-29 15:43:44 +01:00
Max Leonard Inden 4cc7e9be49
pkg/options: Add flag to enable gzip encoding for responses
Dependent on the environment users might or might not want to encode the
responses of kube-state-metrics via gzip independent of the
`Accept-Header` that the client (Prometheus) sends.
2018-10-24 16:11:53 +02:00
Greg Lyons 40f293dbde Add PodDisruptionBudget metrics 2018-10-17 15:23:32 -07:00
Frederic Branczyk c522d44f7b
Allow white- and black-listing metrics to be exposed 2018-07-23 17:36:11 +02:00
Andy Xie cc9604ad5f add generic node resource capacity and allocatable 2018-05-28 13:23:43 +08:00
Andy Xie 14ba135253 add generic pod resource request and limit 2018-05-17 13:20:53 +08:00
Andy Xie dc2501019a fix collectors argument panic 2018-05-16 12:09:38 +08:00
Andy Xie fef896fa62 refactor to toward kubernetes way 2018-04-27 22:23:12 +08:00