add new lines to include new file in instalation agent in windows. tiquet: #2127

This commit is contained in:
m-lopez-f 2015-05-04 13:45:49 +02:00
parent 19abac33c1
commit a12114048b
6 changed files with 116 additions and 1 deletions

View File

@ -255,7 +255,22 @@ module_end
module_begin
module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\productID.vbs"
module_crontab * 12-15 * * 1
module_end
module_end
module_begin
module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\architecture.vbs"
module_crontab * 12-15 * * 1
module_end
module_begin
module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\domain.vbs"
module_crontab * 12-15 * * 1
module_end
module_begin
module_plugin cscript.exe //B "%PROGRAMFILES%\Pandora_Agent\util\osversion.vbs"
module_crontab * 12-15 * * 1
module_end
# ----------------------------------------------------------------------------------------------------
# This samples below need to be reconfigured and uncommented. Please read documentation

View File

@ -0,0 +1,25 @@
' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms)
' (c) 2015 Borja Sanchez <fborja.sanchez@artica.es>
' This plugin extends agent inventory feature. Only enterprise version
' --------------------------------------------------------------------------
on error resume next
'WMI architecture
Wscript.StdOut.WriteLine "<inventory>"
Wscript.StdOut.WriteLine "<inventory_module>"
Wscript.StdOut.WriteLine "<name>Architecture</name>"
Wscript.StdOut.WriteLine "<type><![CDATA[generic_data_string]]></type>"
Wscript.StdOut.WriteLine "<datalist>"
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set cols = objWMIService.ExecQuery("Select osarchitecture from Win32_OperatingSystem")
For Each data In cols
Wscript.StdOut.WriteLine "<data><![CDATA[" & data.osarchitecture & "]]></data>"
Next
Wscript.StdOut.WriteLine "</datalist>"
Wscript.StdOut.WriteLine "</inventory_module>"
Wscript.StdOut.WriteLine "</inventory>"

View File

@ -1,3 +1,7 @@
' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms)
' (c) 2015 Borja Sanchez <fborja.sanchez@artica.es>
' This plugin extends agent inventory feature. Only enterprise version
' --------------------------------------------------------------------------
on error resume next
'WMI cpuinfo

View File

@ -0,0 +1,25 @@
' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms)
' (c) 2015 Borja Sanchez <fborja.sanchez@artica.es>
' This plugin extends agent inventory feature. Only enterprise version
' --------------------------------------------------------------------------
on error resume next
'WMI domain/workgroup info
Wscript.StdOut.WriteLine "<inventory>"
Wscript.StdOut.WriteLine "<inventory_module>"
Wscript.StdOut.WriteLine "<name>Domain</name>"
Wscript.StdOut.WriteLine "<type><![CDATA[generic_data_string]]></type>"
Wscript.StdOut.WriteLine "<datalist>"
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT Domain FROM Win32_ComputerSystem")
For Each objItem In colItems
WScript.StdOut.WriteLine "<data><![CDATA[" & objItem.Domain & "]]></data>"
Next
Wscript.StdOut.WriteLine "</datalist>"
Wscript.StdOut.WriteLine "</inventory_module>"
Wscript.StdOut.WriteLine "</inventory>"

View File

@ -0,0 +1,25 @@
' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms)
' (c) 2015 Borja Sanchez <fborja.sanchez@artica.es>
' This plugin extends agent inventory feature. Only enterprise version
' --------------------------------------------------------------------------
on error resume next
'WMI OS version
Wscript.StdOut.WriteLine "<inventory>"
Wscript.StdOut.WriteLine "<inventory_module>"
Wscript.StdOut.WriteLine "<name>OSVersion</name>"
Wscript.StdOut.WriteLine "<type><![CDATA[generic_data_string]]></type>"
Wscript.StdOut.WriteLine "<datalist>"
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set cols = objWMIService.ExecQuery("SELECT version from win32_operatingsystem")
For Each data In cols
Wscript.StdOut.WriteLine "<data><![CDATA[" & data.version & "]]></data>"
Next
Wscript.StdOut.WriteLine "</datalist>"
Wscript.StdOut.WriteLine "</inventory_module>"
Wscript.StdOut.WriteLine "</inventory>"

File diff suppressed because one or more lines are too long