Reducing db load by pairing down logged events

4 views
Skip to first unread message

Benito Gonzalez

unread,
Oct 20, 2020, 1:11:44 PM10/20/20
to uPortal Community
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

Andrey Postoyanets

unread,
Oct 20, 2020, 1:15:33 PM10/20/20
to uPortal Community
Hi Benito, 

thank you very much for this information!


With best regards,

Andrey Postoyanets 
CUNY / Brooklyn College

From: uporta...@apereo.org [uporta...@apereo.org] on behalf of Benito Gonzalez [bgon...@unicon.net]
Sent: Tuesday, October 20, 2020 1:11 PM
To: uPortal Community
Subject: [uportal-user] Reducing db load by pairing down logged events

CAUTION: This email is from outside BC, so examine it closely before opening attachments or clicking on links

--
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 uportal-user...@apereo.org.
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.
Reply all
Reply to author
Forward
0 new messages