Enable WMI Opennms Cent OS box
Description
Environment
Acceptance / Success Criteria
Lucidchart Diagrams
Activity
Seth Leger January 26, 2015 at 11:51 AM
I fixed the parameter parsing in this class in cases where you have the wrong number of arguments. This should solve the confusion encountered by the bug reporter. Marking as fixed in 15.
commit 94cf16f5c37111ae99278cfd105353370bfe6357
Alejandro Galue January 8, 2015 at 10:56 AM
I'm not a Windows guy, sorry.
The only hard part of using WMI is creating and properly configure a non-domain admin account for accessing WMI on the Windows servers. Besides that, make sure the Windows Firewalls allows the OpenNMS to talk with it. It is Windows so it could be a lot of ports to open
Yanier January 7, 2015 at 4:02 PM
I tried the the host ip and this is what i get. I can connect to this server from another windows server using power shell.
xception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.checkElementIndex(LinkedList.java:553)
at java.util.LinkedList.remove(LinkedList.java:523)
at org.opennms.protocols.wmi.CheckWmi.main(CheckWmi.java:79)
Thank you for your help
Alejandro Galue January 5, 2015 at 4:37 PM
The error is pretty straight forward: "Caused by: java.net.UnknownHostException: server01: Temporary failure in name resolution". You should use a valid IP or FQDN of the Windows Server you're checking with the checkwmi command.
Also keep in mind that the "hard" part of monitoring Windows servers with WMI is at Windows side, not OpenNMS; specially if you want to use a non-domain administrator account to access WMI data.
Details
Assignee
Seth LegerSeth LegerReporter
YanierYanierComponents
Fix versions
Affects versions
Priority
Minor
Details
Details
Assignee
Reporter
Components
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty Incident
PagerDuty
PagerDuty Incident
PagerDuty

WMI access seems to be working in the server (remote and local). I was following this guide (http://www.opennms.org/wiki/WmiConfiguration) and when i try to check the WMI from the opennms box i get this error.
[root@localhost bin]# ./checkwmi -matchType all -wmiClass Win32_BIOS \ > -wmiObject Status \ > -op EQ -value OK -domain cbw.local server01 Administrator ************
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.opennms.protocols.wmi.WmiException: Unknown host 'server01'. Failed to connect to WMI agent.
at org.opennms.protocols.wmi.WmiClient.connect(WmiClient.java:272)
at org.opennms.protocols.wmi.WmiManager.init(WmiManager.java:264)
at org.opennms.protocols.wmi.CheckWmi.main(CheckWmi.java:150)
Caused by: java.net.UnknownHostException: server01: Temporary failure in name resolution
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getAllByName0(InetAddress.java:1246)
at java.net.InetAddress.getAllByName(InetAddress.java:1162)
at java.net.InetAddress.getAllByName(InetAddress.java:1098)
at java.net.InetAddress.getByName(InetAddress.java:1048)
at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:408)
at org.opennms.protocols.wmi.WmiClient.connect(WmiClient.java:232)
... 2 more
I went to the site listed and tried the solution suggested but not luck. perhaps i am doing something wrong. I am still fairly new on opennms. Please let me know how i can resolve this issue. Thank you.