Replies: 33 comments
-
I'm not very familiar with that particular property, but I would suggest using the WaitFor routine as indicated by the API to receive such state changes without making timing assumptions and avoiding continuous poll. WDYT? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback. Nagios executes various service checks on a schedule, relaunching plugins (scripts, etc) to confirm the status of a specific service/host. In this case, the plugin reads the value of the property (maintained in the The total execution of the plugin is very brief. Should I use the WaitFor routine before trusting that properties (in general) are recent, even for "one shot" property retrievals, or is that advice mostly for applications which run for an extended period of time (and likely make multiple queries against the property)? |
Beta Was this translation helpful? Give feedback.
-
Yes, I'd use WaitFor methods in the context of long-running processes, i.e. not "one-offs". |
Beta Was this translation helpful? Give feedback.
-
Thanks for confirming. Perhaps my concerns regarding caching of the property remain relevant then. Are you familiar with how the |
Beta Was this translation helpful? Give feedback.
-
Sorry, I have no background in that area :/ |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
@github-actions /remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
@dougm Do you know whether client code should force a refresh of the |
Beta Was this translation helpful? Give feedback.
-
I've not seen the ConsolidationNeeded property before, but took a quick look at the source.. this property is maintained on the ESX side and does not get updated often afiact. I can see it gets updated during some vMotion and FT related methods, when a VM is first added to inventory, when a VM is reloaded.. in which case you can try using |
Beta Was this translation helpful? Give feedback.
-
@dougm Thanks for looking into it, I appreciate it! I'll look at |
Beta Was this translation helpful? Give feedback.
-
I looked at the code here: Lines 76 to 85 in d99e995 and used How expensive would you say this operation is? Aside from the Recent Tasks chatter, is there a notable impact on a cluster to frequently reload VMs (e.g., every 5-10 minutes)? Is this a fairly common operation from client code, or do you think this is best configured as a routine job on the cluster itself? Thanks for your help with this. |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no |
Beta Was this translation helpful? Give feedback.
-
/remove-lifecycle stale |
Beta Was this translation helpful? Give feedback.
-
I created a Nagios plugin to monitor the state of the
consolidationNeeded
property for VirtualMachine objects. I don't have any VMs within our environment that have this value set, but I've received a bug report from a user that indicates that even after they've consolidated disks for affected VMs the plugin is still reporting that the VMs require disk consolidation. This is even after affected VMs have been power cycled.The Triggered Alarm in their environment has cleared to indicate that the issue is no more, but the plugin still "sees" the
consolidationNeeded
property as set. The plugin operates as a "one shot" app, starting up, retrieving properties and then giving a report (pass/fail) before exiting. No state is retained directly by the plugin between executions. I'm using a view to retrieve the properties.I found this in the vSphere Web Services SDK Programming Guide:
This seems to suggest that data retrieved from a view may not be the most current at the time of retrieval, but that it eventually will be.
Not really knowing the internals all that well, this feels almost like the view data is being cached somewhere. Do I need to somehow force a refresh of the inventory in order to retrieve current property values?
Thanks in advance for any pointers you may have!
Beta Was this translation helpful? Give feedback.
All reactions