Discussion:
[opennms-discuss] Problem setting up Win32ServiceMonitor
Norbert Steinhoff
2017-06-23 12:39:09 UTC
Permalink
Hi all,

i try do monitor a windows service which has an german „umlaut“ in his screenname and can't get the detector to catch it.
Servicename in German: G DATA Dateisystem WÀchter

I figured the Hex-STRING out using snmp, but there is a new line in the output auf the snmpwalk:

snmpwalk -c XXXXX -v 2c 192.168.250.220 .1.3.6.1.4.1.77.1.2.3.1.1 | grep -A1 "Hex-STRING: 47 20 44"

iso.3.6.1.4.1.77.1.2.3.1.1.27.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.195.164.99.104.116.101.114 = Hex-STRING: 47 20 44 41 54 41 20 44 61 74 65 69 73 79 73 74
65 6D 20 57 C3 A4 63 68 74 65 72

snmpget -c XXXXX -v 2c 192.168.250.220 1.3.6.1.4.1.77.1.2.3.1.3.27.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.195.164.99.104.116.101.114

iso.3.6.1.4.1.77.1.2.3.1.3.27.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.195.164.99.104.116.101.114 = INTEGER: 1



My detector looks like this:

<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="47 20 44 61 74 61 20 44 61 74 65 69 73 79 73 74 65 6D 20 57 C3 A4 63 68 74 65 72"/>
</detector>

poller-configuration like this: (some values take from wiki)


<service name="G DATA Dateisystem Waechter" interval="300000" user-defined="false" status="on">
<parameter key="retry" value="6"/>
<parameter key="timeout" value="4950"/>
<parameter key="port" value="161"/>
<parameter key="service-name" value="47 20 44 61 74 61 20 44 61 74 65 69 73 79 73 74 65 6D 20 57 C3 A4 63 68 74 65 72"/>
</service>

<monitor service="G DATA Dateisystem Waechter" class-name="org.opennms.netmgt.poller.monitors.Win32ServiceMonitor"/>

Any help appreciated .

OpenNMS Version 20.0.0
Java Version: 1.8.0_131 Oracle Corporation
Java Virtual Machine: 25.131-b11 Oracle Corporation
Operating System: (Ubuntu LTS 16.04) Linux 4.4.0-81-generic (amd64)
Servlet Container: jetty/9.4.0.v20161208 (Servlet Spec 3.1)


Rgds
Norbert
Norbert Steinhoff
2017-07-01 08:45:13 UTC
Permalink
Hi.

Any ideas ?

Best
Norbert


-------------

Hi all,

i try do monitor a windows service which has an german „umlaut“ in his screenname and can't get the detector to catch it.
Servicename in German: G DATA Dateisystem WÀchter

I figured the Hex-STRING out using snmp, but there is a new line in the output auf the snmpwalk:

snmpwalk -c XXXXX -v 2c 192.168.250.220 .1.3.6.1.4.1.77.1.2.3.1.1 | grep -A1 "Hex-STRING: 47 20 44"

iso.3.6.1.4.1.77.1.2.3.1.1.27.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.195.164.99.104.116.101.114 = Hex-STRING: 47 20 44 41 54 41 20 44 61 74 65 69 73 79 73 74
65 6D 20 57 C3 A4 63 68 74 65 72

snmpget -c XXXXX -v 2c 192.168.250.220 1.3.6.1.4.1.77.1.2.3.1.3.27.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.195.164.99.104.116.101.114

iso.3.6.1.4.1.77.1.2.3.1.3.27.71.32.68.65.84.65.32.68.97.116.101.105.115.121.115.116.101.109.32.87.195.164.99.104.116.101.114 = INTEGER: 1



My detector looks like this:

<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="47 20 44 61 74 61 20 44 61 74 65 69 73 79 73 74 65 6D 20 57 C3 A4 63 68 74 65 72"/>
</detector>

poller-configuration like this: (some values take from wiki)


<service name="G DATA Dateisystem Waechter" interval="300000" user-defined="false" status="on">
<parameter key="retry" value="6"/>
<parameter key="timeout" value="4950"/>
<parameter key="port" value="161"/>
<parameter key="service-name" value="47 20 44 61 74 61 20 44 61 74 65 69 73 79 73 74 65 6D 20 57 C3 A4 63 68 74 65 72"/>
</service>

<monitor service="G DATA Dateisystem Waechter" class-name="org.opennms.netmgt.poller.monitors.Win32ServiceMonitor"/>

Any help appreciated .

OpenNMS Version 20.0.0
Java Version: 1.8.0_131 Oracle Corporation
Java Virtual Machine: 25.131-b11 Oracle Corporation
Operating System: (Ubuntu LTS 16.04) Linux 4.4.0-81-generic (amd64)
Servlet Container: jetty/9.4.0.v20161208 (Servlet Spec 3.1)


Rgds
Norbert
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, 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
Roskens, Ronald
2017-07-05 13:33:44 UTC
Permalink
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.
Norbert Steinhoff
2017-07-05 18:48:44 UTC
Permalink
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 75 72 20 64 65 20 74 C3 A2 63 68 65 73).


Best
Norbert

Am 05.07.2017 um 15:33 schrieb Roskens, Ronald <***@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://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
Roskens, Ronald
2017-07-05 21:29:45 UTC
Permalink
Since those characters are not valid in XML, you need to use their predefined entity.

<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>

<parameter key="service-name" value="Planificateur de t&acirc;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
Norbert Steinhoff
2017-07-10 14:55:09 UTC
Permalink
Hi Ron,

using your suggestion with "&auml;" in detector

<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;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
Post by Roskens, Ronald
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>
<parameter key="service-name" value="Planificateur de t&acirc;che"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references <https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references>
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties <https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties>
Ron
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.
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
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
<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 <http://sdm.link/slashdot>
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <https://lists.sourceforge.net/lists/listinfo/opennms-discuss>
Roskens, Ronald
2017-07-10 19:03:13 UTC
Permalink
That's weird. Sounds like a bug since it doesn't allow that string.

Can you try the Unicode value instead? &#228;

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 "&auml;" in detector

<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;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&auml;chter"/>

<parameter key="service-name" value="Planificateur de t&acirc;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
Norbert Steinhoff
2017-07-11 19:52:55 UTC
Permalink
Hi all,

i just tried an update from 20 to 20.1
Opennms is not starting after that and throws enlinkd errors in the output.log

See:





enlinkd-configuration.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<enlinkd-configuration threads="5"
initial_sleep_time="60000"
rescan_interval="86400000"
use-cdp-discovery="true"
use-bridge-discovery="false"
use-lldp-discovery="false"
use-ospf-discovery="false"
use-isis-discovery="false"
/>


Any ideas ?

Best

Norbert Steinhoff
Norbert Steinhoff
2017-07-11 19:58:15 UTC
Permalink
Ups, allready reported. Forget my mail :)
Seen to late.

Best
Norbert Steinhoff
Post by Norbert Steinhoff
Hi all,
i just tried an update from 20 to 20.1
Opennms is not starting after that and throws enlinkd errors in the output.log
<enlinkd.log.gz>
<output.log.gz>
enlinkd-configuration.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<enlinkd-configuration threads="5"
initial_sleep_time="60000"
rescan_interval="86400000"
use-cdp-discovery="true"
use-bridge-discovery="false"
use-lldp-discovery="false"
use-ospf-discovery="false"
use-isis-discovery="false"
/>
Any ideas ?
Best
Norbert Steinhoff
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Norbert Steinhoff
2017-07-13 14:09:11 UTC
Permalink
Hi Ron,

checking with &#288; 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
Post by Roskens, Ronald
That's weird. Sounds like a bug since it doesn't allow that string.
Can you try the Unicode value instead? &#228;
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 "&auml;" in detector
<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;chter"/>
</detector>
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
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
[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
[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
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>
<parameter key="service-name" value="Planificateur de t&acirc;che"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties
Ron
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.
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 75 72 20 64 65 20 74 C3 A2 63 68 65 73).
Best
Norbert
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
<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://sdm.link/slashdot
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Roskens, Ronald
2017-07-14 17:48:59 UTC
Permalink
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 &#288; 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? &#228;

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 "&auml;" in detector

<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;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&auml;chter"/>

<parameter key="service-name" value="Planificateur de t&acirc;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
Ronald Roskens
2017-07-18 13:57:03 UTC
Permalink
I’ve created a bug to track this: https://issues.opennms.org/browse/NMS-9515 <https://issues.opennms.org/browse/NMS-9515>

I’ve put together a pull request which changes how WIn32ServiceDetector does the conversion of the string to OID.

What would help is if we had a SNMP walk of a non-english Windows server, then we could create better unit tests to ensure it will work.

You can run the /opt/opennms/contrib/snmpwalk-debug.sh to generate the output. You should also include OIDs under .1.3.6.1.4.1.77, .1.3.6.1.4.1.311, and .1.3.6.1.4.1.9600.

# /opt/opennms/contrib/snmpwalk-debug.sh $host $community .1.3.6.1.4.1.77 .1.3.6.1.4.1.311 .1.3.6.1.4.1.9600 > nms-9515
# /opt/opennms/contrib/snmpwalk-scrub.pl nms-9515

Then attach nms-9515.anonymized.txt to the issue.

Ron
Post by Roskens, Ronald
That's definitely a bug then. Can you open an issue for this on issues.opennms.org?
Ron
Sent: Thursday, July 13, 2017 9:09 AM
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
checking with &#288; 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
That's weird. Sounds like a bug since it doesn't allow that string.
Can you try the Unicode value instead? &#228;
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 "&auml;" in detector
<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;chter"/>
</detector>
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
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
[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
[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
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>
<parameter key="service-name" value="Planificateur de t&acirc;che"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references <https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references>
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties <https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties>
Ron
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.
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
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
<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 <http://sdm.link/slashdot>
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Norbert Steinhoff
2017-07-18 15:39:51 UTC
Permalink
Hi Ron,

can you provide the snmpwalk-debug.sh script please.
I have contrib version installed right now.


Best
Norbert

Am 18.07.2017 um 15:57 schrieb Ronald Roskens <***@elfin.net>:

I’ve created a bug to track this: https://issues.opennms.org/browse/NMS-9515

I’ve put together a pull request which changes how WIn32ServiceDetector does the conversion of the string to OID.

What would help is if we had a SNMP walk of a non-english Windows server, then we could create better unit tests to ensure it will work.

You can run the /opt/opennms/contrib/snmpwalk-debug.sh to generate the output. You should also include OIDs under .1.3.6.1.4.1.77, .1.3.6.1.4.1.311, and .1.3.6.1.4.1.9600.

# /opt/opennms/contrib/snmpwalk-debug.sh $host $community .1.3.6.1.4.1.77 .1.3.6.1.4.1.311 .1.3.6.1.4.1.9600 > nms-9515
# /opt/opennms/contrib/snmpwalk-scrub.pl nms-9515

Then attach nms-9515.anonymized.txt to the issue.

Ron
Post by Roskens, Ronald
That's definitely a bug then. Can you open an issue for this on issues.opennms.org?
Ron
Sent: Thursday, July 13, 2017 9:09 AM
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
checking with &#288; 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
That's weird. Sounds like a bug since it doesn't allow that string.
Can you try the Unicode value instead? &#228;
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 "&auml;" in detector
<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;chter"/>
</detector>
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
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
[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
[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
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>
<parameter key="service-name" value="Planificateur de t&acirc;che"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties
Ron
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.
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 75 72 20 64 65 20 74 C3 A2 63 68 65 73).
Best
Norbert
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
<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://sdm.link/slashdot
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
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://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
Ronald Roskens
2017-07-18 18:21:35 UTC
Permalink
The two scripts are installed as part of the opennms-core on RHEL7 based systems. This is where they are in the source tree if they didn’t get installed.

https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-debug.sh <https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-debug.sh>
https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-scrub.pl <https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-scrub.pl>

Ron
Post by Norbert Steinhoff
Hi Ron,
can you provide the snmpwalk-debug.sh script please.
I have contrib version installed right now.
Best
Norbert
I’ve created a bug to track this: https://issues.opennms.org/browse/NMS-9515 <https://issues.opennms.org/browse/NMS-9515>
I’ve put together a pull request which changes how WIn32ServiceDetector does the conversion of the string to OID.
What would help is if we had a SNMP walk of a non-english Windows server, then we could create better unit tests to ensure it will work.
You can run the /opt/opennms/contrib/snmpwalk-debug.sh to generate the output. You should also include OIDs under .1.3.6.1.4.1.77, .1.3.6.1.4.1.311, and .1.3.6.1.4.1.9600.
# /opt/opennms/contrib/snmpwalk-debug.sh $host $community .1.3.6.1.4.1.77 .1.3.6.1.4.1.311 .1.3.6.1.4.1.9600 > nms-9515
# /opt/opennms/contrib/snmpwalk-scrub.pl nms-9515
Then attach nms-9515.anonymized.txt to the issue.
Ron
That's definitely a bug then. Can you open an issue for this on issues.opennms.org <http://issues.opennms.org/>?
Ron
Sent: Thursday, July 13, 2017 9:09 AM
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
checking with &#288; 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
That's weird. Sounds like a bug since it doesn't allow that string.
Can you try the Unicode value instead? &#228;
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 "&auml;" in detector
<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;chter"/>
</detector>
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
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
[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
[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
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>
<parameter key="service-name" value="Planificateur de t&acirc;che"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references <https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references>
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties <https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties>
Ron
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.
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
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
<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 <http://sdm.link/slashdot>
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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 <http://sdm.link/slashdot>
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <https://lists.sourceforge.net/lists/listinfo/opennms-discuss>
Norbert Steinhoff
2017-07-21 15:23:11 UTC
Permalink
Hi Ron,

snmpwalk results added to NMS-9515

Best

Norbert
Post by Ronald Roskens
The two scripts are installed as part of the opennms-core on RHEL7 based systems. This is where they are in the source tree if they didn’t get installed.
https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-debug.sh <https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-debug.sh>
https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-scrub.pl <https://raw.githubusercontent.com/OpenNMS/opennms/master/opennms-base-assembly/src/main/resources/contrib/snmpwalk-scrub.pl>
Ron
Post by Norbert Steinhoff
Hi Ron,
can you provide the snmpwalk-debug.sh script please.
I have contrib version installed right now.
Best
Norbert
I’ve created a bug to track this: https://issues.opennms.org/browse/NMS-9515 <https://issues.opennms.org/browse/NMS-9515>
I’ve put together a pull request which changes how WIn32ServiceDetector does the conversion of the string to OID.
What would help is if we had a SNMP walk of a non-english Windows server, then we could create better unit tests to ensure it will work.
You can run the /opt/opennms/contrib/snmpwalk-debug.sh to generate the output. You should also include OIDs under .1.3.6.1.4.1.77, .1.3.6.1.4.1.311, and .1.3.6.1.4.1.9600.
# /opt/opennms/contrib/snmpwalk-debug.sh $host $community .1.3.6.1.4.1.77 .1.3.6.1.4.1.311 .1.3.6.1.4.1.9600 > nms-9515
# /opt/opennms/contrib/snmpwalk-scrub.pl nms-9515
Then attach nms-9515.anonymized.txt to the issue.
Ron
That's definitely a bug then. Can you open an issue for this on issues.opennms.org <http://issues.opennms.org/>?
Ron
Sent: Thursday, July 13, 2017 9:09 AM
Subject: Re: [opennms-discuss] Problem setting up Win32ServiceMonitor
Hi Ron,
checking with &#288; 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
That's weird. Sounds like a bug since it doesn't allow that string.
Can you try the Unicode value instead? &#228;
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 "&auml;" in detector
<detector name="G DATA Dateisystem Waechter" class="org.opennms.netmgt.provision.detector.snmp.Win32ServiceDetector">
<parameter key="win32ServiceName" value="G Data Dateisystem W&auml;chter"/>
</detector>
Internal Exception: org.xml.sax.SAXParseException: The entity "auml" was referenced, but not declared.]; nested exception is javax.xml.bind.UnmarshalException
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
[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
[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
Since those characters are not valid in XML, you need to use their predefined entity.
<parameter key="service-name" value="G Data Dateisystemw&auml;chter"/>
<parameter key="service-name" value="Planificateur de t&acirc;che"/>
https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references <https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references>
https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties <https://github.com/OpenNMS/opennms/raw/develop/opennms-provision/opennms-detector-simple/src/test/resources/org/opennms/netmgt/provision/detector/windows2003.properties>
Ron
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.
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
You need to use the actual string that you are looking for in the value, not the encoded ascii value.
<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 <http://sdm.link/slashdot>
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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 <http://sdm.link/slashdot>
_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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_______________________________________________ <http://sdm.link/slashdot_______________________________________________>
http://www.opennms.org/index.php/Mailing_List_FAQ <http://www.opennms.org/index.php/Mailing_List_FAQ>
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss <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://sdm.link/slashdot_______________________________________________
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
Ronald Roskens
2017-07-22 20:09:35 UTC
Permalink
Thanks! I’ve put together a new unit test using the data from your snmpwalk file, and I’ve updated my PR for this.

Ron
Post by Norbert Steinhoff
Hi Ron,
snmpwalk results added to NMS-9515
Best
Norbert
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, 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

Loading...