This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

VM Down and Raised Time Query for Widget

Hi All,

I have several VMs monitored in VMAN (no Orion), version v.6.3.0 and I want to make a 'Dashboard Widget' that shows which VMs that just down in last 1 day for example and sort them with their raised date.

I have tried this query:

vm.uptime:0 AND vm.perfDate:[* TO now+1day]

and sort by: vm.perfDate

Is it correct? especially the query for the vm just down (vm.uptime:0) cause i still don't find any query for this

and, is there any better way to show the info more detail like date dan time? Cause in the alert detail, there is 'raised' attribute that shows '2/14/2017 10:29:14 AM'

alert detail.PNG

Anyone know the query, so I can use it for the dashboard widget?

Please your advice. Thank you very much

Regards,

-Syarif-

  • I would just use vm.uptime:[0 TO 86400].  VM Uptime is represented in seconds, so 86400 will give you the last 24 hours.  you can build your widget using a TopN and pick the uptime as the sort field.  You can then add in additional columns as needed.

    pastedImage_0.png

  • Hi mprobus,

    Thanks for your advice. but, actually what I need is to make a widget that shows the down VMs (not rebooted VMs), so the it's VM that still down.

    So, I chose to use query 'vm.uptime:0', but I don't know what is the best 'sort field' for widget to use to show the VMs down based on it's down-raised time. meaning the newer ones will be on top

    I have tried to use vm.perfDate and vm.timestamp, but it just show the date, not detail to the time (hours:minutes:seconds). And the result sometimes not according it's raised time.

    Any idea?

    Regards,

  • Got'cha.  I misunderstood.  I thought you were wanting machines that recently rebooted.

    I don't think you can use the vm.Perfdate because even though a machine may be powered off, VMware will still report it as having 0 performance data (at least for memory).  You can verify this by running the following query.

    vm.powerstate:"poweredOff"  vm.perfDate:*

    vm.uptime:0 will not give you the servers that are currently down.  Uptime tells you how long since the system last rebooted.  So, a 0 would mean that it just started up.

    You can use vm.lastActivityDate:[* TO now-1days] which will report the servers that haven't had activity in the past day.  For VMs that are powered off, this will represent the time they were turned off.  In the widget though, it only shows the date.  If you do a view all and show them in the search results, the Hits will show the actual time.