I am having an issue with the WMI modules. I have a server setup and added some WMI modules to some agents (is that the right terminology??) they are always coming up as non-initialised. I have read through the forum and seem all the other posts regarding the same issue but none of the solutions I have found seems to work. For example, I have added the windows defender service state module in the module component window, I have added the username DOMAINUser and the password, the wmi query is select state from Win32_Service where name = 'WinDefend' Module state is non-initialised I have tried running the command from the cli of the server wmic -U "domenusername"%"password" //IPADDRESS "select state from Win32_Service where name = 'WinDefender'" and it returns the following which appears to be correct CLASS: Win32_Service Name| State WinDefend| Running I have changed the verbosity of the server log to 10 and I see the log for the wmi module collection as follows 2017-07-26 11:57:31 pandorafms [V9] Executing AM # 42 WMI command 'wmic -U "DOMAINUsername"%"password" //auto "select state from Win32_Service where name = 'WinDefend'"' 2017-07-26 11:57:54 pandorafms [V10] Updating module WindowsDefender_status (ID 42) on error. can anyone explain what the on error is?? everything looks ok and the command works from the cli so why does it not work automatically? The other thing I have checked in the server config is that wmiserver is set to 1 Any assistance would be greatly appreciated.
WMI Module Issues
FIASIT · 26 jul 2017, 8:47 · 26 mensajes · 112 visitas
- Inicio del debate
Hello FIASIT, Checks the module type based on the data received by the WMI query execution. Kind regards, Luis.
Hello FIASIT, Checks the module type based on the data received by the WMI query execution. Kind regards, Luis.
the module type is set to Generic boolean (generic_proc) It does not appear to be able to be changed. I set this module up using the built-in list in add modules under the module template section.
Hello FIASIT, You can create a new module, type Generic String. Kind regards, Luis.
Hello FIASIT, You can create a new module, type Generic String. Kind regards, Luis.
I have created a new module as suggested but still getting an error in the log
[

](//pandorafms.com/community/media/forum/8588/21217=1066-custom-module.png)
[V10] Updating module WMI-Service(WindowsDefender_statu) (ID 45) on error.
Hi FIASIT, Can you say me the version of your Pandora server? For now you can add a module in the configuration file of your Windows Agent.
module_begin module_name Windows Defender module_type generic_data_string module_wmiquery SELECT * FROM Win32_Service WHERE Name="WinDefend" module_wmicolumn State module_str_critical Stopped module_endBest regards, vic.
Hi FIASIT, Can you say me the version of your Pandora server? For now you can add a module in the configuration file of your Windows Agent.
module_begin module_name Windows Defender module_type generic_data_string module_wmiquery SELECT * FROM Win32_Service WHERE Name="WinDefend" module_wmicolumn State module_str_critical Stopped module_endBest regards, vic.
Thanks for getting back to us. I have added the module in the agent config file and it is now showing up in the Pandora console. The version of Pandora we are running 7.0NG.707 (P) 170711 Thanks
Hi FIASIT, The version 707 have a bug that not allow adding WMI modules inside the same agent of the query, on the last version the problem is solved. Thanks for reporting. vic.
Thanks will give the new version a try.
Hi again, we have built a new server running: Pandora FMS Build PC170810 Pandora FMS Version v7.0NG.710 We are still having issues when we add wmi modules. I have again tested from the console and the wmic query runs fine and give the result we are expecting but the module always shows as not initialized in the web console and the server log shows the same error message as the previous version we were running. Any advice?
Same problem here.
Hi FIASIT, dkoel, I'm trying to replicate the problem, but I can't. I add all modules with the WMI wizard to Windows Agent, and all is initialised. You need use a user with admin privileges and this user have permissions to make WMI querys. A guide: https://technet.microsoft.com/en-us/library/cc771551(v=ws.11).aspx Best regards, vic.
Hi Vic, Thanks for the reply. Here's some extra info. Here's the part from my pandora_server.log:
2017-08-16 21:31:12 localhost.localdomain [V9] Executing AM # 17 WMI command 'wmic -U "[email protected]"%"P@ssw0rd" //192.168.100.1 "SELECT FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = 'C:'"' 2017-08-16 21:31:12 localhost.localdomain [V10] Updating module Free disk (ID 17) on error.When I execute the command from the terminal, I get the correct response:
[root@localhost ~]# wmic -U "[email protected]"%"P@ssw0rd" //192.168.100.1 "SELECT FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = 'C:'" CLASS: Win32_LogicalDisk DeviceID|FreeSpace C:|120187482112 [root@localhost ~]#I've reinstalled the server from CentOS Appliance ISO (PandoraFMS7.0NG.709.x86_64.iso) and from the VMware OVF. I've updated both to the version below. The CentOS Appliance ISO worked well with the "yum update" to v7.0NG.710, but the VMware OVF bricked my mysql database connection (that's another issue):
Pandora FMS Build PC170810 Pandora FMS Version v7.0NG.710Don't know if you can replicate the issue with this information. Edit 1: It seems to have something to do with the "Create a new WMI server module" functionality. When I use this method, the module stays uninitialized. When I use the WMI explorer and add the module, all is working fine. Edit 2: In my other environment both methods stay uninitialized and a manual wmic from console works fine.
[
](//pandorafms.com/community/media/forum/8625/21354=1100-Create-WMI-server-module.PNG)
Hi dkoel, Are you putting the module type correctly? Best regards, vic.
Hi Vic, I've not created my own modules yet. These are the default that are installed. Saludos
[
](//pandorafms.com/community/media/forum/8625/21358=1101-Create-WMI-Module.PNG)
Hi Vic, I've not created my own modules yet. These are the default that are installed. Saludos
This is the same for myself I have only used the built in WMI modules and have not created my own. As for a user with the correct permissions, I have tried with the domain admin and the local machine admin and the same result works in the console but not in the module.
Hi all, I see that you have a problem in configuring the module, delete it and create another with the same data manually. In case the module is still not started, it will be due to the lack of permissions. Best regards, vic.
Hi all, I see that you have a problem in configuring the module, delete it and create another with the same data manually. In case the module is still not started, it will be due to the lack of permissions. Best regards, vic.
So, I have gone to the module configuration of one of my servers created a new wmi server module Selected Manual setup rather than one of the predefined modules filled in all the relevant information tested the wmi query from the console (it works) waited for the server to update and still, the module is saying non-initialized
2017-08-21 07:18:36 pandorafms.localdomain [V9] Executing AM # 162 WMI command 'wmic -U "SERVERNAMEadministrator"%"PASSWORD" //SERVERNAME "select ConnectionAttemptsPersec from Win32_PerfRawData_W3SVC_WebService"' 2017-08-21 07:18:36 pandorafms.localdomain [V10] Updating module IIS ConnectionAttemptsPersec(manual) (ID 162) on error.Hi all, I see that you have a problem in configuring the module, delete it and create another with the same data manually. In case the module is still not started, it will be due to the lack of permissions. Best regards, vic.
Hi Vic, Thank you for your reply's and suggestions. I have a problem with the "Lack of permissions". Could you please explain why it would be a lack of permissions when we (FIASIT and I) can execute the command from the console and not from the webinterface? The same user is used to execute the command. Correct? The WMI-user is a domain admin. The webconsole-user is Admin. Where would the lack of permissions be? Regards.
Hi FIASIT, dkoel, I am doing tests with different versions of pandora and all the modules are started. Try this configuration and check the data type and the value returned by the query.

It should look like this:
Best regards, vic.
Entra en tu cuenta para publicar.

