That's definitely a bug then. Can you open an issue for this on issues.opennms.org?
Ron
From: Norbert Steinhoff [mailto:***@herr-der-mails.de]
Sent: Thursday, July 13, 2017 9:09 AM
To: opennms-***@lists.sourceforge.net
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
checking with Ġ does not create an error but an invalid OID with negative values.
Same behavior on V19 (just to ensure its not only V20.
2017-07-11 19:20:01,821 INFO [Provisiond-TaskScheduler-Thread] o.o.n.p.s.DetectorRunner: Attemping to detect service G DATA Dateisystem Waechter on address 192.168.250.233 at location Default
2017-07-11 19:20:01,821 DEBUG [Provisiond-TaskScheduler-Thread] o.o.n.p.d.s.Win32ServiceDetector: setWin32ServiceName: setting service name to G DATA Dateisystem WÀchter
2017-07-11 19:20:01,821 DEBUG [Provisiond-TaskScheduler-Thread] o.o.n.p.d.s.Win32ServiceDetector: setWin32ServiceName: the OID for the Win32 service is .1.3.6.1.4.1.77.1.2.3.1.3.26.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.-61.-92.99.104.116.101.114
Best
Norbert Steinhoff
Am 10.07.2017 um 21:03 schrieb Roskens, Ronald <***@biworldwide.com<mailto:***@biworldwide.com>>:
That's weird. Sounds like a bug since it doesn't allow that string.
Can you try the Unicode value instead? ä
From: Norbert Steinhoff [mailto:***@herr-der-mails.de]
Sent: Monday, July 10, 2017 9:55 AM
To: General OpenNMS Discussion
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
using your suggestion with "ä" in detector
<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem Wächter"/>
</detector>
i run into this:
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
- with linked exception:
Full Log:
An error occurred while attempting to start the "OpenNMS:Name=Provisiond" service (class org.opennms.netmgt.daemon.SimpleSpringContextJmxServiceDaemon). Shutting down and exiting.
javax.management.RuntimeMBeanException: org.springframework.dao.DataAccessResourceFailureException: Failed reloading data for object 'null' from file '/usr/share/opennms/etc/foreign-sources/test.xml'. Unexpected Throwable received while issuing reload.; nested exception is org.opennms.core.xml.MarshallingResourceFailureException: Failed to marshal/unmarshal XML file while unmarshalling an object (ForeignSource): javax.xml.bind.UnmarshalException
- with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
- with linked exception:
[Exception [EclipseLink-25004] (Eclipse Persistence Services - 2.5.1.v20130918-f2b9fc5): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.opennms.netmgt.vmmgr.Invoker.invoke(Invoker.java:277)
at org.opennms.netmgt.vmmgr.Invoker.invokeMethods(Invoker.java:206)
at org.opennms.netmgt.vmmgr.Starter.start(Starter.java:154)
at org.opennms.netmgt.vmmgr.Starter.startDaemon(Starter.java:94)
at org.opennms.netmgt.vmmgr.Controller.start(Controller.java:173)
at org.opennms.netmgt.vmmgr.Controller.main(Controller.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:525)
at java.lang.Thread.run(Thread.java:748)
Best
Norbert Steinhoff
Am 05.07.2017 um 23:29 schrieb Roskens, Ronald <***@biworldwide.com<mailto:***@biworldwide.com>>:
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemwächter"/>
<parameter key="service-name" value="Planificateur de tâche"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
There is a unit test for the Win32ServiceDetector. If we had the SNMP output from a non-English system we could enhance that unit test to ensure it works for other languages. Here's what we test against:
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties
Ron
From: Norbert Steinhoff [mailto:***@herr-der-mails.de]
Sent: Wednesday, July 05, 2017 1:49 PM
To: General OpenNMS Discussion
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
I suggest this does not work.
Service Name = G Data DateisystemwÀchter
The À is the problem.
In the Doku you find a sample in French:
Non-English Windows The service-name is sometime encoded in languages other than English. Like in French, the Task Scheduler service is Planificateur de tâche. Because of the "â" (non-English character), the OID value is encoded in hexa (0x50 6C 61 6E 69 66 69 63 61 74 65<tel:69%2066%2069%2063%2061%2074%2065> 75 72 20 64 65 20 74<tel:75%2072%2020%2064%2065%2020%2074> C3 A2 63 68 65 73<tel:63%2068%2065%2073>).
Best
Norbert
Am 05.07.2017 um 15:33 schrieb Roskens, Ronald <***@biworldwide.com<mailto:***@biworldwide.com>>:
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
Example:
<service name="MSExchangeTransport" interval="3000000"
user-defined="false" status="on">
<parameter key="service-name" value="MSExchangeTransport" />
</service>
Ron
________________________________
This e-mail message is being sent solely for use by the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by phone or reply by e-mail, delete the original message and destroy all copies. Thank you.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org<http://slashdot.org/>! http://sdm.link/slashdot
_______________________________________________
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
Viele GrÃŒsse
Norbert Steinhoff
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org<http://slashdot.org/>! http://sdm.link/slashdot_______________________________________________
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
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org<http://Slashdot.org>! http://sdm.link/slashdot_______________________________________________
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