Skip to main content

 

Hello, I’m trying to monitor two esxi, but I’ve got an error “UNKNOWN: Cannot find 'HostSystem' object”.When I change the ESXI2(172.16.250.6) to the first in the centreon_vmware.pm config the ESX is monitored, but when I put the ESXi2 on second in this configuration file this is the ESXI2 that is monitored and not the first one, I want to monitor both esxi.

Esxi 2 is placed in second in centreon_vmware.pm config:

 So the ESXI 2 is monitored but not the first ESX:

:

 Service centreon_vmware.pm status:

 When ESXI 2 is place on first:

 The ESXi 2 is not monitored this time and its the first ESX that is monitored:

%centreon_vmware_config = (
    vsphere_server => {
        default => {
            url => 'https://172.16.250.6/sdk',
            username => 'root',
            password => 'xxx'
                },
    },
          vsphere_server => {
                default => {
                    url => 'https://172.16.250.3/sdk',
                    username => 'root',
                    password => 'xxx'
                },

    },
);

1;

 

I want to monitor both any answer to this problem ? Thanks !

Hi,

 

It was almost correct.

 

Try this: 

 

%centreon_vmware_config = (
vsphere_server => {
first_esx => {
url => 'https://<ip1>/sdk',
username => 'root',
password => 'xxx'
},
second_esx => {
url => 'https://<ip2>/sdk',
username => 'root',
password => 'xxx'
},

},
);

1;

 

You have to specify which ESX you want to talk with in your command lines and templates indeed. 


Hi,

 

It was almost correct.

 

Try this: 

 

%centreon_vmware_config = (
vsphere_server => {
first_esx => {
url => 'https://<ip1>/sdk',
username => 'root',
password => 'xxx'
},
second_esx => {
url => 'https://<ip2>/sdk',
username => 'root',
password => 'xxx'
},

},
);

1;

 

You have to specify which ESX you want to talk with in your command lines and templates indeed. 

 

Hi thanks for your answer !

 

You write “first_esx” and “second_esx”, But what im suppose to write there ? Im writting default but I don’t know if i’m wrong

But I still getting this:

 Config:

%centreon_vmware_config = (
    vsphere_server => {
        default => {
            url => 'https://172.16.250.3/sdk',
            username => 'root',
            password => 'xxx'
        },
        default => {
            url => 'https://172.16.250.6/sdk',
            username => 'root',
            password => 'xxx'
        },

    },
);

1;
 

Status:

 


Hi @Xavier 

You can find further information here, @sims24 notes to use different names so you can use them in your command later

%centreon_vmware_config = (
vsphere_server => {
'my_first_vcenter' => {
url => 'https://<ip_hostname>/sdk',
username => '<username>',
password => '<password>'
},
'my_other_vcenter' => {
url => 'https://<ip_hostname>/sdk',
username => '<DOMAIN>\<username>',
password => '<password>'
},
},
port => 5700
);

In this case you can use either under the macro

 

CENTREONVMWARECONTAINER    Name of your container in the file centreon_vmware.pm

 

 

👍


Hi @Xavier 

You can find further information here@sims24 notes to use different names so you can use them in your command later

%centreon_vmware_config = (
vsphere_server => {
'my_first_vcenter' => {
url => 'https://<ip_hostname>/sdk',
username => '<username>',
password => '<password>'
},
'my_other_vcenter' => {
url => 'https://<ip_hostname>/sdk',
username => '<DOMAIN>\<username>',
password => '<password>'
},
},
port => 5700
);

In this case you can use either under the macro

 

CENTREONVMWARECONTAINER    Name of your container in the file centreon_vmware.pm

 

 

👍

Yes thanks !!! Its working !!


Reply