• Products
    • View all products
    • Free trials
    • Buy online
  • Solutions
  • Resources
    • All Resources
    • Learning Hub
  • Trials
  • Services
    • Consulting Services
      • Overview
      • Microsoft Platform Services
      • Data Protection Services
      • Unified Endpoint Management
      • Performance Monitoring Services
      • Database Management Services
    • Educational Services
    • Support Services
  • Support
    • Support Home
    • By Product
      • All Products
      • AppAssure
      • Archive Manager
      • Change Auditor
      • Desktop Authority
      • DR Series
      • Foglight
      • KACE
      • Migration Manager
      • NetVault
      • Rapid Recovery
      • SharePlex
      • Toad
      • vRanger
    • Contact Support
      • Overview
      • Customer Service
      • Licensing Assistance
      • Renewal Assistance
      • Technical Support
    • Download Software
    • Knowledge Base
    • My Account
      • My Products
      • My Service Requests
      • My Licenses
      • My Groups
      • My Profile
    • Policies & Procedures
    • Consulting Services
      • Microsoft Platform Management
      • Data Protection
      • Unified Endpoint Management
      • Performance Monitoring
      • Database Management
    • Technical Documentation
    • Educational Services
    • User Forums
    • Video Tutorials
  • Partners
    • Overview
    • Partner Circle Log In
    • Become a Partner
    • Find a Partner
    • Technology Partners
    • Partner Community
    • Deal Alert
  • Blogs
    • IT Industry Insights
    • Quest Solution Blogs
      • Data Protection
      • Database Management
      • ITNinja
      • Microsoft Platform Management
      • Performance Monitoring
      • Toad World Blog
      • Unified Endpoint Management
  • Forums
  • 製品情報
    • すべての製品情報%E3%82%92見る
    • Change Auditor
    • Foglight
    • KACE
    • Metalogix
    • Migration Manager
    • Migrator for Notes to SharePoint
    • NetVault Backup
    • On Demand Migration for Email
    • QoreStor
    • Rapid Recovery
    • Recovery Manager
    • SharePlex
    • Spotlight
    • Toad
  • ソリューション
    • すべてのプラットフォームを見る
    • クラウド管理
    • GDPRコンプライアンス
    • データ保護
      • 概要
      • クラウド管理
      • ディザスタリカバリ
      • バックアップとリカバリ
      • Office 365 データ保護
      • 仮想化管理
      • 重複除外と複製
    • データベース管理
      • 概要
      • DevOps
      • データの準備と分析
      • データベースのクラウド移行
      • データベースパフォーマンス監視
      • データベース管理
      • データベース複製ソフトウェアツール
    • 統合エンドポイント管理
      • 概要
      • エンドポイントコンプライアンス
      • エンドポイントセキュリティ
      • エンドポイントの可視化
    • Microsoftプラットフォーム管理
      • 概要
      • ハイブリッドActive Directoryのセキュリティとガバナンス
      • Microsoftプラットフォームの移行計画と統合
      • セキュリティとコンプライアンス
      • 情報アーカイブおよびストレージ管理ソリューション
      • Windowsのバックアップとリカバリ
      • Microsoft Serverのパフォーマンスと可用性
      • レポート作成機能
      • グループポリシーと権限
    • パフォーマンス監視
  • サービス
    • コンサルティングサービス
      • 概要
      • Microsoftプラットフォーム管理
      • データ保護
      • 統合エンドポイント管理
      • パフォーマンス監視
      • データベース管理
    • トレーニングと認定資格
    • サポートサービス
  • サポート
    • サポートホーム
    • 製品で検索
      • All Products
      • AppAssure
      • Archive Manager
      • Change Auditor
      • Desktop Authority
      • DR Series
      • Foglight
      • KACE
      • Migration Manager
      • NetVault
      • Rapid Recovery
      • SharePlex
      • Toad
      • vRanger
    • お問い合わせ
      • すべて
      • カスタマサービス
      • ライセンス アシスタンス
      • 更新のアシス%E3%82%BFンス
      • 技術サポート
    • コミュ%E3%83%8Bティフォーラム
    • ソフトウェアのダウン%E3%83%ADード
    • ナ%E3%83%AC%E3%83%83ジ%E3%83%99ース
    • マイアカウント
      • マイ プロダクト
      • Myサービスリクエスト
      • マイ ライセンス
      • マイ グループ
      • マイ プ%E3%83%ADフ%E3%82%A1イル
    • ポリ%E3%82%B7ーおよび手順
    • コンサル%E3%83%86ィングサー%E3%83%93ス
      • Microsoftプラットフォーム管理
      • データ保護
      • 統合エンドポイント管理
      • パフォーマンス監視
      • データベース管理
    • リリースノートおよびガイド
    • 教育サービス
    • ビデオチュートリアル
  • トライアル
  • パートナー
    • 概要
    • Partner Circleへのログイン
    • パートナーになる
    • Find a Partner
    • パートナーコミュニティ
    • Deal Alert
  • コミュニティ
Quest Community
Quest Community
  • Site
  • User
  • Site
  • Search
  • User
Foglight
Foglight
Custom Dashboards and Scripts How to create a Derived Metric (to count powered on VMs)
  • Forum
  • Wikis
  • Sub-Groups
  • More
  • Cancel
  • New
  • -Main Page
    • Alarms Analysis Dashboard
    • Common Dashboard Framework for Custom Script Agents and Utility OS Agents: Apache, NetMonitor, SNMP, WebMonitor
    • Countdown Timer Widget
    • CreateSubscriber Dashboard
    • Custom dashboard for Solaris Zones (for Infrastructure HostAgent 5.6.7)
    • Custom Dashboards for FxM
    • Custom Terminal Services Dashboard
    • Dashboards and Portlets for Infrastructure Process and Service Metrics
    • Foglight 5.6 Infrastructure Host property dashboards and (re)portlets
    • Foglight Agent Manager Status WCF Dashboard
    • Foglight Dashboard Rotation
    • Foglight Service Portlets
    • Folder Monitoring for Critical Application Dashboard JbBoss Log monitoring
    • HADR - ALWAYS ON AG Report / Dashboard
    • Happy Holidays (Get in the Spirit!) Who says monitoring has to be boring?
    • Host Status "jellybean" view
    • How to create a Derived Metric (to count powered on VMs)
    • How to create a Derived Metric to count log file errors
    • HR - USA View
    • Java Application Server JVM Summary dashboard
    • JEE Dashboard
    • Mailflow
    • Milton Vs Lumbergh : with Cloud Health
    • Milton's TPS Report
    • Monitoring .NET Request Memory Usage with Foglight
    • Monitoring Storage System HP EVA with Quest FogLight
    • +Operational Dashboard
    • Replica of Geo dashboard
    • SAMPLE Dashboard Submission
    • SLA Reports Cartridge
    • The Hockey Rivalry Dashboard
    • University Dashboard - Internet Application Monitoring
    • Virtual Desktop Infrastructure and Application Dashboard - vWorkSpace-Parallels
    • Virtual Overview 1
    • Virtual Overview 2
    • VMware Cluster capacity over time
    • VMware Cluster capacity time until full
    • VMware Top Info Page
    • Windows Event Log Dashboard
    • World Map - Alarms
  • Countdown to Christmas
  • Foglight dashboarding refresher - Halloween 2014

How to create a Derived Metric (to count powered on VMs)

Quest Solution Architect Brian Wheeldon here with a quick tutorial about creating derived metrics.

Derived metrics are calculated on the FMS. They typically augment metrics collected by various agents.

Once calculated, derived metrics are first-class citizens of the Foglight model and can be used in rules, dashboards and reports.

A Foglight Community member wanted to chart the number of powered on VMs in a particular time period.

He noted that this metric is available out of the box for ESX Hosts and Clusters, but this metric is not aggregated up to the Data Center level.

In order to define a derived metric, we need:

  1. a scope, or place to store the metric
  2. a calculation to define it
  3. a policy to determine when the metric is calculated

To implement this requirement, the scope is the Data Center object, or 'VMWDatacenter'.

The calculation is based on the fact that VMWDatacenter has a field called 'virtualMachines' which contains a list of all the VMs in the Data Center, and each VMWVirtualMachine has a String Observation field called 'vmState' whose value is "poweredOn" if the VM is powered on,

Here's the groovy script that gets the list of VMs then iterates through the list pulling out the ones that are "poweredOn", then counts the items in the list:

def vmlist = scope.get('virtualMachines')

ds=server.DataService

poweredOnVMs = vmlist.collect{vm->

vmState = ds.retrieveLatestValue(vm, 'vmState')?.value

(vmState == 'poweredOn') ? vm : null

} - null

return poweredOnVMs.size()

I discovered these names and relationships by exploring the Data browser under Configuration in the left navigation panel.

I prototype and test expressions like this in the Administration | Tooling | Script Console 

The calculation policy can be:

Data Driven - the metric is updated whenever the Data Center object is updated

Time Driven - the metric is calculated every X hours, Y minutes and Z seconds

Schedule Driven - the metric is calculated according to a specified schedule

For this example, I didn't see the value of calculating this value too frequently, so I decided that once an hour (Time Driven) would be adequate.

  1. To create this derived metric, I navigated to the Administration | Data | Derived Metrics dashboards and clicked "Add Derived Metric"
  2. Next specify the Derived Metric Name "virtualMachinesPoweredOnCount" and click Add Calculation.
  3. Select the Topology Type that this metric will be scoped to from the drop down list then click on the green arrow button to append this to the field below.
    Remember to validate the scope by clicking the green check button on the far right.Next, enter the calculation above in the expression field. There are buttons to test the expression, build the expression and validate the expression on the right.
    Make sure that you test the expression and validate it before proceeding.
  4. Next, specify the Trigger Type. I checked "Enable Trigger without Data" to ensure that this metric would always be calculated and available.
    Optionally enter a descriptions and click Add.
  5. You can add the same metric to different scopes. For example, you could use the same expression to add this metric to the Virtual Center level.
  6. Specify the Unit for the metric and add a comment, then click Add to create the metric.

Once created, the derived metrics is available for rules, reports and dashboards.

Derived metrics are a great way to enhance the capabilities of your Foglight monitoring environment!

  • derived metric
  • vmware powwered on
  • customization
  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Company
    • About Us
    • Buy
    • Contact Us
    • Careers
    • News
  • Resources
    • Industry Insights Blog
    • Communities
    • Customer Stories
    • Documents
    • Events
  • Support
    • Professional Services
    • Renew Support
    • Technical Support
    • Training & Certification
    • Support Services
  • Social Networks
    • Facebook
    • LinkedIn
    • Twitter
    • YouTube
  • © 2025 Quest Software Inc. ALL RIGHTS RESERVED.
  • Legal
  • Terms of Use
  • Privacy
  • Community Feedback & Support
  • Cookie Preference Center
  • 会社名
    • 会社情報
    • 購入
    • お問い合わせ
    • 採用情報
    • ニュース
  • リソース
    • ブログ
    • お客様の事例
    • ドキュメント
    • イベント
    • ビデオ
  • サポート
    • プロフェッショナルサービス
    • サポートの更新
    • テクニカルサポート
    • トレーニングと認定資格
    • サポートサービス
  • ソーシャルネットワーク
    • Facebook
    • Instagram
    • LinkedIn
    • Twitter
    • YouTube
  • © 2025 Quest Software Inc. ALL RIGHTS RESERVED.
  • 「法務」
  • ご利用規約
  • 個人情報保護方針
  • コミュニティのフィードバックとサポート