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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
guest_metrics_last_updated not updated correctly #4237
Comments
Looking at 4d1b51c, it appears that the I would expect So there isn't really a "heartbeat" that you can get through the guest metrics. It's not really a good mechanism for that sort of thing; due to the overhead, it doesn't scale well. RRDs may be more useful for what you are trying to do. |
@robhoes thanks for the answer. However:
Also, having a freshness from the guest would allow to do application monitoring (your app is writing into the xenstore every minute, both with the guest agent). This way, you have a complete control on what's going on from API point of view (reporting that the app isn't sending heartbeat but the VM is for example, might not trigger the same action than the VM isn't sending anything). That's why having live data from the xenstore by using XAPI is interesting for "higher level" applications. |
RRD data sources can come from xenstore. This is for example how the memory RRDs work. So if a guest agent is writing heart beats to xenstore, then an RRD could be created to watch this. Doing this through the xapi database does not scale, and this is why RRDs were invented in the first place. |
That would be a fair solution indeed 馃憤 Do you have any doc/tutorial on how to build such a thing? Speaking of RRDs, it would be the occasion to not use XML but something easier to parse instead (in terms of CPU cost). But it's another topic 馃槃 |
Hello everyone,
Here is a report on something that might be interesting.
Context 馃挕
I was investigating the possibility to do VMware like app/VM watchdog capabilities. With Xen Orchestra, we could use some XAPI values to make actions if needed. Because we are able to replicate VMs, we could decide to start some of them if the original VM is frozen or dead (remember XO is "on top of XAPI", meaning we can make decisions globally on multiple pool, which is great to leverage your whole XAPI enabled host infrastructure).
Thanks to the XAPI doc (I will never emphasis that enough: this is our bible here! Thanks for it! 馃憤 ) I found interesting fields in the
VM_guest_metrics
class:live
bool [RO/runtime] > True if the guest is sending heartbeat messages via the guest agentlast_updated
datetime [RO/runtime] > Time at which this information was last updatedPerfect tool for the job! 馃槃
The problem 馃悰
So I started to investigate when
live
would become false, by freezing the VM (eg with a simplexl pause $DOMID
). Weirdly enough, nothing happened. It was always attrue
.But that wasn't all:
last_updated
returned an old value (few minutes, hours or days before for some VMs), not something it's advertise to do. So I decided to compare directly by readingxenstore
myself.So for example:
I did the command multiple times, and obviously, the value was updated around every minutes (which is the expected thing) 馃憤
But in XAPI, nothing changed:
I double/triple checked, the value was indeed refreshed in xenstore, but not in XAPI. So there's 2 problems:
live
value seems to be not correctly computed (or not doing what the doc said it should)last_updated
isn't updated at the same pace than the xenstore, despite again what it should do if we take the doc for grantedTests 馃И
I did tests on 8.1 and 8.2, same outcome. I have the feeling it's affecting
master
too.The text was updated successfully, but these errors were encountered: