Skip to content

Commit

Permalink
Enable beats stack monitoring configuration (elastic#5878)
Browse files Browse the repository at this point in the history
* Add stack monitoring for Beats 
* Public Documentation for Beats stack monitoring
  • Loading branch information
naemono authored and fantapsody committed Jan 3, 2023
1 parent 6ab705f commit f14c285
Show file tree
Hide file tree
Showing 46 changed files with 1,987 additions and 419 deletions.
1 change: 1 addition & 0 deletions cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ func registerControllers(mgr manager.Manager, params operator.Parameters, access
{name: "EMS-ES", registerFunc: associationctl.AddMapsES},
{name: "ES-MONITORING", registerFunc: associationctl.AddEsMonitoring},
{name: "KB-MONITORING", registerFunc: associationctl.AddKbMonitoring},
{name: "BEAT-MONITORING", registerFunc: associationctl.AddBeatMonitoring},
}

for _, c := range assocControllers {
Expand Down
118 changes: 114 additions & 4 deletions config/crds/v1/all-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2390,6 +2390,107 @@ spec:
is used.
type: string
type: object
monitoring:
description: Monitoring enables you to collect and ship logs and metrics
for this Beat. Metricbeat and/or Filebeat sidecars are configured
and send monitoring data to an Elasticsearch monitoring cluster
running in the same Kubernetes cluster.
properties:
logs:
description: Logs holds references to Elasticsearch clusters which
receive log data from an associated resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
monitoring Elasticsearch clusters running in the same Kubernetes
cluster. Due to existing limitations, only a single Elasticsearch
cluster is currently supported.
items:
description: ObjectSelector defines a reference to a Kubernetes
object which can be an Elastic resource managed by the
operator or a Secret describing an external Elastic resource
not managed by the operator.
properties:
name:
description: Name of an existing Kubernetes object corresponding
to an Elastic resource managed by ECK.
type: string
namespace:
description: Namespace of the Kubernetes object. If
empty, defaults to the current namespace.
type: string
secretName:
description: 'SecretName is the name of an existing
Kubernetes secret that contains connection information
for associating an Elastic resource not managed by
the operator. The referenced secret must contain the
following: - `url`: the URL to reach the Elastic resource
- `username`: the username of the user to be authenticated
to the Elastic resource - `password`: the password
of the user to be authenticated to the Elastic resource
- `ca.crt`: the CA certificate in PEM format (optional).
This field cannot be used in combination with the
other fields name, namespace or serviceName.'
type: string
serviceName:
description: ServiceName is the name of an existing
Kubernetes service which is used to make requests
to the referenced object. It has to be in the same
namespace as the referenced resource. If left empty,
the default HTTP service of the referenced resource
is used.
type: string
type: object
type: array
type: object
metrics:
description: Metrics holds references to Elasticsearch clusters
which receive monitoring data from this resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
monitoring Elasticsearch clusters running in the same Kubernetes
cluster. Due to existing limitations, only a single Elasticsearch
cluster is currently supported.
items:
description: ObjectSelector defines a reference to a Kubernetes
object which can be an Elastic resource managed by the
operator or a Secret describing an external Elastic resource
not managed by the operator.
properties:
name:
description: Name of an existing Kubernetes object corresponding
to an Elastic resource managed by ECK.
type: string
namespace:
description: Namespace of the Kubernetes object. If
empty, defaults to the current namespace.
type: string
secretName:
description: 'SecretName is the name of an existing
Kubernetes secret that contains connection information
for associating an Elastic resource not managed by
the operator. The referenced secret must contain the
following: - `url`: the URL to reach the Elastic resource
- `username`: the username of the user to be authenticated
to the Elastic resource - `password`: the password
of the user to be authenticated to the Elastic resource
- `ca.crt`: the CA certificate in PEM format (optional).
This field cannot be used in combination with the
other fields name, namespace or serviceName.'
type: string
serviceName:
description: ServiceName is the name of an existing
Kubernetes service which is used to make requests
to the referenced object. It has to be in the same
namespace as the referenced resource. If left empty,
the default HTTP service of the referenced resource
is used.
type: string
type: object
type: array
type: object
type: object
revisionHistoryLimit:
description: RevisionHistoryLimit is the number of revisions to retain
to allow rollback in the underlying DaemonSet or Deployment.
Expand Down Expand Up @@ -2471,6 +2572,15 @@ spec:
kibanaAssociationStatus:
description: AssociationStatus is the status of an association resource.
type: string
monitoringAssociationStatus:
additionalProperties:
description: AssociationStatus is the status of an association resource.
type: string
description: AssociationStatusMap is the map of association's namespaced
name string to its AssociationStatus. For resources that have a
single Association of a given type (for ex. single ES reference),
this map contains a single entry.
type: object
observedGeneration:
description: ObservedGeneration represents the .metadata.generation
that the status is based upon. It corresponds to the metadata generation,
Expand Down Expand Up @@ -3968,7 +4078,7 @@ spec:
properties:
logs:
description: Logs holds references to Elasticsearch clusters which
receive log data from this Elasticsearch cluster.
receive log data from an associated resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down Expand Up @@ -4015,7 +4125,7 @@ spec:
type: object
metrics:
description: Metrics holds references to Elasticsearch clusters
which receive monitoring data from this Elasticsearch cluster.
which receive monitoring data from this resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down Expand Up @@ -8031,7 +8141,7 @@ spec:
properties:
logs:
description: Logs holds references to Elasticsearch clusters which
will receive log data from this Kibana.
receive log data from an associated resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down Expand Up @@ -8078,7 +8188,7 @@ spec:
type: object
metrics:
description: Metrics holds references to Elasticsearch clusters
which will receive monitoring data from this Kibana.
which receive monitoring data from this resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down
110 changes: 110 additions & 0 deletions config/crds/v1/bases/beat.k8s.elastic.co_beats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15411,6 +15411,107 @@ spec:
is used.
type: string
type: object
monitoring:
description: Monitoring enables you to collect and ship logs and metrics
for this Beat. Metricbeat and/or Filebeat sidecars are configured
and send monitoring data to an Elasticsearch monitoring cluster
running in the same Kubernetes cluster.
properties:
logs:
description: Logs holds references to Elasticsearch clusters which
receive log data from an associated resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
monitoring Elasticsearch clusters running in the same Kubernetes
cluster. Due to existing limitations, only a single Elasticsearch
cluster is currently supported.
items:
description: ObjectSelector defines a reference to a Kubernetes
object which can be an Elastic resource managed by the
operator or a Secret describing an external Elastic resource
not managed by the operator.
properties:
name:
description: Name of an existing Kubernetes object corresponding
to an Elastic resource managed by ECK.
type: string
namespace:
description: Namespace of the Kubernetes object. If
empty, defaults to the current namespace.
type: string
secretName:
description: 'SecretName is the name of an existing
Kubernetes secret that contains connection information
for associating an Elastic resource not managed by
the operator. The referenced secret must contain the
following: - `url`: the URL to reach the Elastic resource
- `username`: the username of the user to be authenticated
to the Elastic resource - `password`: the password
of the user to be authenticated to the Elastic resource
- `ca.crt`: the CA certificate in PEM format (optional).
This field cannot be used in combination with the
other fields name, namespace or serviceName.'
type: string
serviceName:
description: ServiceName is the name of an existing
Kubernetes service which is used to make requests
to the referenced object. It has to be in the same
namespace as the referenced resource. If left empty,
the default HTTP service of the referenced resource
is used.
type: string
type: object
type: array
type: object
metrics:
description: Metrics holds references to Elasticsearch clusters
which receive monitoring data from this resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
monitoring Elasticsearch clusters running in the same Kubernetes
cluster. Due to existing limitations, only a single Elasticsearch
cluster is currently supported.
items:
description: ObjectSelector defines a reference to a Kubernetes
object which can be an Elastic resource managed by the
operator or a Secret describing an external Elastic resource
not managed by the operator.
properties:
name:
description: Name of an existing Kubernetes object corresponding
to an Elastic resource managed by ECK.
type: string
namespace:
description: Namespace of the Kubernetes object. If
empty, defaults to the current namespace.
type: string
secretName:
description: 'SecretName is the name of an existing
Kubernetes secret that contains connection information
for associating an Elastic resource not managed by
the operator. The referenced secret must contain the
following: - `url`: the URL to reach the Elastic resource
- `username`: the username of the user to be authenticated
to the Elastic resource - `password`: the password
of the user to be authenticated to the Elastic resource
- `ca.crt`: the CA certificate in PEM format (optional).
This field cannot be used in combination with the
other fields name, namespace or serviceName.'
type: string
serviceName:
description: ServiceName is the name of an existing
Kubernetes service which is used to make requests
to the referenced object. It has to be in the same
namespace as the referenced resource. If left empty,
the default HTTP service of the referenced resource
is used.
type: string
type: object
type: array
type: object
type: object
revisionHistoryLimit:
description: RevisionHistoryLimit is the number of revisions to retain
to allow rollback in the underlying DaemonSet or Deployment.
Expand Down Expand Up @@ -15492,6 +15593,15 @@ spec:
kibanaAssociationStatus:
description: AssociationStatus is the status of an association resource.
type: string
monitoringAssociationStatus:
additionalProperties:
description: AssociationStatus is the status of an association resource.
type: string
description: AssociationStatusMap is the map of association's namespaced
name string to its AssociationStatus. For resources that have a
single Association of a given type (for ex. single ES reference),
this map contains a single entry.
type: object
observedGeneration:
description: ObservedGeneration represents the .metadata.generation
that the status is based upon. It corresponds to the metadata generation,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ spec:
properties:
logs:
description: Logs holds references to Elasticsearch clusters which
receive log data from this Elasticsearch cluster.
receive log data from an associated resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down Expand Up @@ -568,7 +568,7 @@ spec:
type: object
metrics:
description: Metrics holds references to Elasticsearch clusters
which receive monitoring data from this Elasticsearch cluster.
which receive monitoring data from this resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down
4 changes: 2 additions & 2 deletions config/crds/v1/bases/kibana.k8s.elastic.co_kibanas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ spec:
properties:
logs:
description: Logs holds references to Elasticsearch clusters which
will receive log data from this Kibana.
receive log data from an associated resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down Expand Up @@ -609,7 +609,7 @@ spec:
type: object
metrics:
description: Metrics holds references to Elasticsearch clusters
which will receive monitoring data from this Kibana.
which receive monitoring data from this resource.
properties:
elasticsearchRefs:
description: ElasticsearchRefs is a reference to a list of
Expand Down
Loading

0 comments on commit f14c285

Please sign in to comment.