• 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 log file errors
  • 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 log file errors

Quest Solution Architect Brian Wheeldon steps through an example of a derived metric including scoping query and calculation script.

As described in How to create a Derived Metric (to count powered on VMs), 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 define a derived metric to track alarm occurances, by host

In the post, he said he had configured the LogFilter agent with same match criteria on a number of hosts.

These agents send error matches to the FMS and the FMS triggers associated alarms.

His requirement was to count these error matches, grouped by host, for a specified time interval.

One approach to this problem is to use the AlarmService to count the number of alerts generated.

While it's possible to implement this approach, not every error match identified by the LogFilter agent generates an alarm.

Specifcally, a new alarm will only be triggered if previous alarms have been cleared (SOL75131).

It turns out to be both simpler and more accurate to count the number of matches returned by the LogFilter agents rather than count the number of alarms generated.

So how do we implement this?

In order to define a derived metric, we need:

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

To implement this requirement, the scope is the Host object. But we only care about machines where the LogFilter agent has been deployed, so we can specify a more precise scope:

Host: $object = (LogFilterAgent).monitoredHost

This means "select all Host objects that have LogFilterAgent objects whose monitoredHost property reference that Host"

To create this scoping query, I referred to the $object section of Foglight's Topology query reference.

Next, we need to decide when the metric should be calculated. For our purposes, once every hour is fine, and, so we can get clock-aligned collections, specify "Schedule Driven" with the built-in "Hourly" schedule. To refine this specification, we configure the metric to evaluate at the end of each hour and we "enable trigger without data" so that the metric is calculated even if there are no metric updates to the host.

For the calculation, we need to count the number of matches on the given host over the previous hour.

Looking at the agent model in the Data browser, we see that the LogFilter agent has a LogFilter_ErrorVerbose table which has a property that's confusingly also named LogFilter_ErrorVerbose. The property lists a set of complex observations that describe the error matches.

So we'll do this in two lines. In the first line we'll extract all observations from LogFilter_ErrorVerbose on the given host for the last hour:

result = #LogFilter_ErrorVerbose from LogFilter_ErrorVerbose where monitoredHost = $scope for 1 hour#

This metric query will return a collection of lists; an outer collection for each agent on the host and an inner collection for each matching observation in the agent.

To count them, we collect them into a list, the flatten the list, then count the items:

result.topologyObjects.collect { result.values(it) }.flatten().size()

Note that if your FMS is 5.5.8 or earlier, you'll need to take out the ".flatten()".

Here's the complete calculation:

// metric query returns all LogFilter observations for this host

result = #LogFilter_ErrorVerbose from LogFilter_ErrorVerbose where monitoredHost = $scope for 1 hour#

// collect the observations into a list and count them

result.topologyObjects.collect { result.values(it) }.flatten().size()

  1. To create this derived metric, navigate to the Administration/Data/Managed Derived Metrics dashboards and click "Add Derived Metric"
  2. Next specify the Derived Metric Name "LogFilterErrorCount" and click Add Calculation.
  3. Enter the scoping query above and make sure you validate it by clicking the green check button on the far right.
  4. 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.
  5. 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.
  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 value and capabilities of your Foglight monitoring environment!

  • 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.
  • 「法務」
  • ご利用規約
  • 個人情報保護方針
  • コミュニティのフィードバックとサポート