Reducing db load by pairing down logged events

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Reducing db load by pairing down logged events

Benito Gonzalez-2
Hi folks,

If you are seeing a lot of db load AND don't look at internal events, tuning down events to be logged can help. Note that the only way users see events info is in the 'Who's Online' portlet that is often removed in most services.

Here are two lists that can be added to your uPortal overridesContext.xml file in uPortal-start.

First list is if you want to ignore all events. This would be appropriate if you have no custom reporting from the events database. Very few institutions have this.

```
    <util:list id="listenerEventFilters">
        <bean class="org.apereo.portal.spring.context.ClassApplicationEventFilter">
            <property name="supportedEvents">
                <list></list>
            </property>
            <property name="ignoredEvents">
                <list>
                    <value>org.apereo.portal.events.PortalEvent</value>
                </list>
            </property>
        </bean>
    </util:list>
```

If, however, you want to at least capture login events, this snippet should do the trick:

```
    <util:list id="listenerEventFilters">
        <bean class="org.apereo.portal.spring.context.ClassApplicationEventFilter">
            <property name="supportedEvents">
                <list>
                    <value>org.apereo.portal.events.LoginEvent</value>
                    <value>org.apereo.portal.events.LogoutEvent</value>
                </list>
            </property>
            <property name="ignoredEvents">
                <list>
                    <value>org.apereo.portal.events.LayoutPortalEvent</value>
                    <value>org.apereo.portal.events.PortalRenderEvent</value>
                    <value>org.apereo.portal.events.PortletExecutionEvent</value>
                    <value>org.apereo.portal.events.PortletLayoutPortalEvent</value>
                    <value>org.apereo.portal.events.TenantEvent</value>
                </list>
            </property>
        </bean>
    </util:list>
```
Hope someone finds this useful!
--bjagg

--
Benito J. Gonzalez
Software Developer
Unicon, Inc.
Voice:  209.777.2754
 Text:  209.777.2754
GitHub:  bjagg
GitLab:  bjagg
BitBucket:  bjagg

--
You received this message because you are subscribed to the Google Groups "uPortal Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/uportal-user/CAJ_1GkQgV%3DCZYnpj4j4DBNvLgzbuqXprQqqGP5uawZyq_5x-Xw%40mail.gmail.com.