Python script using Selenium Webdriver which logs in to a device, fetches a metric and outputs it to stdout.
Configured this as an External Script.
The script runs fine as the Zabbix user from an SSH session, but does not work when executed as the same user by the Zabbix proxy service. The error is:
I had this working some time ago but I think it stopped after a reboot of the Zabbix proxy server.
Configured this as an External Script.
The script runs fine as the Zabbix user from an SSH session, but does not work when executed as the same user by the Zabbix proxy service. The error is:
Code:
Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/script.py", line 42, in <module> driver = webdriver.Chrome(service=service, options=chrome_options) File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", line 92, in __init__ self.service.start() File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 98, in start self.assert_process_still_running() File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 109, in assert_process_still_running raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/chromedriver unexpectedly exited. Status code was: 1
I had this working some time ago but I think it stopped after a reboot of the Zabbix proxy server.
Comment