To add OccurrenceCount to the events database.
search cancel

To add OccurrenceCount to the events database.

book

Article ID: 332790

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

To add OccurrenceCount to the events database in the Solution Pack for EMC Smarts Events

Environment

M&R -7.x

Resolution

  • By default, the OccurrenceCount field of a Smarts notification is not included in the M&R events database.
  • This article explains how the event processing can be configured so that this field is included in the database and can be accessed by the frontend.

    To include OccurrenceCount in event proccessing do the following:
    1. Add the new OccurrenceCount column to the events_live and events_archive tables:
    mysql>  ALTER TABLE events_live ADD `OccurrenceCount` bigint(20) DEFAULT NULL;
    mysql>  ALTER TABLE events_archive ADD `OccurrenceCount` bigint(20) DEFAULT NULL;
    1. Update the database writers to include this field. Add the following line to the database writer config files in the <mapping></mapping> section:
    <field field="OccurrenceCount" data-type="LONG" xsi:type="DefaultFieldMapping"/>
    • If MySQL is used, add it to the following two config files:
    /opt/APG/Event-Processing/Generic-Live-Writer/<instance>/conf/my-smarts-live.xml
    /opt/APG/Event-Processing/Generic-Live-Writer/<instance>/conf/my-smarts-archive.xml
    • If APG Datastore is used, add it to the following two config files:
    /opt/APG/Event-Processing/Generic-Live-Writer/<instance>/conf/ds-smarts-live.xml

    /opt/APG/Event-Processing/APG-Datastore-Writer/<instance>/conf/ds-smarts-archive.xml
      
    1. Update the frontend property mapping configuration so that this new property can be used in the frontend reports. To do this, add the following configuration to the FLOW-RPE2.xml file (/opt/APG/Custom/WebApps-Resources/<instance>/property-mapping/FLOW-RPE2.xml):

    <property name="com.watch4net.apg.v2.modules.database.GenericFlow.properties.StringValue">

                    <name class="string">OccurrenceCount</name>

                    <table class="string">${table}</table>

                    <display-name class="string">occurrenctCount</display-name>

            </property>
    1. Restart the Event Processing Manager and tomcat services:
    /opt/APG/bin/manage-modules.sh service restart event-processing-manager <instance>
    /opt/APG/bin/manage-modules.sh service restart tomcat <instance>