|
From: Reynaldo B. <rb...@be...> - 2012-03-21 05:06:43
|
Thanks I will try that tomorrow. How do I know what version of translator I have? Sent from my iPhone On Mar 20, 2012, at 7:36 PM, "Greg.Chavez" <gre...@gm...> wrote: > On Mar 20, 2012, at 6:10 PM, Patrick Tuite <pt...@ai...> wrote: > >> Hi Greg >> >> Not 100% sure if this is the same problem you are expressing in your >> case. I had an issue with logmsg & Event Translator going from v.1.6 to >> v.1.8 >> http://issues.opennms.org/browse/NMS-4765 > > Well, I hope that's not also a problem (my version is 10.0.0). In my situation I've never gotten the Event Translator to accept my attempt to translate the logmsg field in the first place. What did your assignment config look like for logmsg? > > Thanks for responding. > >> Patrick >> >> On 20/03/2012 20:37, Greg Chavez wrote: >>> It seems that when the uei field of an event is translated, the cloned >>> event does not get re-interpreted by eventd. Am I stuck with that >>> behavior? Here's what I wanted to do: >>> >>> EVENT #1: >>> <!-- General Alarm Trap --> >>> <event> >>> <mask> >>> <maskelement> >>> <mename>id</mename> >>> <mevalue>.1.3.6.1.4.1.X.999</mevalue> >>> </maskelement> >>> <maskelement> >>> <mename>generic</mename> >>> <mevalue>6</mevalue> >>> </maskelement> >>> <maskelement> >>> <mename>specific</mename> >>> <mevalue>2</mevalue> >>> </maskelement> >>> </mask> >>> <uei>uei.opennms.org/ourApp/IDX/alarm</uei> >>> <event-label>Incoming Trap: IDX Alarm</event-label> >>> <descr>Incoming Trap: IDX Alarm from %parm[#1]%: %parm[all]%</descr> >>> <logmsg dest="donotpersist" notify="false"><p>Incoming Trap: >>> IDX Alarm</p></logmsg> >>> <severity>Indeterminate</severity> >>> </event> >>> >>> TRANSLATION: >>> >>> <!-- Alarm Translations --> >>> <event-translation-spec uei="uei.opennms.org/ourApp/IDX/alarm"> >>> <mappings> >>> <mapping> >>> <assignment type="field" name="nodeid"> >>> <value type="sql" result="SELECT nodeid from node where >>> nodelabel=?"> >>> <value type="parameter" name=".1.3.6.1.4.1.X.999.2.0.1" >>> matches=".*" result="${0}" /> >>> </value> >>> </assignment> >>> <assignment type="field" name="uei"> >>> <value type="parameter" name=".1.3.6.1.4.1.X.999.2.0.2" >>> matches=".*" result="uei.opennms.org/ourApp/IDX/${0}" /> >>> </assignment> >>> </mapping> >>> </mappings> >>> </event-translation-spec> >>> >>> EVENT #2: >>> <!-- Specific Alarm Events --> >>> <!-- oldindex --> >>> <event> >>> <uei>uei.opennms.org/ourApp/IDX/oldindex</uei> >>> <event-label>RexIDX: Old Index</event-label> >>> <descr>RexIDX Old Index</descr> >>> <logmsg dest="logndisplay"><p>RexIDX: Old Index</p></logmsg> >>> <severity>Critical</severity> >>> </event> >>> >>> [Note that I'm ignoring the alarm bits until I get the events working properly.] >>> >>> So the idea here is that for each of our application components (IDX >>> is just one of about a dozen): >>> >>> * One "General Alarm Trap" event and one "Alarm Translation" are >>> required per component. >>> * Each specific event requires an event definition, without the event mask. >>> * Each incoming trap identifies itself with varbind 1 == originating >>> node and varbind 2 == event name. >>> >>> The systems we are monitoring are not directly accessible so we're >>> relying on provisioning groups, passive services, and forwarded traps >>> for both availability and alarms (the PSK status translations work >>> great). >>> >>> The benefit here is that for each non-PSK alarm, translations rarely >>> need to be added, and new events require only a small amount of new >>> xml. If this can't work, that's fine, we'll adjust, but is it at >>> least possible to translate the logmsg field from dest=donotpersist to >>> dest=logndisplay? I don't want to see the original events, just the >>> translated ones. I've tried this several different ways, but the >>> result is always the same: >>> >>> 2012-03-20 19:43:04,408 WARN [OpenNMS.EventTranslator] >>> EventIpcManagerDefaultImpl: run: an unexpected error occured during >>> ListenerThread OpenNMS.EventTranslator run: >>> org.springframework.beans.ConversionNotSupportedException: Failed to >>> convert property value of type 'java.lang.String' to required type >>> 'org.opennms.netmgt.xml.event.Logmsg' for property 'logmsg'; nested >>> exception is java.lang.IllegalStateException: Cannot convert value of >>> type [java.lang.String] to required type >>> [org.opennms.netmgt.xml.event.Logmsg] for property 'logmsg': no >>> matching editors or conversion strategy found >>> >>> Here's my last attempt at configuring this field assignment: >>> >>> <assignment type="field" name="logmsg"> >>> <value type="constant" result="[content=Incoming Trap: IDX >>> Alarm,notify=true,dest=donotpersist]" /> >>> </assignment> >>> >>> >>> Is it possible to translate this field and if so, what is the correct >>> format? If that's not possible, I guess I'll have to create an >>> automation. Sigh. >>> >>> Thanks! >>> >> >> >> ------------------------------------------------------------------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-msazure >> _______________________________________________ >> Please read the OpenNMS Mailing List FAQ: >> http://www.opennms.org/index.php/Mailing_List_FAQ >> >> opennms-discuss mailing list >> >> To *unsubscribe* or change your subscription options, see the bottom of this page: >> https://lists.sourceforge.net/lists/listinfo/opennms-discuss > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Please read the OpenNMS Mailing List FAQ: > http://www.opennms.org/index.php/Mailing_List_FAQ > > opennms-discuss mailing list > > To *unsubscribe* or change your subscription options, see the bottom of this page: > https://lists.sourceforge.net/lists/listinfo/opennms-discuss |