To show an identifying field for an event in a report.
MnR 7.x
There are several steps involved in this process.
On the server where the event processing manager is running. You will need to install this with the same instance being used for your Smarts event processing
manage-modules install event-property-tagger <instance name>
In our example here, we are using the ElementName. We have a CSV file containing the ElementName and the value we want assigned to the field. There are different ways that this can be done, but typically customers either user regex or SQL pattern. Refer to the APG Event Property Tagger documentation for full details.
In this example we are going to use the SQL pattern as we want to match only on the network name of the device, and not the fully qualified domain name (FQDN).
Edit the processing.xml file located in APG/Event-Processing/Event-Processing-Manager/<instance name>/conf
<processing-element name="Smarts" config="Smarts-Listener/emc-smarts/conf/smarts-listener.xml" data="AC" />
</processing-manager>
<processing-element name="EPT" config="Event-Property-Tagger/emc-smarts/conf/event-property-tagging.xml" data="AC" />
<processing-element name="Smarts" config="Smarts-Listener/emc-smarts/conf/smarts-listener.xml" data="EPT" />
</processing-manager>
File is located in APG/Event-Processing/Event-Property-Tagger/<instance name>/conf
Set the file name used to read the tagging data:
<!-- Use a "text-file" tag for each input file -->
<text-file path="conf/test.csv" encoding="UTF-8">
<!-- List of the properties that make the key -->
<key-properties>
<!-- Use a "key-property" tag for each property to make the key. -->
<!-- string-type can be "string", "sqlpattern", "regex" or "range" -->
<!-- the order of the "key-property" must match the order of the columns in the input file -->
<key-property delete-after-use="false" string-type="sqlpattern">ElementName</key-property>
</key-properties>
<!-- List of the properties to add to the raw values -->
<new-properties>
<!-- Use a "new-property" tag for each new property to add to the raw values. -->
<new-property>agency</new-property>
</new-properties>
<field field="agency" data-type="STRING" xsi:type="DefaultFieldMapping" />
Username: root
Database: mysql
Password: watch4net
use events;
ALTER TABLE events_live ADD <field name> VARCHAR(<size>);
ALTER TABLE events_archive ADD <field name> VARCHAR(<size>);
<property name="com.watch4net.apg.v2.modules.database.GenericFlow.properties.StringValue">
<name class="string"><parameter name></name>
<table class="string">${table}</table>
<display-name class="string"><parameter name></display-name>
</property>
You will see the new column.