Skip to content

Conversation

@rubvs
Copy link
Contributor

@rubvs rubvs commented Nov 15, 2025

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

Context

Test 1: Index Mappings

Test the mappings defined in monitoring-beats.json

1. Build Docker Image

> cd $HOME/src/elasticsearch

# Build the ES image with the added metric mappings.
> ./gradlew buildAarch64DockerImage

2. Update APM Server Docker Compose

Edit apm-server/docker-compose.yml and change the ES image.

> cd $HOME/src/apm-server
elasticsearch:
 image: docker.elastic.co/elasticsearch/elasticsearch:9.3.0-custom-SNAPSHOT
 # ... rest of config

3. Spin Up Stack

> cd $HOME/src/apm-server

# Spin up the stack
> docker-compose up

4. Test Mappings

  • Check that connection to ES is properly setup
> curl -u admin:changeme http://localhost:9200

{
  "name" : "834c14dc8da6",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "eT_LqP39R9icHdV5mmiMyg",
  "version" : {
    "number" : "9.3.0-SNAPSHOT",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "47bb1a66844e9c601a68569b102b803512203697",
    "build_date" : "2025-11-14T15:37:45.019895Z",
    "build_snapshot" : true,
    "lucene_version" : "10.3.1",
    "minimum_wire_compatibility_version" : "8.19.0",
    "minimum_index_compatibility_version" : "8.0.0"
  },
  "tagline" : "You Know, for Search"
}
  • Go the the Kibana UI via http://127.0.0.1:5601 and check the mappings in Dev Tools
# List the index
GET _cat/indices/.monitoring-beats-7-*?h=index

 .monitoring-beats-7-2025.11.14
# View index content
GET .monitoring-beats-7-2025.11.14/_mapping?filter_path=**.storage

{
  ".monitoring-beats-7-2025.11.14": {
    "mappings": {
      "properties": {
        "beats_stats": {
          "properties": {
            "metrics": {
              "properties": {
                "apm-server": {
                  "properties": {
                    "sampling": {
                      "properties": {
                        "tail": {
                          "properties": {
                            "storage": {
                              "properties": {
                                "disk_total": {
                                  "type": "long"
                                },
                                "disk_usage_threshold": {
                                  "type": "long"
                                },
                                "disk_used": {
                                  "type": "long"
                                },
                                "lsm_size": {
                                  "type": "long"
                                },
                                "storage_limit": {
                                  "type": "long"
                                },
                                "value_log_size": {
                                  "type": "long"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants