Hello, we're running Pandora FMS v5.0SP3 - Build PC140128 and I'd like to create some new module templates with some WMI checks. I try to create a new WMI check (Managed Modules -> Network components -> "Create a new WMI component"). I can fill in everything in this mask exept the fields "WMI query" and "Field number". Unlucky "WMI query" is the most important thing here. Is it a bug or am I wrong creating these modules? Thank you, Philipp
cant add WMI string to a new WMI component
knoxel · 7 mar 2014, 19:14 · 22 mensajes · 103 visitas
- Inicio del debate
Hello There seems to be bug. After checking the parameters in Namespace doesn't let you insert anything as well. As soon as the problem is fixed I'll inform you. Regards Ivo
Thank you very much :)
This has been fixed in pandorafms_console-5.0SP4-140520.tar.gz You can update through the
Thank you for the Information and the update :)
I'm sorry asking again, but the Problem seems not to be really fixed. I have installed 5.0 SP4 and have the following Problem: I can create the WMI checks and add the template, but the module can't get initialized and will be automatically deleted from the agend after some time (don't know how Long, I'd say 30 minutes but it could be more or less). In the debug log from the Pandora Server I see this entries:
2014-05-27 05:22:47 chibimon1 [V9] Executing AM # 2537 WMI command 'wmic -U ""%"" // "select PercentFreeSpace from Win32_PerfFormattedData_PerfDisk_LogicalDisk WHERE Name = 'C:'"' 2014-05-27 05:22:48 chibimon1 [V3] Received invalid data 'C:' from agent ' module '% free Disk C' agent .
If I add the module by Hand and not via a template, it still could not be initialized but it don't get deleted automatically. I get an error in the Pandora Server log that is similar, but it has a litte difference:
2014-05-27 06:20:04 chibimon1 [V3] Received invalid data 'CLASS: Win32_PerfFormattedData_PerfDisk_LogicalDisk Name|PercentFreeSpace C:|13
In both cases I get the message with "invalid data" and I can accept, that this output table may be invalid data for pandora (so this is a Problem which should be solved). In case of creating the module via a template I never see the output table, so there have to be a difference. You have already seen my 2nd problem: The wmi output is a table, not just a number. I am using this wmi Version: "Version 4.0.0tp4-SVN-build-UNKNOWN" All the old and initialized modules are running fine, but I cant add new modules. If I run the command at the Pandora Server Shell it runs fine and give me the same answer like in the last quote. But I remember, I got just the number and not a whole table a few weeks / month ago. Regards, Knoxel
Hello There seems to be a bug with wmi modules. We are working on it as soon as it gets fixed I will inform you. Regards Ivo
I solved this issue by changing the "Type." For instance. If I am retrieving a value I would expect to be a number and set the type to "Generic Number" it may fail. If I recreate it as a "Generic String" it will succeed in initializing.
As a side note, you may consider exploring the WMI query manually using "WMI Explorer" located at http://www.ks-soft.net/. This is a useful tool to know how to populate the "Field number" field.
This "solution" didn't work for me. I tried the WMI Explorer (had another one) and it works, but I cant see how to get just the number without the whole table. I have tried to work with the field number and tried to use differend types. So I can't add new WMIs checking the free space.
Hello Execute just the querry in a powershell to see the input here the result. Is you machine a 64 bits machine? Post a copy of the module you've created to take a closer look at it. Do you have any other wmi modules connected to that agent and are they working fine? Regards Ivo
Hello Ivo, sorry for my late answer, I couldn't check it earlier. We have a 32bit version of ubuntu running and want to check Win2k8r2. All the old pandora WMI checks are successful. The checks via Tools and cli are successful, too. All new init checks don't work, see the attached scrennshots. I have created a new WMI for showing you that old ones running fine, but new ones doesn't. The reason should be in the CLI screenshot and the output from the wmic command. Regards, Philipp
[

](//pandorafms.com/community/media/forum/0/17040=670-CLI_WMI_bak1.png)
[

](//pandorafms.com/community/media/forum/0/17040=671-Modules_bak1.png)
[

](//pandorafms.com/community/media/forum/0/17040=672-New_WMI_bak1.png)
[

](//pandorafms.com/community/media/forum/0/17040=673-Old_WMI_bak1.png)
Hello Try executing these wmi querries in a powershell to see the results. Regards Ivo
Hello Ivo, here the result
[

](//pandorafms.com/community/media/forum/0/17152=686-wmi_query_powershell.png)
Hello The problem comes from the fact that the returned information is in an alphanumeric format and the created module is a generic_data module. In order to solve this issue you need to limit the information to the numeric part only. Regards Ivo
Hello Ivo, thanks for your reply. Can you tell me how to limit it to the numeric part only? Thank you, regards, Knoxel
Hello Try adding, at the end, the following: | grep C: | gawk '{print $2}' Regards Ivo
Ok, in this case I have the mysterious 2001b error again ... But thanks so far for your help. ERROR: WMI query execute. NTSTATUS: NT code 0xc002001b - NT code 0xc002001b WMI is working from anywhere exect from the pandora server. I'll Keep looking how to fix the problem.
Hi Ivo, with you extention at the end I get the 2nd line of the output, which is empty. I have tried it from the shell with the ending: | grep C: | cut -c 4-5 It runs fine at the Shell, but when I put the commad in a WMI module the module is "not initialized" and disappears after a few minutes. We have Pandora FMS v5.1 - Build PC140701 running. Regards, Philipp
Hello Can you try at the shell with my extention but changing the number behind the $ symbol? Try with 3 and 1 for example.. Regards Ivo
Entra en tu cuenta para publicar.





