taishin / rbvmoni-zabbix

4 stars 7 forks source link

Example #3

Closed abuenop closed 11 years ago

abuenop commented 11 years ago

Hi Taishin!

I've seen that you have been done a good job, and I want to use in my environment. I launch rbvmoni-zabbix.rb and I get some information in /tmp/vsphere about my vsphere environment, but I don't know how can I automatically add that information to my zabbix server

Could you give me some instructions or examples to use your script and templates to add my vsphere environment to my zabbix server?

Thank you very much

taishin commented 11 years ago

Hi! Thank you for your testing.

Have you import the template? Then, when you launched rbvmoni-zabbix.rb, Were VMs,ESXi,Datastore in your enviroment registered into Zabbix?

abuenop commented 11 years ago

Thanks for your reply!

I have import into zabbix this templates:

Template-vCenter.xml Template-vSphere-Datastore.xml Template-vSphere-ESXi.xml Template-vSphere-VM.xml

I have created the directory /etc/zabbix and then I have copied the files:

rbvmoni-zabbix.rb.kk userparameter_vsphere-vm.conf

I have installed ruby, nokogiri, zbxapi and rbvmomi

After that, I have launched the command:

MON-UT:/etc/zabbix # ./rbvmoni-zabbix.rb "[IP_HOST_VCENTER]" "[USER_VCENTER]" "[PASS_VCENTER]" VMWARE "http://127.0.0.1/zabbix/"

I can see in the command prompt a 0, and I have some information in /tmp/vsphere/stats about my vsphere environment, but in the zabbix frontend I don't see any new host. What am I doing wrong?

Thanks for your patience

2013/6/18 zabbix- notifications@github.com

Hi! Thank you for your testing.

Have you import the template? Then, when you launched rbvmoni-zabbix.rb, Were VMs,ESXi,Datastore in your enviroment registered into Zabbix?

— Reply to this email directly or view it on GitHubhttps://github.com/taishin/rbvmoni-zabbix/issues/3#issuecomment-19609307 .

taishin commented 11 years ago

Have you failed authentication in Zabbix API? Username and Password of Zabbix API are defined in rbvmomi.rb. (Username: Admin, Password: zabbix) Can you find any problem in zabbix_server.log?

abuenop commented 11 years ago

That was my first error, but when I launched the rbvmomi.rb I saw the credentials error, and I changed the file, with the correct ones.

I don't see any error in zabbix_server.log or /tmp/vsphere/logs/test.log

2013/6/18 zabbix- notifications@github.com

Have you failed authentication in Zabbix API? Username and Password of Zabbix API are defined in rbvmomi.rb. (Username: Admin, Password: zabbix) Can you find any problem in zabbix_server.log?

— Reply to this email directly or view it on GitHubhttps://github.com/taishin/rbvmoni-zabbix/issues/3#issuecomment-19610691 .

taishin commented 11 years ago

In this script, when creating a file, it is registered in Zabbix. So, delete all the files in /tmp/vsphere/stats and launch rbvmomi.rb once again.

abuenop commented 11 years ago

Now I get this error:

/usr/lib/ruby/gems/1.9.1/gems/zbxapi-0.2.415/zbxapi.rb:117: Use RbConfig instead of obsolete and deprecated Config.

<ZbxAPI_ExceptionVersion: raw_api requires API version 1.1 or higher>

Do I need install VMware API?

2013/6/18 zabbix- notifications@github.com

In this script, when creating a file, it is registered in Zabbix. So, delete all the files in /tmp/vsphere/stats and launch rbvmomi.rb once again.

— Reply to this email directly or view it on GitHubhttps://github.com/taishin/rbvmoni-zabbix/issues/3#issuecomment-19611639 .

taishin commented 11 years ago

Please apply this WorkAround. https://github.com/red-tux/zbxapi/issues/8

abuenop commented 11 years ago

I have find out the problem...

There is a problem with tha zbxapi version of my environment, as you can see in https://github.com/red-tux/zbxapi/commit/3dfaefa6bf03c2ec0623186012fcf429eb947961, there is a problem with zbxapi I have path the zbxapi.rb file, and now It works!!!!

Thank you very much!!!

2013/6/18 Ángel Bueno Pardo angel.bueno@gmail.com

Now I get this error:

/usr/lib/ruby/gems/1.9.1/gems/zbxapi-0.2.415/zbxapi.rb:117: Use RbConfig instead of obsolete and deprecated Config.

<ZbxAPI_ExceptionVersion: raw_api requires API version 1.1 or higher>

Do I need install VMware API?

2013/6/18 zabbix- notifications@github.com

In this script, when creating a file, it is registered in Zabbix. So, delete all the files in /tmp/vsphere/stats and launch rbvmomi.rb once again.

— Reply to this email directly or view it on GitHubhttps://github.com/taishin/rbvmoni-zabbix/issues/3#issuecomment-19611639 .

abuenop commented 11 years ago

Yes, thanks, that's the trick

2013/6/18 zabbix- notifications@github.com

Please apply this WorkAround. red-tux/zbxapi#8 https://github.com/red-tux/zbxapi/issues/8

— Reply to this email directly or view it on GitHubhttps://github.com/taishin/rbvmoni-zabbix/issues/3#issuecomment-19612270 .