zabbix-tooling / zabbix-agent-extensions

zabbix-agent-extensions
GNU General Public License v2.0
112 stars 45 forks source link

Error importing template on Zabbix 6.4.14 #42

Closed jeroenvermeulen closed 4 months ago

jeroenvermeulen commented 4 months ago

I tried to import zabbix_templates/6.4/custom-os-linux.xml from release zabbix-agent-extensions-2.6.3 and from the master branch.

Error 1:

Invalid parameter "/1/request_method": value must be 0. Found a fix.

Error 2:

Invalid parameter "/27/trapper_hosts": value must be empty. Found a fix

Solution

After patching the files this way:

cat custom-os-linux.xml | grep -Ev '<(request_method|allowed_hosts)>' > custom-os-linux__fix.xml
cat custom-os-linux-hardware.xml | grep -v '<request_method>' > custom-os-linux-hardware__fix.xml
cat custom-os-puppet.xml | grep -v '<request_method>' > custom-os-puppet__fix.xml
cat custom-service-apache.xml | grep -v '<request_method>' > custom-service-apache__fix.xml
cat custom-service-nginx.xml | grep -v '<request_method>' > custom-service-nginx__fix.xml
cat custom-service-springboot.xml | grep -v '<request_method>' > custom-service-springboot__fix.xml
cat custom-service-varnish.xml | grep -Ev '<(request_method|allowed_hosts)>' > custom-service-varnish__fix.xml

I could import the files.

I think it would be good to make the templates suitable for the latest stable Zabbix.

jeroenvermeulen commented 4 months ago

I could make a PR but I don't know if it has no side effects for older versions to remove all <request_method> and <allowed_hosts> tags. Is it true we shouldn't include these tags since Zabbix 6.4.0 ?

scoopex commented 4 months ago

Yes, this should work. A PR would be great!