gavinage opened a new issue, #3764: URL: https://github.com/apache/hertzbeat/issues/3764
### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior 1.7.3 添加 auto监控 Prometheus 的http sd 提交后报错, 新增监控失败 Cannot invoke "String.trim()" because the return value of "org.apache.hertzbeat.common.entity.manager.Monitor.getHost()" is null <img width="578" height="86" alt="Image" src="https://github.com/user-attachments/assets/dc4c2ba0-b430-49ef-b183-f1968eff7ce2" /> 一下是 1.7.2 保存后的: <img width="369" height="293" alt="Image" src="https://github.com/user-attachments/assets/a660cb80-1d8f-42d7-8de0-c5c780ec0efb" /> ### Expected Behavior _No response_ ### Steps To Reproduce _No response_ ### Environment ```markdown HertzBeat version(v1.7.3): ``` ### Debug logs 2025-09-11 16:22:28.202 [http-nio-1157-exec-1] ERROR org.apache.hertzbeat.manager.support.GlobalExceptionHandler Line:252 - [monitor]-[unknown error happen]-Cannot invoke "String.trim()" because the return value of "org.apache.hertzbeat.common.entity.manager.Monitor.getHost()" is null java.lang.NullPointerException: Cannot invoke "String.trim()" because the return value of "org.apache.hertzbeat.common.entity.manager.Monitor.getHost()" is null at org.apache.hertzbeat.manager.service.impl.MonitorServiceImpl.validate(MonitorServiceImpl.java:273) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:380) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:727) at org.apache.hertzbeat.manager.service.impl.MonitorServiceImpl$$SpringCGLIB$$0.validate(<generated>) at org.apache.hertzbeat.manager.controller.MonitorController.addNewMonitor(MonitorController.java:58) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:257) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:190) ### Anything else? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org For additional commands, e-mail: notifications-h...@hertzbeat.apache.org
