pinpoint-apm/pinpoint · warning · ResponseStatusException

there is not applicationId/checkerName/userGroupId/threashol

Error message

there is not applicationId/checkerName/userGroupId/threashold to insert alarm rule

What it means

POST /alarmRule validates the submitted Rule body via Rule.isRuleInvalidForPost; if required fields (applicationId/applicationName, checkerName, and the rule content such as userGroupId/threshold) are missing, the API returns HTTP 400 with this message instead of creating the alarm rule.

Source

Thrown at web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/AlarmController.java:67

@RestController
@RequestMapping(value={"/api/alarmRule", "/api/application/alarmRule"})
@Validated
public class AlarmController {

    public final static String USER_GROUP_ID_PARAMS = "userGroupId";
    public final static String APPLICATION_ID_PARAMS = "applicationId";

    private final AlarmService alarmService;

    public AlarmController(AlarmService alarmService) {
        this.alarmService = Objects.requireNonNull(alarmService, "alarmService");
    }

    @PreAuthorize("@naverPermissionEvaluator.hasAlarmPermission(#serviceName.getName(), #rule.getApplicationName(), T(com.navercorp.pinpoint.web.security.PermissionChecker).PERMISSION_ALARM_EDIT_ALARM_ONLY_MANAGER)")
    @PostMapping
    public AlarmResponse insertRule(@ServiceParam ServiceName serviceName, @RequestBody Rule rule) {
        if (Rule.isRuleInvalidForPost(rule)) {
            throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "there is not applicationId/checkerName/userGroupId/threashold to insert alarm rule");
        }
        final String ruleId = alarmService.insertRule(rule);
        return new AlarmResponse(Result.SUCCESS, ruleId);
    }

    @PreAuthorize("@naverPermissionEvaluator.hasAlarmPermission(#serviceName.getName(), #rule.getApplicationName(), T(com.navercorp.pinpoint.web.security.PermissionChecker).PERMISSION_ALARM_EDIT_ALARM_ONLY_MANAGER)")
    @DeleteMapping
    public Response deleteRule(@ServiceParam ServiceName serviceName, @RequestBody Rule rule) {
        if (StringUtils.isEmpty(rule.getRuleId())) {
            throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "there is not ruleId to delete alarm rule");
        }
        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);

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Include applicationName, checkerName, userGroupId and threshold in the POST body
  2. Compare the payload against the Rule class fields for your Pinpoint version
  3. Send values as real strings/numbers, not empty strings or nulls

Example fix

// before
POST /alarmRule {"checkerName":"ERROR_RATE"}
// after
POST /alarmRule {"applicationName":"myApp","checkerName":"ERROR_RATE","userGroupId":"team1","threshold":10}
Defensive patterns

Strategy: validation

Validate before calling

function isValidRuleForPost(r) { return r && r.applicationName && r.checkerName && r.userGroupId != null && r.threshold != null; }

Type guard

function isNonEmpty(v) { return typeof v === 'string' ? v.trim().length > 0 : v != null; }

Try / catch

try { ... } catch (HttpClientErrorException e) { if (e.getStatusCode().value() == 400) { log.error("Invalid alarm rule payload", e); } else { throw e; } }

Prevention

When it happens

Trigger: POSTing an alarm rule JSON with a missing applicationName, checkerName, userGroupId, or threshold fields — Rule.isRuleInvalidForPost returns true.

Common situations: Automation scripts posting minimal rule payloads; field renames between Pinpoint versions (e.g. applicationId vs applicationName); empty strings instead of values in the JSON body.

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


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/16753ceb22476ee6. Report an issue: GitHub.