zabbix-tooling / zabbix-agent-extensions

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

problem to add custom-os-linux.xml #1

Closed bogdancernea closed 7 years ago

bogdancernea commented 8 years ago

When i try to import template a get an error : Import failed Details Invalid XML tag "/zabbix_export/graphs/graph(3)/ymax_item_1": unexpected tag "host". I try under zabbix 3.0

aboe76 commented 8 years ago

I can confirm this error message, running Zabbix 3.0.3 on debian jessie from official repo's. no other templates imported.

chrw commented 8 years ago

We're currently using Zabbix 2.2.x with this setup. I can help you out as soon as our test setup ist up and running. Please feel free to contribute to the project. 👍 Have you tried to exclude "Graphs" from the import? Just curious if this is the only problem.

aboe76 commented 8 years ago

@chrw No Problem will try it this week and exclude graphs, and report back.

aboe76 commented 8 years ago

@chrw too bad, even without graphs, the import error remains,

I think this is the reason:

https://www.zabbix.com/documentation/3.0/manual/introduction/whatsnew300

5.9 Dependencies between trigger prototypes

A trigger prototype may not depend on a trigger prototype from a different LLD rule or on a trigger created from trigger prototype. Host trigger prototype cannot depend on a trigger from a template.
aboe76 commented 8 years ago

With this patch, I get it to import:

--- custom-os-linux.xml 2016-06-07 11:04:58.869274484 +0200
+++ custom-os-linux-3.0.xml 2016-06-07 11:04:26.129775208 +0200
@@ -2866,10 +2866,7 @@
             <ymin_type_1>1</ymin_type_1>
             <ymax_type_1>0</ymax_type_1>
             <ymin_item_1>0</ymin_item_1>
-            <ymax_item_1>
-                <host>Custom - OS - Linux</host>
-                <key>vm.memory.size[total]</key>
-            </ymax_item_1>
+            <ymax_item_1>0</ymax_item_1>
             <graph_items>
                 <graph_item>
                     <sortorder>0</sortorder>
chrw commented 8 years ago

Thanks for your effort. Is this working for you @bogdancernea? Looking forward to a pull request for the new file for version 3. :+1:

bogdancernea commented 8 years ago

hi, sorry for late answer, i don't understand, where to put the patch ?

chrw commented 7 years ago

I applied the patch by creating a 3.x version of the custom-os-linux.xml. See referenced commit. :)