I want to log following information when any changes are made to an OSGi Configuration
I created an EventListener to handle event topic org/apache/felix/webconsole/plugins/event/internal/converter/ConfigurationEventConverter/CM_UPDATED. But this is not working.
I also created a listener to implement ConfigurationListener to handle the changes. This is capturing the events but there are following issues
I also observed that lastModifiedBy property has a value as sling-jcr-install and not by the person who actually modified the configuration.
Is there any way to log these changes?
Really appreciate any help on this.
Thanks,
Ritesh
Solved! Go to Solution.
Views
Replies
Total Likes
I would like to question the reason for this requirement.
If I would need to guess, I could make up a story, where problems occured in PROD, which were not reproducible on any other environment. It caused huge pain until someone figured out that a change was made directly in the OSGI webconsole which was causing this problem. And now you want to ensure that you get at least immediately aware if someone is performing such a change.
The problem with your approach is, that no user information is ever sent along with that change information. If you tend to ignore this and rather want to focus on identification of that change, I would log all those changes, no matter if duplicate or not. In the end, these events should not happen at all, and must be handled manually anway.
Hi @rp5352629,
On checking org.apache.felix.webconsole.plugins.event bundle (Version 1.1.8 as available in AEM 6.5.0), could see event types - CM_UPDATED and CM_DELETED alone.
Could you please let know
Hi @Vijayalakshmi_S,
I updated OSGi configurations from /system/console/configMgr and observed lastModifiedBy as sling-jcr-install.
Regarding CM_LOCATION_CHANGED, I observed this event is triggered when I get configuration configurationAdmin. Also this event is not found at /system/console/events.
Configuration readConfig = configurationAdmin.getConfiguration(event.getPid());
If I comment this, I observed only CM_UPDATED or CM_DELETED events
Thanks,
Ritesh
Views
Replies
Total Likes
I would like to question the reason for this requirement.
If I would need to guess, I could make up a story, where problems occured in PROD, which were not reproducible on any other environment. It caused huge pain until someone figured out that a change was made directly in the OSGI webconsole which was causing this problem. And now you want to ensure that you get at least immediately aware if someone is performing such a change.
The problem with your approach is, that no user information is ever sent along with that change information. If you tend to ignore this and rather want to focus on identification of that change, I would log all those changes, no matter if duplicate or not. In the end, these events should not happen at all, and must be handled manually anway.
Views
Likes
Replies
Views
Likes
Replies