pinpoint-apm/pinpoint · warning · ResponseStatusException
There is not ruleId/userGroupId/applicationId/checkerName to
Error message
There is not ruleId/userGroupId/applicationId/checkerName to publish alarm rule
What it means
PUT /alarmRule validates the full Rule via Rule.isRuleInvalid before updating; if ruleId, userGroupId, applicationId/applicationName or checkerName are missing the update is rejected with HTTP 400. An update needs all identifying fields to locate and rewrite the rule.
Source
Thrown at web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AlarmController.java:97
alarmService.deleteRule(rule);
return SimpleResponse.ok();
}
@GetMapping(params = USER_GROUP_ID_PARAMS)
public List<Rule> getRulesByUserGroup(@ServiceParam ServiceName serviceName, @RequestParam(value = USER_GROUP_ID_PARAMS) @NotBlank String userGroupId) {
return alarmService.selectRuleByUserGroupId(userGroupId);
}
@GetMapping(params = APPLICATION_ID_PARAMS)
public List<Rule> getRulesByApplication(@ServiceParam ServiceName serviceName, @RequestParam(value = APPLICATION_ID_PARAMS) @NotBlank String applicationName) {
return alarmService.selectRuleByApplicationName(applicationName);
}
@PreAuthorize("@naverPermissionEvaluator.hasAlarmPermission(#serviceName.getName(), #rule.getApplicationName(), T(com.navercorp.pinpoint.web.security.PermissionChecker).PERMISSION_ALARM_EDIT_ALARM_ONLY_MANAGER)")
@PutMapping
public Response updateRule(@ServiceParam ServiceName serviceName, @RequestBody Rule rule) {
if (Rule.isRuleInvalid(rule)) {
throw new ResponseStatusException(
HttpStatus.BAD_REQUEST,
"There is not ruleId/userGroupId/applicationId/checkerName to publish alarm rule"
);
}
alarmService.updateRule(rule);
return SimpleResponse.ok();
}
@GetMapping(value = "/checker")
public List<String> getCheckerName(@ServiceParam ServiceName serviceName) {
return CheckerCategory.getNames();
}
}
View on GitHub (pinned to 744c3d3075)
Solutions
- Send the complete Rule object including ruleId, applicationName, checkerName and userGroupId on PUT
- GET the current rule first, modify only the desired field, then PUT the whole object
- Verify field names match the Rule class of your Pinpoint version
Example fix
// before
PUT /alarmRule {"ruleId":"1723","threshold":20}
// after
PUT /alarmRule {"ruleId":"1723","applicationName":"myApp","checkerName":"ERROR_RATE","userGroupId":"team1","threshold":20} Defensive patterns
Strategy: validation
Validate before calling
const ok = rule && rule.ruleId && rule.applicationName && rule.checkerName && rule.userGroupId; if (!ok) throw new Error('PUT /alarmRule needs ruleId, applicationName, checkerName, userGroupId'); Type guard
function isCompleteRule(r) { return ['ruleId','applicationName','checkerName','userGroupId'].every(k => typeof r?.[k] === 'string' && r[k].length > 0); } Try / catch
try { ... } catch (HttpClientErrorException e) { if (e.getStatusCode().value() == 400) { /* GET rule, merge fields, retry PUT */ } else { throw e; } } Prevention
- GET-then-PUT: fetch the whole rule, modify one field, PUT it all back
- Treat alarm rule updates as full-object updates, not patches
- Validate required fields before sending
When it happens
Trigger: PUT /alarmRule with a body missing ruleId, userGroupId, applicationName/applicationId or checkerName.
Common situations: Partial-update clients sending only the changed field (the API does not support partial updates); renamed fields between versions; fetching a rule, mutating it, and dropping required fields.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- there is not applicationId/checkerName/userGroupId/threashol
- there is not ruleId to delete alarm rule
- value
- customMetricName must consist of {GroupName}/{MetricName}/La
- negative tick
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/9cfb06caedaeeb54.
Report an issue: GitHub.