I would appreciate it if you could assist on this.
I have a Unity 350F. The script for discovery and state both get exit code 0.
When I add the template to the host, it starts giving me all the data for LUNs, PSUs, etc. and then it stops reporting.
The 2 items that are discovery and state on the template are then erroring out with the following error:
Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "Traceback (most recent call last):
File "/usr/lib/zabbix/externalscripts/unity_get_state.py", line 27, in
unity_handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=1024*1024, backupCount=5)
File "/usr/lib/python3.8/logging/handlers.py", line 148, in init
BaseRotatingHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.8/logging/handlers.py", line 55, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.8/logging/init.py", line 1147, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.8/logging/init.py", line 1176, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '/tmp/unity_state.log'"
In the unity_state.log there are no permission errors, only successful logins and logouts.
the numbers in the latest data part can be update manually when the script is run via CLI.
I am using the macros as you mention as I am using in the script, plus the
{$SUBSCRIBED_PERCENT}
{$USED_PERCENT}
FYI for you and anyone else who might have the same issue I had, I seem to have solved it by putting in a cron job to run both scripts every 15 minutes, now I have updated data with no issues.
Hello,
I would appreciate it if you could assist on this.
I have a Unity 350F. The script for discovery and state both get exit code 0.
When I add the template to the host, it starts giving me all the data for LUNs, PSUs, etc. and then it stops reporting.
The 2 items that are discovery and state on the template are then erroring out with the following error:
Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/unity_get_state.py", line 27, in
unity_handler = logging.handlers.RotatingFileHandler(LOG_FILENAME, maxBytes=1024*1024, backupCount=5)
File "/usr/lib/python3.8/logging/handlers.py", line 148, in init
BaseRotatingHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.8/logging/handlers.py", line 55, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "/usr/lib/python3.8/logging/init.py", line 1147, in init
StreamHandler.init(self, self._open())
File "/usr/lib/python3.8/logging/init.py", line 1176, in _open
return open(self.baseFilename, self.mode, encoding=self.encoding)
PermissionError: [Errno 13] Permission denied: '/tmp/unity_state.log'"
In the unity_state.log there are no permission errors, only successful logins and logouts.
the numbers in the latest data part can be update manually when the script is run via CLI.
I am using the macros as you mention as I am using in the script, plus the {$SUBSCRIBED_PERCENT} {$USED_PERCENT}
That I have left empty.
Can you please assist?
Thank you very much.