Re: Problem setting up Win32ServiceMonitor

Norbert Steinhoff <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <[email protected]>
Hi Ron,

snmpwalk results added to NMS-9515

Best

Norbert


> Am 18.07.2017 um 20:21 schrieb Ronald Roskens <[email protected]>:
> 
> 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
> 
>> On Jul 18, 2017, at 11:39 AM, Norbert Steinhoff <[email protected] <mailto:[email protected]>> wrote:
>> 
>> 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 <[email protected] <mailto:[email protected]>>:
>> 
>> 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
>> 
>>> On Jul 14, 2017, at 1:48 PM, Roskens, Ronald <[email protected] <mailto:[email protected]>> wrote:
>>> 
>>> That's definitely a bug then. Can you open an issue for this on issues.opennms.org <http://issues.opennms.org/>?
>>>  
>>> Ron
>>>  
>>> From: Norbert Steinhoff [mailto:[email protected] <mailto:[email protected]>] 
>>> Sent: Thursday, July 13, 2017 9:09 AM
>>> To: [email protected] <mailto:[email protected]>
>>> 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 <[email protected] <mailto:[email protected]>>:
>>>  
>>> 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:[email protected] <mailto:[email protected]>] 
>>> 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 <[email protected] <mailto:[email protected]>>:
>>>  
>>> 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>
>>>  
>>> 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 <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:[email protected] <mailto:[email protected]>] 
>>> 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 <[email protected] <mailto:[email protected]>>:
>>> 
>>> 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 <http://sdm.link/slashdot>
>>> _______________________________________________
>>> Please read the OpenNMS Mailing List FAQ:
>>> http://www.opennms.org/index.php/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 <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_______________________________________________>
>>> Please read the OpenNMS Mailing List FAQ:
>>> http://www.opennms.org/index.php/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 <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_______________________________________________>
>>> Please read the OpenNMS Mailing List FAQ:
>>> http://www.opennms.org/index.php/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 <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_______________________________________________>
>>> Please read the OpenNMS Mailing List FAQ:
>>> http://www.opennms.org/index.php/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 <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>
>> _______________________________________________
>> Please read the OpenNMS Mailing List FAQ:
>> http://www.opennms.org/index.php/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 <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_______________________________________________>
>> Please read the OpenNMS Mailing List FAQ:
>> http://www.opennms.org/index.php/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 <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

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.