The windows machine added through the API is not polled though it is list in the manage nodes. I have rediscovered it also. when i tried to list the resources it says node may be down / credentials not valid. Please guide me how to get this resolved. Here is the code. when I am trying to add the node through the UI for windows machine through WMI/ICMP option it asks for admin credentials , how to specify that option when adding node through API.
PropertyBag nodeProps = new PropertyBag();
nodeProps.put("EntityType", "Orion.Nodes");
nodeProps.put("IPAddress","xy.xy.yy.ui");
nodeProps.put("Caption", "BLB44CEHSYMR1");
nodeProps.put("DynamicIP", false);
nodeProps.put("EngineID", 1);
nodeProps.put("Status", 1);
nodeProps.put("UnManaged", false);
nodeProps.put("Vendor", "Windows");
nodeProps.put("Allow64BitCounters", true);
nodeProps.put("ObjectSubType", "WMI");
nodeProps.put("SysObjectID", "");
nodeProps.put("MachineType", "");
nodeProps.put("VendorIcon", "");
final String uri = swis.create("Orion.Nodes", nodeProps.getAsSoapPropertyBag());
String strNodeId = queryScalar(swis, "SELECT NodeID FROM Orion.Nodes WHERE Uri=@uri", new PropertyBag() {{ put("uri", uri); }});
int nodeId = Integer.parseInt(strNodeId);
PropertyBag pollerProps = new PropertyBag();
pollerProps.put("NetObject", "N:" + nodeId);
pollerProps.put("NetObjectType", "N");
pollerProps.put("NetObjectID", nodeId);
pollerProps.put("PollerType", "N.Status.ICMP.Native");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());
pollerProps.put("PollerType", "N.ResponseTime.ICMP.Native");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());
pollerProps.put("PollerType", "N.Details.WMI.Vista");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());
pollerProps.put("PollerType", "N.Uptime.WMI.XP");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());
pollerProps.put("PollerType", "N.Cpu.WMI.Windows");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());
pollerProps.put("PollerType", "N.Memory.WMI.Windows");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());
pollerProps.put("PollerType", "N.AssetInventory.Wmi.Generic");
swis.create("Orion.Pollers", pollerProps.getAsSoapPropertyBag());