Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected tag "recovery_mode" error #3

Open
wavelet123 opened this issue Jul 15, 2017 · 13 comments
Open

unexpected tag "recovery_mode" error #3

wavelet123 opened this issue Jul 15, 2017 · 13 comments

Comments

@wavelet123
Copy link

hi,
I met the following error:
zabbix unexpected tag "recovery_mode" when importing the 2.0 template.

Could you please take a look?

Thanks

@wavelet123
Copy link
Author

Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "correlation_mode".
also this error

@wavelet123
Copy link
Author

Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "manual_close".

@cavaliercoder
Copy link
Collaborator

Can you please share the template that fails to import?

@wavelet123
Copy link
Author

mytemplate-mongodb-trap.xml.gz
this is the 3.0 template.

@wavelet123
Copy link
Author

mdb2.xml.gz
2.0 version
thanks

@cavaliercoder
Copy link
Collaborator

I haven't been able to replicate this issue with either of the templates you provided. They both import fine for me on Zabbix 2.0.20.

Please advise precisely which Zabbix version you are trying to import into, and what zabbix-template-converter arguments you are using to convert the template.

@wavelet123
Copy link
Author

I just removed those lines and import successfully.
I don't have privilege to log into the zabbix server to check the version.

@cavaliercoder
Copy link
Collaborator

I'm glad its working for you, but I'd like to fix it for other users also without having to manually edit the template files.

If you have access to the Zabbix web console to import the templates, the version should be printed in the bar at the bottom of the page.

screen shot 2017-07-15 at 6 11 40 pm

@wavelet123
Copy link
Author

wavelet123 commented Jul 15, 2017

sorry,it's my fault.just noticed the some guy have upgraded the zabbix to 3.2 version.
Thank you for your help.

@cavaliercoder
Copy link
Collaborator

I'll leave this issue open, as recover tags should be removed in older versions (even though they don't cause an issue apparently). Thanks for reporting this.

@cavaliercoder cavaliercoder changed the title unexpected tag error unexpected tag "recovery_mode" error Jul 15, 2017
@funkt
Copy link

funkt commented Oct 17, 2017

Thank you for making the template converter, it's going to make my life a lot easier.
I got unexpected tag errors as well, including "recovery_mode" trying to change a template from 3.2 to 3.0. Here's what I did:

zabbix-template-converter -o 3.0 template_palo_alto.xml > template_palo_alto_3dot0.xml
Applied: Template version string must be '3.0'
Applied: Document timestamp must be updated
Applied: HTTP Tests must not be exported before 3.2.0

Each time I tried to upload the template, I got a new error. I deleted the tags in question, and once they were all gone the template was able to be imported to Zabbix 3.0.11.
Invalid tag "/zabbix_export/templates/template(1)/discovery_rules/discovery_rule(1)/trigger_prototypes/trigger_prototype(1)": unexpected tag "recovery_mode".

Invalid tag "/zabbix_export/templates/template(1)/discovery_rules/discovery_rule(1)/trigger_prototypes/trigger_prototype(1)": unexpected tag "correlation_mode".

Invalid tag "/zabbix_export/templates/template(1)/discovery_rules/discovery_rule(1)/trigger_prototypes/trigger_prototype(1)": unexpected tag "manual_close".

Invalid tag "/zabbix_export/templates/template(1)/discovery_rules/discovery_rule(1)/trigger_prototypes/trigger_prototype(1)": unexpected tag "tags".

3.2 template:
template_palo_alto.xml.gz

@arielzn
Copy link

arielzn commented Feb 22, 2018

Hi,

I hitted these kind of errors also converting from 3.2 to 3.0, specifically

zabbix unexpected tag "recovery_mode"
zabbix unexpected tag "recovery_expression/"
zabbix unexpected tag "correlation_mode"
zabbix unexpected tag "correlation_tag"

But I noticed that they all came from exported triggers after the Templates section, i.e. in the xml file:

  <templates>
     ...
  </templates>
  <triggers>
       all the problematic tags where here
  </triggers>

So I just removed the triggers section and the templates were imported fine.
I created the triggers manually afterwards.

This is related with #6

@polak785
Copy link

polak785 commented Mar 14, 2018

Hello,

Same as @arielzn, I tried to convert a template from Zabbix 3.2 to 3.0 (Zabbix 3.0.15) and I had similar errors :

Invalid tag "/zabbix_export/triggers/trigger(3)": unexpected tag "recovery_mode".
Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "tags".
Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "manual_close".
Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "correlation_tag".
Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "correlation_mode".
Invalid tag "/zabbix_export/triggers/trigger(1)": unexpected tag "recovery_expression".

By removing the tags manually in the converted template file, the import works.

The template comes from https://github.com/fredprod/logstash-zabbix (Template_Logstash-32.xml) and the command used to convert is:
zabbix-template-converter -o 3.0 Template_Logstash-32.xml > template.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants