This issue was found after upgrading from 1.3.7 to 1.4.0, even if the SNMP scripts exists in the /config/user-data directory with valid permissions, it still says script does not exist. Following error found in messages.
Jun 27 09:27:28 ht-int-gw02 snmpd[27877]: snmp-conntrack-count.sh: No such file or directory Jun 27 09:27:28 ht-int-gw02 mp-conntrack-count.sh: No such file or directory Jun 27 09:27:28 ht-int-gw02 snmpd[27878]: snmp-conntrack-max.sh: No such file or directory ls -l /config/user-data: -rwxrwxr-x 1 root vyattacfg 59 Jan 27 2023 snmp-conntrack-count.sh -rwxrwxr-x 1 root vyattacfg 57 Jan 27 2023 snmp-conntrack-max.sh
Steps to reproduce in the lab on 1.4.0 version:
Configuration:
vyos@vyos# set service snmp script-extensions extension-name test script test.sh [edit] vyos@vyos# commit [ service snmp ] WARNING: script "test.sh" does not exist!
It works if you give full path of the script, then no warning is received:
vyos@vyos# set service snmp script-extensions extension-name test script /config/user-data/test.sh [edit] vyos@vyos# commit [edit]