Kubernetes state_cronjob metricset

edit

Kubernetes state_cronjob metricset

edit

This is the state_cronjob metricset of the Kubernetes module.

This metricset does not add metadata by default and hence in order to add metadata for this one need to configure the metricset with add_metadata: true and uncomment the proper apiGroup in the ClusterRole. Metadata are only available for versions of k8s >= v1.21.

Fields

edit

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-08-06T09:04:37.555Z",
  "@metadata": {
    "beat": "metricbeat",
    "type": "_doc",
    "version": "8.0.0"
  },
  "kubernetes": {
    "namespace": "default",
    "cronjob": {
      "is_suspended": false,
      "active": {
        "count": 0
      },
      "last_schedule": {
        "sec": 1.56508224e+09
      },
      "next_schedule": {
        "sec": 1.5650823e+09
      },
      "created": {
        "sec": 1.565081911e+09
      },
      "name": "mycronjob"
    }
  },
  "ecs": {
    "version": "1.0.1"
  },
  "host": {
    "containerized": false,
    "name": "worker2",
    "hostname": "worker2",
    "architecture": "x86_64",
    "os": {
      "codename": "bionic",
      "platform": "ubuntu",
      "version": "18.04.2 LTS (Bionic Beaver)",
      "family": "debian",
      "name": "Ubuntu",
      "kernel": "4.4.0-148-generic"
    }
  },
  "agent": {
    "id": "8a56f5ca-477f-4a10-b88e-e3793ac3f892",
    "version": "8.0.0",
    "type": "metricbeat",
    "ephemeral_id": "9acb5452-9e96-45e6-82ab-76e2f20b22eb",
    "hostname": "worker2"
  },
  "event": {
    "dataset": "kubernetes.cronjob",
    "module": "kubernetes",
    "duration": 7832416
  },
  "metricset": {
    "name": "state_cronjob"
  },
  "service": {
    "address": "kube-state-metrics:8080",
    "type": "kubernetes"
  }
}