jjmartres / Zabbix

A great collection of Zabbix scripts and templates
GNU General Public License v2.0
882 stars 584 forks source link

zbx-windows-envmon - agent doesn't start #134

Open Gihicius opened 7 years ago

Gihicius commented 7 years ago

Hello everyone,

I can install the agent with the modified conf file, when I've imported the XLM file no problem.

Is just the agent can't start. But if I add # before "UserParameter =" I can start my agent.

This is my conf file :

####### USER-DEFINED MONITORED PARAMETERS #######

Option: UnsafeUserParameters

Allow all characters to be passed in arguments to user-defined parameters.

The following characters are not allowed:

\ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @

Additionally, newline characters are not allowed.

0 - do not allow

1 - allow

#

Mandatory: no

Range: 0-1

Default:

UnsafeUserParameters=1

Option: UserParameter

User-defined parameter to monitor. There can be several user-defined parameters.

Format: UserParameter=,

#

Mandatory: no

Default:

UserParameter = system.discovery[],%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_win_system_discovery.vbs $1 UserParameter = quota[],%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_win_quota.vbs $1 $2 UserParameter = wu.all,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_wus_update_all.vbs UserParameter = wu.crit,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_wus_update_crit.vbs UserParameter = server.domain,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_user_domain.vbs UserParameter = server.roles,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_server_role.vbs UserParameter = server.serial,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_server_serialnumber.vbs

like is explain in https://github.com/jjmartres/Zabbix/...windows-envmon

Is someone have a solution, I'll be very very happy.....

And sorry for my english

J0HAN85 commented 7 years ago

This works fine: UserParameter=system.discovery[*],%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_win_system_discovery.vbs "$1"

UserParameter=quota[*],%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_win_quota.vbs "$1" "$2"

UserParameter=wu.all,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_wus_update_all.vbs

UserParameter=wu.crit,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_wus_update_crit.vbs

UserParameter=server.domain,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_user_domain.vbs

UserParameter=server.roles,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_server_role.vbs

UserParameter=server.serial,%systemroot%\system32\cscript.exe /nologo /T:30 C:\zabbix\zabbix_server_serialnumber.vbs

Gihicius commented 7 years ago

HHOOOOOOO YYYEAAAAAA!!!!!

thank you every much!!!!! It's working now!!! :)