SpookOz / zabbix-winupdates

A template for Zabbix that monitors and (optionally) applies Windows updates - for active agents
23 stars 15 forks source link

Doesn't work. #1

Open hasanaltin opened 3 years ago

hasanaltin commented 3 years ago

Hello my friend,

I was looking for a template of Zabbix which is made to check it out the windows updates and I found your project. According to given information is a perfect template what you made, but i couldn't use it because i am new in Zabbix.

I use zabbix 5.2 and have some proxies. I tried the script both local and remote locations. I tried two kinds of installation types, both with manual installation and deployment style of installation

When i try to deploy the your script i got the error given below

2968:20201206:125152.844 active check "system.run[powershell.exe -NoProfile -ExecutionPolicy Bypass -command Invoke-WebRequest -Uri https://git.io/JfzKT -OutFile $Env:Programfiles\'Zabbix Agent\plugins\check_win_updates2020.ps1',nowait]" is not supported: Unsupported item key.

When i try to use your script manually i don't get any information on my widget.

Can you explain to me step by step how to use it, please?

Regards, Hasan

hasanaltin commented 3 years ago

Problem is solved. As I wrote above I'm new. My zabbix proxy config file has EnableRemoteCommands=1 code and I thought it delivers to this config the all agents but I was wrong. I got the windows updates when I added EnableRemoteCommands=1 code to the agent config file.

Is there any way to get rid of this burden? because it is not easy to add this code to all system if you have hundreds of servers.

Many thanks in advance.

SpookOz commented 3 years ago

HA- I came across this exact problem and actually asked about it in Reddit: https://www.reddit.com/r/zabbix/comments/i12r70/unsupported_item_key_for_item_in_active_agent/

The thing is, the "EnableRemoteCommands" parameter is deprecated in v5.2 agents. You need to use System.run instead ( https://www.zabbix.com/documentation/current/manual/introduction/whatsnew520). I actually have a slightly different template for my 5.2 clients (which is all of them now) I can help you with this.

In regards to your 2nd question - I deploy my Zabbix to remote clients using a script that does the following:

  1. Install choco via a PS script ( https://docs.chocolatey.org/en-us/choco/setup)
  2. Use choco do install Zabbix agent (choco install zabbix-agent -y)
  3. Download a pre-created zabbix config file (using curl). This file is the same for all my clients and replaces the default zabbix_agentd.conf file. It includes my zabbix server address, the path to the psk file etc
  4. Downloads the PSK file, userparams and plugins
  5. Restarts the service

I can help you create a batch file like mine if you want. Do you have a direct email address we can communicate on?

On Mon, Dec 7, 2020 at 3:32 PM hasanaltin notifications@github.com wrote:

Problem is solved. As I wrote above I'm new. My zabbix proxy config file has EnableRemoteCommands=1 code and I thought it delivers to this config the all agents but I was wrong. I got the windows updates when I added EnableRemoteCommands=1 code to the agent config file.

Is there any way to get rid of this burden? because it is not easy to add this code to all system if you have hundreds of servers.

Many thanks in advance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SpookOz/zabbix-winupdates/issues/1#issuecomment-739656411, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCDP7FJKCYAYCHA4QE22GTSTRLGJANCNFSM4UPGRWWQ .

SpookOz commented 3 years ago

BTW - I just uploaded the V5 template. If you have zabbix v5 or above clients, try that,

hasanaltin commented 3 years ago

Hello my friend, thanks for your replying. Let's talk via e-mail. My email address is given below.

https://imgur.com/bqHFz6O

Many thanks. 👍