I accidentallly deleted some alarms a while back. As a result, the inventory fragment c8y_ActiveAlarmsStatus does not correctly reflect the real number of alarms. When I try to update it via the API, it has no effect - as if the fragment itself is protected. Curl looks like this
I think it’s an calculated fragment that is overwritten by some logic in the background.
The only way you can change the stats there is using Alarm API and clearing alarms. If you don’t have an alarm anymore try to create a new dummy alarm and clear it. Hopefully this triggers the recalcuation of the c8y_ActiveAlarmStatus fragment in the background and stats are correct afterwards.
Thanks Stefan,
On my test device I have cleared all alarms, but the inventory shows:
“c8y_ActiveAlarmsStatus”: {
“minor”: 3,
“critical”: 3,
“major”: 1,
“warning”: 0
},
If I use the API to set a dummy minor alarm, the new status looks like
I see, so unfortunately it seems only a delta is calculated but no full recalculation is done when clearing a alarm.
It sounds like a bug to me, that if alarms are deleted (before cleared) the activeAlarmsStatus is not re-calculated properly.
Would be able to report a product issue so support can further investigate?