We’re experiencing a critical issue with our device onboarding process in SAP IoT 2.5. When devices attempt to register with duplicate device IDs, the registration fails as expected, but the configured alert rules are not triggering. We’ve set up alert rules in Thing Modeler specifically for registration failures, and the event-to-alert mapping appears correct in the configuration.
Here’s our alert rule configuration:
{
"eventType": "DeviceRegistrationFailed",
"condition": "error.code == 'DUPLICATE_ID'",
"severity": "HIGH"
}
The registration errors are logged in the system, but no alerts appear in the dashboard. We need these alerts for our onboarding compliance tracking. Has anyone encountered similar issues with device registration error handling in the alerting module?
Thanks for the suggestions. I checked and the alert rule is indeed assigned to a thing type, which might be the issue. How do I create system-level alert rules for registration events? I don’t see a clear option in Thing Modeler for changing the scope to SYSTEM level.
I’ve seen this before. Check if your alert rule is actually assigned to the correct thing type in Thing Modeler. The event-to-alert mapping needs to be activated at the thing type level, not just configured globally. Also verify that the eventType name matches exactly - it’s case-sensitive.
Also worth checking your event subscription configuration. Device registration errors might not be getting published to the alert engine at all if the event publisher isn’t properly configured. Look at your device-regis module settings - there should be an event publishing flag that needs to be enabled for registration failures. We had this disabled by default in our deployment and had to explicitly enable it for compliance monitoring.
Let me address all three aspects of your issue systematically.
Alert Rule Configuration: Your JSON structure looks correct, but it needs to be registered at the system level, not thing-type level. Device registration failures occur in the device-regis module before thing instantiation, so thing-type alerts won’t catch them.
Event-to-Alert Mapping: The key issue is the event subscription scope. Create a system-level alert rule using the Alert Rules Engine API:
POST /AlertRules
{
"scope": "SYSTEM",
"eventSource": "device-registry"
}
Device Registration Error Handling: Enable event publishing in your device-regis configuration:
iot.device.registry.events.enabled=true
iot.device.registry.events.publishFailures=true
iot.device.registry.alert.duplicateId=true
After applying these settings, restart the device-regis service. The registration failure events will now be published to the system event bus, and your alert rules will trigger correctly. You should also verify that the alert notification channels (email, dashboard, etc.) are properly configured in the Alert Rules Engine. For compliance tracking, I recommend setting up a dedicated alert category for registration failures and configuring retention policies to maintain the audit trail for at least 90 days.
Had a similar problem last month. The issue was that device registration errors occur before the thing is fully instantiated, so the alert rules attached to thing types don’t fire. You might need to set up system-level alerts instead of thing-type-specific ones. Check your alert configuration scope - is it set to ‘SYSTEM’ or ‘THING_TYPE’? For registration failures, SYSTEM scope is usually required.