I'm new in zabbix world, and I created a specific script to be run every half hour. This script returns (through sys.exit(X)) 0 if everything is OK, 1 for warning, 2 critical; 3 unknown (well I conceived it Nagios/centreon style, I have experience on these).
I can execute it through su - zabbix python3 /usr/lib/zabbix/externalscripts/NBackupWD.py ignoredarg -c companyname
The output is text+exit code if there are warnings or critical issues, just the exit code if there are no issues.
So I created an Item called "Backups" with the key "NBackupWD.py[-c companyname]" but from now on, i'm lost.
How to make zabbix execute it and change the trigger state in function of that return code? I understood that I need to create an item, then link it to a trigger (how?), the documentation is very unclear and nowhere is mentioned the adaptation of the return code to trigger the corresponding state (if script sends exit code of 2, then warning.. like on nagios...)
Also, can you please indicate how in the interface to add it? (if possible with screenshots) because on Google, many of the indications are for versions prior 2.4.2 and as I understood there was a change of behavior of scripts at this version.
thank you!
nodatatrigger for a hour.