Ad Widget

Collapse

Zabbix script - powershell missing modules

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slpefanis
    Member
    • Jan 2020
    • 52

    #1

    Zabbix script - powershell missing modules

    Hi all. I have a powershell script that I would like to use is a discovery rule. The scrip is copied into the external scripts folder and I've created a .sh file. This is all tested via terminal and working ( giving me a Json output). The problem is when I try and test it via the zabbix web I'm seeing missing modules from my powershell script for the same .sh file. (Similar errors as to when the module isn't installed)

    In my script I'm calling the Azure module AZ which I've installed when logged onto the server
    server.

    Any suggestions on what/how to go about working out why they aren't available when using the zabbix functionality? Could it be the process that zabbix uses (e.g. zabbix user) potentially doesn't have the script access?
  • Druinthor
    Junior Member
    • Mar 2021
    • 5

    #2
    Late response to this but the answer for me was that the System account does not have access to the modules in the default location. I moved the modules to the zabbix script directory and ran the command from there,

    import-module C:\Zabbix\scripts\DFSR

    You could edit the permissions to the original location but it involves taking ownership of the folder etc etc.

    Comment

    • rockandstone
      Junior Member
      • Mar 2021
      • 24

      #3
      I can confirm what Druinthor said, Zabbix searches modules in a different folder than the default one.. You have to move / copy them in the right folder and it will work!

      Comment

      Working...