This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Kubernetes state_cronjob metricset
editKubernetes state_cronjob metricset
editThis is the state_cronjob
metricset of the Kubernetes module.
This metricset adds metadata by default only for versions of k8s >= v1.21.
For older versions the APIs are not compatible and one need to configure the
metricset with add_metadata: false
and remove the proper apiGroup
in the ClusterRole
:
- apiGroups: [ "batch" ] resources: - cronjobs
For a description of each field in the metricset, see the exported fields section.
Here is an example document generated by this metricset:
{ "@timestamp": "2019-03-01T08:05:34.853Z", "event": { "dataset": "kubernetes.cronjob", "duration": 115000, "module": "kubernetes" }, "kubernetes": { "cronjob": { "active": { "count": 0 }, "created": { "sec": 1713862291 }, "is_suspended": false, "last_schedule": { "sec": 1713873360 }, "name": "hello", "next_schedule": { "sec": 1713873420 } }, "namespace": "default" }, "metricset": { "name": "state_cronjob", "period": 10000 }, "service": { "address": "127.0.0.1:55555", "type": "kubernetes" } }