Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

[Spring Boot integration] Changing the jolokia default path to avoid 404 error#14475

Merged
ishleenk17 merged 5 commits intoelastic:mainfrom
insukcho:main
Jul 30, 2025
Merged

[Spring Boot integration] Changing the jolokia default path to avoid 404 error#14475
ishleenk17 merged 5 commits intoelastic:mainfrom
insukcho:main

Conversation

@insukcho
Copy link
Contributor

@insukchoinsukcho commentedJul 9, 2025
edited
Loading

Proposed commit message

The Jolokia in Spring Boot is enabled by Spring-boot-actuator as described in thereference, and the endpoint should have/actuator in front of the current default path. If we keep this default path, it will return 404 and the Elastic Agent's status will be changed to unhealthy with the error logs below:

{    "log.level": "error",    "@timestamp": "2025-04-23T20:19:38.012Z",    "message": "Error fetching data for metricset jolokia.jmx: HTTP error 404 in : 404 ",    "component": {        "binary": "metricbeat",        "dataset": "elastic_agent.metricbeat",        "id": "jolokia/metrics-default",        "type": "jolokia/metrics"    },    "log": {        "source": "jolokia/metrics-default"    },    "ecs.version": "1.6.0",    "log.origin": {        "file.line": 333,        "file.name": "module/wrapper.go",        "function": "github.com/elastic/beats/v7/metricbeat/mb/module.(*metricSetWrapper).handleFetchError"    },    "service.name": "metricbeat"}

To avoid the confusion, suggest to change the default path value with the valid one.

Additionally, the currenthosts description is making confusion:

"Host for Spring Boot metrics. (example:http://localhost:8090/actuator/jolokia)."

Suggest to fix the example with only host URL, and move the left to the path's description.

Checklist

  • I have reviewedtips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package'schangelog.yml file.
  • I have verified that Kibana version constraints are current according toguidelines.
  • I have verified that any added dashboard complies with Kibana'sDashboard good practices

How to test this PR locally

Reproduced and tested it with the version below:

  • openjdk 17.0.14, 21.0.6
  • Spring Boot 2.7.17
  • Elastic Spring Boot Integration 1.8.1
  • jolokia-core 1.7.2
full pom.xml config
<?xml version="1.0" encoding="UTF-8"?><projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.example</groupId><artifactId>myproject</artifactId><version>0.0.1-SNAPSHOT</version><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.17</version></parent><build>        <plugins>            <plugin>                <groupId>org.springframework.boot</groupId>                <artifactId>spring-boot-maven-plugin</artifactId>                <executions>                    <execution>                        <goals>                            <goal>repackage</goal>                        </goals>                    </execution>                </executions>            </plugin>        </plugins>    </build><!-- Additional lines to be added here...--><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency><dependency><groupId>org.springframework.security</groupId><artifactId>spring-security-test</artifactId><scope>test</scope></dependency><!-- Elastic Spring Boot Integration requirements--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>org.jolokia</groupId><artifactId>jolokia-core</artifactId></dependency></dependencies></project>

Screenshots

Current default value in UI
image

Suggested value in UI
image

Jolokia in Spring Boot is enabled by Spring-boot-actuator as described in the [reference](https://www.elastic.co/docs/reference/integrations/spring_boot#requirements), and the endpoint should have `/actuator` in front of the current default path. If we keep this default path, it will return 404 and the Elastic Agent's status will be changed to unhealthy. To avoid the confusion, suggest to change the default path value with the valid one
@insukchoinsukcho requested a review froma team as acode ownerJuly 9, 2025 19:53
@insukchoinsukcho added enhancementNew feature or request Integration:spring_bootSpring Boot labelsJul 9, 2025
@andrewkrohandrewkroh added the Team:Obs-InfraObsObservability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labelJul 9, 2025
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with/test benchmark fullreport

Improve the path and host descriptions to avoid the confusion
Copy link
Contributor

@mykola-elasticmykola-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hello@insukcho, please update theversion inmanifest.yml and add the correspondingenhancement entry in thechangelog.yml

insukcho reacted with thumbs up emoji
This version will included the fix changing the jolokia default path to avoid 404 error
Add the change from the [PR](elastic#14475)
@insukcho
Copy link
ContributorAuthor

@mykola-elastic Thanks for the comment. I changed the version and the change logs. Please check and feel free to modify content if you need to.

@elastic-sonarqube
Copy link

fixed the change typeCo-authored-by: Ishleen Kaur <102962586+ishleenk17@users.noreply.github.com>
@elasticmachine
Copy link

elasticmachine commentedJul 17, 2025
edited
Loading

💔 Build Failed

Failed CI Steps

History

@insukcho
Copy link
ContributorAuthor

💔 Build Failed

Failed CI Steps

History

Is it something I can fix myself?

ERROR: Error during SonarScanner executionERROR: Not authorized. Please check the user token in the property 'sonar.token' or the credentials in the properties 'sonar.login' and 'sonar.password'.

@ishleenk17ishleenk17 merged commitf947e55 intoelastic:mainJul 30, 2025
7 checks passed
@ishleenk17
Copy link
Member

@insukcho : Change looks good and has been merged

@elastic-vault-github-plugin-prod

Package spring_boot - 1.9.1 containing this change is available athttps://epr.elastic.co/package/spring_boot/1.9.1/

@andrewkrohandrewkroh added bugfixPull request that fixes a bug issue and removed enhancementNew feature or request labelsAug 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mykola-elasticmykola-elasticmykola-elastic left review comments

@ishleenk17ishleenk17ishleenk17 approved these changes

Assignees

No one assigned

Labels

bugfixPull request that fixes a bug issueIntegration:spring_bootSpring BootTeam:Obs-InfraObsObservability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@insukcho@elasticmachine@ishleenk17@mykola-elastic@andrewkroh

[8]ページ先頭

©2009-2026 Movatter.jp