Hi Everyone,
I am working on running some PowerShell scripts BUT - on linux, pswh works well in general from the command prompt, here is the simply command that check the date:
However when trying to run it as an item I am getting an error:
Checked that - indeed "/nonexistent" is the location of the zabbix user:
I gave 777 starting from /nonexistent till the /137 folder - nothing.
I've found something like this where someone runs powershell scripts https://www.b-blog.info/en/monitorin...th-zabbix.html however he shoots to zabbix with them with zabbix trapper - maybe that was the reason this person done it this way?
I've tried to run pwsh with all these switches [-NoLogo] [-NonInteractive] [-NoProfile] and... unfortunately [-NothingHelpedAndIamFrustratedAF].
Is there something specific that need to be done for powershell / linux system to allow zabbix Powershell script executions on a linux machine?
J
I am working on running some PowerShell scripts BUT - on linux, pswh works well in general from the command prompt, here is the simply command that check the date:
pawel@zabbix:/$ pwsh -Command "Get-Date"
Thursday, September 24, 2020 2:24:22 PM
Thursday, September 24, 2020 2:24:22 PM
pawel@zabbix$ zabbix_get -s 127.0.0.1 -k system.run["pwsh -Command "Get-Date""]
cannot create user data directory: /nonexistent/snap/powershell/137: Permission denied
cannot create user data directory: /nonexistent/snap/powershell/137: Permission denied
pawel@zabbix$ getent passwd zabbix
zabbix:x:112:114::/nonexistent:/usr/sbin/nologin
zabbix:x:112:114::/nonexistent:/usr/sbin/nologin
I've found something like this where someone runs powershell scripts https://www.b-blog.info/en/monitorin...th-zabbix.html however he shoots to zabbix with them with zabbix trapper - maybe that was the reason this person done it this way?
I've tried to run pwsh with all these switches [-NoLogo] [-NonInteractive] [-NoProfile] and... unfortunately [-NothingHelpedAndIamFrustratedAF].
Is there something specific that need to be done for powershell / linux system to allow zabbix Powershell script executions on a linux machine?
J
Comment