apm-server
by 4ops
Helm chartv0.1.2App 7.17.6Verified publisher
The APM Server receives data from Elastic APM agents and transforms it into Elasticsearch documents
About this chart
apm-server
The APM Server receives data from Elastic APM agents and transforms it into Elasticsearch documents
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add kube-ops https://charts.kube-ops.io
$ helm repo update
$ helm upgrade my-release kube-ops/apm-server --install --namespace my-namespace --create-namespace --wait
Uninstalling the Chart
To uninstall the chart:
$ helm uninstall my-release --namespace my-namespace
Updating CRDs
$ kubectl apply -k https://gitlab.com/kube-ops/helm/apps/traefik
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | Affinity for pod assignment ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity |
| agentConfigCacheExpiration | string | "30s" | When using APM agent configuration, information fetched from Kibana will be cached in memory for some time. Specify cache key expiration via this setting. Default is 30 seconds. |
| autoscaling.enabled | bool | false | Specifies the horizontal pod autoscaling is enabled. Only used if deploymentType == Deployment. |
| autoscaling.maxReplicas | int | 100 | |
| autoscaling.minReplicas | int | 1 | |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | |
| capturePersonalData | bool | true | If true, APM Server captures the IP of the instrumented service or the IP and User Agent of the real user (RUM requests). |
| configFilename | string | "/etc/apm-server/config.yml" | |
| configOverride | string | "" | - Config file and paths |
| console | object | {"json":{"escapeHtml":false,"pretty":false}} | - Output: Console |
| console.json | object | {"escapeHtml":false,"pretty":false} | Configure JSON encoding. |
| console.json.escapeHtml | bool | false | Configure escaping HTML symbols in strings. |
| console.json.pretty | bool | false | Pretty-print JSON event. |
| containerPort | int | 8200 | |
| dataDir.emptyDir | object | {} | |
| dataDir.mountPath | string | "/usr/share/apm-server/data" | |
| defaultServiceEnvironment | string | "" | If specified, APM Server will record this value in events which have no service environment defined, and add it to agent configuration queries to Kibana when none is specified in the request from the agent. |
| deploymentType | string | "Deployment" | Type of the application controller. Possible values: Deployment, DaemonSet |
| dnsConfig | object | {} | |
| dnsPolicy | string | "" | Pod-specific DNS policy. If hostNetwork is set to true, use ClusterFirstWithHostNet dnsPolicy value. |
| elasticsearch | object | {"backoffInit":"1s","backoffMax":"60s","bulkMaxSize":50,"compressionLevel":0,"headers":{},"hosts":["elasticsearch:9200"],"index":"apm-%{[observer.version]}-%{+yyyy.MM.dd}","indices":[],"maxRetries":3,"path":"","pipeline":"","proxyUrl":"","timeout":90,"worker":1} | - Output: ElasticSearch |
| elasticsearch.backoffInit | string | "1s" | The number of seconds to wait before trying to reconnect to Elasticsearch after a network error. After waiting backoff.init seconds, apm-server tries to reconnect. If the attempt fails, the backoff timer is increased exponentially up to backoff.max. After a successful connection, the backoff timer is reset. The default is 1s. |
| elasticsearch.backoffMax | string | "60s" | The maximum number of seconds to wait before attempting to connect to Elasticsearch after a network error. The default is 60s. |
| elasticsearch.bulkMaxSize | int | 50 | The maximum number of events to bulk in a single Elasticsearch bulk API index request. The default is 50. |
| elasticsearch.compressionLevel | int | 0 | Set gzip compression level. |
| elasticsearch.headers | object | {} | Custom HTTP headers to add to each request. |
| elasticsearch.hosts | list | ["elasticsearch:9200"] | Array of hosts to connect to. Scheme and port can be left out and will be set to the default (http and 9200). In case you specify and additional path, the scheme is required: http://localhost:9200/path. IPv6 addresses should always be defined as: https://[2001:db8::1]:9200. |
| elasticsearch.index | string | "apm-%{[observer.version]}-%{+yyyy.MM.dd}" | By using the configuration below, APM documents are stored to separate indices, depending on their processor.event: - error - transaction - span - sourcemap The indices are all prefixed with apm-%{[observer.version]}. To allow managing indices based on their age, all indices (except for sourcemaps) end with the information of the day they got indexed. e.g. "apm-7.3.0-transaction-2019.07.20" Be aware that you can only specify one Elasticsearch template. If you modify the index patterns you must also update these configurations accordingly, as they need to be aligned: * setupTemplate.name * setupTemplate.pattern |
| elasticsearch.maxRetries | int | 3 | The number of times a particular Elasticsearch index operation is attempted. If the indexing operation doesn't succeed after this many retries, the events are dropped. The default is 3. |
| elasticsearch.path | string | "" | Optional HTTP Path. |
| elasticsearch.pipeline | string | "" | A pipeline is a definition of processors applied to documents when ingesting them to Elasticsearch. APM Server comes with a default pipeline definition, located at ingest/pipeline/definition.json, which is loaded to Elasticsearch by default (see apm-server.register.ingest.pipeline). APM pipeline is enabled by default. To disable it, set pipeline: _none. |
| elasticsearch.proxyUrl | string | "" | Proxy server url. |
| elasticsearch.timeout | int | 90 | Configure http request timeout before failing an request to Elasticsearch. |
| elasticsearch.worker | int | 1 | Number of workers per Elasticsearch host. |
| existingConfigMapName | string | "" | |
| extraEnvVars | list | [] | Additional environment variables |
| extraVolumeMounts | list | [] | Additional mounts for application |
| extraVolumes | list | [] | Additional volumes for application |
| fullnameOverride | string | "" | Overrides the full name |
| global | object | {"imagePullPolicy":"IfNotPresent","imagePullSecrets":[]} | - Global |
| global.imagePullPolicy | string | "IfNotPresent" | Image download policy ref: https://kubernetes.io/docs/concepts/containers/images/#updating-images |
| global.imagePullSecrets | list | [] | List of the Docker registry credentials ref: https://kubernetes.io/docs/concepts/containers/images/#updating-images |
| hostAliases | list | [] | Adding entries to Pod /etc/hosts with HostAliases |
| hostNetwork | bool | false | Specifies whether a container ports should be exposed to host. |
| httpPort | int | 0 | |
| idleTimeout | string | "45s" | Maximum amount of time to wait for the next incoming request before underlying connection is closed. |
| image | object | {"repository":"docker.io/elastic/apm-server","tag":""} | - Pod and container configuration |
| image.repository | string | "docker.io/elastic/apm-server" | Overrides the image repository |
| image.tag | string | "" | Overrides the image tag whose default is the chart appVersion. |
| indexLifecycleManagement.enabled | string | "auto" | Supported values are auto, true and false. true: Make use of Elasticsearch's Index Lifecycle Management (ILM) for APM indices. If no Elasticsearch output is configured or the configured instance does not support ILM, APM Server cannot apply ILM and must create unmanaged indices instead. false: APM Server does not make use of ILM in Elasticsearch. auto: If an Elasticsearch output is configured with default index and indices settings, and the configured Elasticsearch instance supports ILM, auto will resolve to true. Otherwise auto will resolve to false. Default value is auto. |
| indexLifecycleManagement.setup.enabled | bool | true | Only disable setup if you want to set up everything related to ILM on your own. When setup is enabled, the APM Server creates: - aliases and ILM policies if apm-server.ilm.enabled resolves to true. - An ILM specific template per event type. This is required to map ILM aliases and policies to indices. In case ILM is disabled, the templates will be created without any ILM settings. Be aware that if you turn off setup, you need to manually manage event type specific templates on your own. If you simply want to disable ILM, use the above setting, apm-server.ilm.enabled, instead. |
| indexLifecycleManagement.setup.mapping | list | [] | Customized mappings will be merged with the default setup, so you only need to configure mappings for the event types, policies, and index suffixes that you want to customize. Indices are named in this way: apm-%{[observer.version]}-%{[event.type]}-{index_suffix}, e.g., apm-7.9.0-span-custom*. The index_suffix is optional. NOTE: When configuring an index_suffix, ensure that no previously set up templates conflict with the newly configured ones. If an index matches multiple templates with the same order, the settings of the templates will override each other. Any conflicts need to be cleaned up manually. NOTE: When customizing setup.template.name and setup.template.pattern, ensure they still match the indices. |
| indexLifecycleManagement.setup.overwrite | bool | false | Configure whether or not existing policies and ILM related templates should be updated. This needs to be set to true when customizing your policies. |
| indexLifecycleManagement.setup.policies | list | [] | |
| indexLifecycleManagement.setup.requirePolicy | bool | true | Set to false when policies are set up outside of APM Server but referenced here. |
| initContainers | list | [] | Specifies init containers |
| jaeger | object | {"grpc":{"authTag":"","enabled":false,"host":"0.0.0.0:14250"},"http":{"enabled":false,"host":"0.0.0.0:14268"}} | When enabling Jaeger integration, APM Server acts as Jaeger collector. It supports jaeger.thrift over HTTP and gRPC. This is an experimental feature, use with care. WARNING: This configuration is deprecated, and will be removed in the 8.0 release. Jaeger gRPC is now served on the same port as Elastic APM agents, defined by the "apm-server.host" configuration; it is implicitly enabled, and an agent tag called "elastic-apm-auth" is required when auth is enabled. |
| jaeger.grpc.authTag | string | "" | The tag value should have the same format as an HTTP Authorization header, i.e. "Bearer <secret_token>" or |
| jaeger.grpc.enabled | bool | false | Set to true to enable the Jaeger gRPC collector service. |
| jaeger.grpc.host | string | "0.0.0.0:14250" | Defines the gRPC host and port the server is listening on. Defaults to the standard Jaeger gRPC collector port 14250. |
| jaeger.http.enabled | bool | false | Set to true to enable the Jaeger HTTP collector endpoint. |
| jaeger.http.host | string | "0.0.0.0:14268" | Defines the HTTP host and port the server is listening on. Defaults to the standard Jaeger HTTP collector port 14268. |
| kibana.enabled | bool | false | For APM Agent configuration in Kibana, enabled must be true. |
| kibana.host | string | "localhost:5601" | Scheme and port can be left out and will be set to the default (http and 5601). In case you specify an additional path, the scheme is required: http://localhost:5601/path. IPv6 addresses should always be defined as: https://[2001:db8::1]:5601. |
| livenessProbe | object | {} | |
| logJson | bool | true | |
| logLevel | string | "info" | Sets the minimum log level. The default log level is info. Available log levels are: error, warning, info, or debug. |
| logsDir.emptyDir | object | {} | |
| logsDir.mountPath | string | "/usr/share/apm-server/logs" | |
| logstash | object | {"backoffInit":"1s","backoffMax":"60s","compressionLevel":3,"escapeHtml":true,"hosts":["localhost:5044"],"index":"","loadbalance":false,"pipelining":2,"proxyUrl":"","proxyUseLocalResolver":false,"slowStart":false,"ttl":"30s","worker":1} | - Output: Logstash |
| logstash.backoffInit | string | "1s" | The number of seconds to wait before trying to reconnect to Logstash after a network error. After waiting backoffInit seconds, apm-server tries to reconnect. If the attempt fails, the backoff timer is increased exponentially up to backoffMax. After a successful connection, the backoff timer is reset. |
| logstash.backoffMax | string | "60s" | The maximum number of seconds to wait before attempting to connect to Logstash after a network error. |
| logstash.compressionLevel | int | 3 | Set gzip compression level. |
| logstash.escapeHtml | bool | true | Configure escaping html symbols in strings. |
| logstash.index | string | "" | Optional index name. |
| logstash.loadbalance | bool | false | Optional load balance the events between the Logstash hosts. Default is false. |
| logstash.pipelining | int | 2 | Number of batches to be sent asynchronously to Logstash while processing new batches. |
| logstash.proxyUrl | string | "" | SOCKS5 proxy server URL |
| logstash.proxyUseLocalResolver | bool | false | Resolve names locally when using a proxy server. |
| logstash.slowStart | bool | false | If enabled only a subset of events in a batch of events is transferred per group. The number of events to be sent increases up to bulkMaxSize if no error is encou |
Deploy apm-server with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has apm-server on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartapm-server is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply