taishin / rbvmoni-zabbix

4 stars 7 forks source link

Importing templates on Zabbix 2.0.5 or higher #9

Open timbonne opened 10 years ago

timbonne commented 10 years ago

Dear all,

When importing the specified templates in Zabbix 2.0.5 or higher I get an import error.

When importing Template-vCenter for example I get:

XML file contains fatal error 41:Specification mandate value for attribute data-pjax-transient [ Line: 28 | Column: 40 ]

Thanks for looking at this issue.

taishin commented 10 years ago

Hi Thanks for your testing. In my environment(Zabbix2.0.8), it has imported successfully. How did you download template? Try the following way. curl -O https://raw.github.com/taishin/rbvmoni-zabbix/master/Template-vCenter.xml

timbonne commented 10 years ago

Hello,

Thanks for the reply! This has indeed fixed my problem :) It seems like downloading the file with my browser can cause the XML file to get malformed. Very odd. Now that I come to think of it, this is an issue which I had before, with other templates. Sorry to raise this issue, since it had nothing to do with your work. It was completely my fault.

Thanks a lot for the help, I really appreciate it! :)

Now that I have continued the installation, I have another issue... When I try to execute the rbvmoni-zabbix.rb script I receive the following error: -bash: /etc/zabbix/rbvmoni-zabbix.rb: /usr/bin/ruby^M: bad interpreter: No such file or directory

This is most likely due to my system. When I execute 'which ruby' I get the following: /usr/bin/ruby

So this seems to be correct. However, I am using the Zabbix OpenSuse appliance. Perhaps I should be moving to a full-blown Linux and install zabbix myself, instead of an appliance of which I am unsure of how things are configured. I don't think this has anything to do with your system either...just mentioning...

Thanks again for helping!

kilkams commented 10 years ago

Hello, I also started testing on OpenSuse had to put a lot of additional components. full list now do not remember. To install using "zypper",and "gem install fileutils". install this all require 'rubygems' require 'zbxapi' require 'logger' require 'rbvmomi' require 'fileutils' with all depends. I think after this, these problems will go away

taishin commented 10 years ago

Hi, timbonne

I seem that your problem is a problem of line feed code. The following command will solve your problem.

tr -d '\r' < old.pl > new.pl

http://stackoverflow.com/questions/8556524/script-showing-bad-interpreter-and-will-not-run

taishin commented 10 years ago

Hi, kilkams

Thank you for your advice.

I will add it to README.