Mailing List Archive

How to get the host (slave) and vm real-time metrics(e.g. cpu_utilization)
Hi all,

I build a pool includes 3 hosts : vGate7 vGate8 vGate9. vGate9 is
the master,others are slaves.

I build a page to show the host and vm metrics(e.g. cpu_utilization)
on the same page.It works fine for the master (vGate9) .But it cannot
get the slave metrics.

As follows:










In python,I use the following codes to get the CPU Usage:



I attempt to make an API call to a slave (even something trivial like
pool.get_all()), I get the
['HOST_IS_SLAVE' ] exception, along with the master's IP address.

The main problem is to get three
hosts real-time performing metrics and to show them on the same page.

Is there any workaround to solve this problem? Thank you in advance!





Best Regards!


Jesson
Re: How to get the host (slave) and vm real-time metrics(e.g. cpu_utilization) [ In reply to ]
The attachments are the picatures, incase you cannot see the pictures in
the 1st email.
Thank you


Best Regards!

Jesson

2014-11-24 9:24 GMT+08:00 Will Sun <willsun810@gmail.com>:

> Hi all,
>
>
> I build a pool includes 3 hosts : vGate7 vGate8 vGate9. vGate9 is the master,others are slaves.
>
>
> I build a page to show the host and vm metrics(e.g. cpu_utilization) on the same page.It works fine for the master (vGate9) .But it cannot get the slave metrics.
>
> As follows:
>
>
>
>
>
>
>
>
>
>
> In python,I use the following codes to get the CPU Usage:
>
>
>
> I attempt to make an API call to a slave (even something trivial like pool.get_all()), I get the
> ['HOST_IS_SLAVE' ] exception, along with the master's IP address.
>
> The main problem is to get three
> hosts real-time performing metrics and to show them on the same page.
>
> Is there any workaround to solve this problem? Thank you in advance!
>
>
>
>
>
> Best Regards!
>
>
> Jesson
>
>
>
Re: How to get the host (slave) and vm real-time metrics(e.g. cpu_utilization) [ In reply to ]
I am sorry for the messy codes . here I will resend my message.
I build a pool includes 3 hosts

2014-11-24 9:34 GMT+08:00 Will Sun <willsun810@gmail.com>:

> The attachments are the picatures, incase you cannot see the pictures in
> the 1st email.
> Thank you
>
>
> Best Regards!
>
> Jesson
>
> 2014-11-24 9:24 GMT+08:00 Will Sun <willsun810@gmail.com>:
>
>> Hi all,
>>
>>
>> I build a pool includes 3 hosts : vGate7 vGate8 vGate9. vGate9 is the master,others are slaves.
>>
>>
>> I build a page to show the host and vm metrics(e.g. cpu_utilization) on the same page.It works fine for the master (vGate9) .But it cannot get the slave metrics.
>>
>> As follows:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> In python,I use the following codes to get the CPU Usage:
>>
>>
>>
>> I attempt to make an API call to a slave (even something trivial like pool.get_all()), I get the
>> ['HOST_IS_SLAVE' ] exception, along with the master's IP address.
>>
>> The main problem is to get three
>> hosts real-time performing metrics and to show them on the same page.
>>
>> Is there any workaround to solve this problem? Thank you in advance!
>>
>>
>>
>>
>>
>> Best Regards!
>>
>>
>> Jesson
>>
>>
>>
>