• 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
Foglight Administrators Foglight Todo list part 2: Building a Model
  • Forum
  • Wikis
  • Sub-Groups
  • More
  • Cancel
  • New
  • -Foglight Administrators
    • A New Foglight Service Status Widget - Text with Colored Background
    • Adding APM views to an existing Foglight Java cartridge installation
    • Adventures in Agent Creation - Part 1
    • Adventures in Agent Creation - Part 2
    • Adventures in Agent Creation - Part 3
    • Anonymizing the Foglight End User Monitoring Solution
    • Another Foglight Service Status Widget - Colored Text
    • +Building a custom dashboard to summarize LogFilter alarms
    • Building a geo drag and drop Foglight dashboard for a service
    • Building Complex Schedules with Foglight
    • Busting Frame Busters in Foglight Experience Viewer (FxV)
    • Community Cartridge: Notification Management Cartridge
    • Compatibility for Navigation Timing API
    • Configuring Internet Explorer 9 (IE9), to best work with Foglight
    • Converting Foglight 4 Script Agents to Foglight 5
    • Creating Load Testing Scripts from FxM and FxV Session Data
    • Custom Agents - Introduction to Script Agents
    • Custom Agents - Script Agent Data Modeling and Units
    • Custom Foglight Dashboards: adding alarm colors to spinners, jelly beans and other gauges
    • Custom Script Agent 1: Leverage an Existing Monitoring Script To Push Data into Foglight
    • Custom Script Agent 2: Build a WCF Dashboard to View the Custom Agent Data
    • Custom Script Agent 3: Add a Metric and Build a WCF Chart to Display it
    • Custom Script Agent 4: Add a Metric to a Table
    • Customizing Foglight – Expert Services Discount Available for a Limited Time!
    • Customizing the out-of-the-box Host Status view
    • Dashboard speed-up
    • Deploying Two FglAMs to the Same Windows Host and running each as a Windows Service
    • Different Thresholds for Different Tablespaces
    • Different Thresholds for Different Tablespaces - Part 2
    • Emailing reports with the proper name and format
    • Everything You Need to Know About Udyam Registration
    • FGL IDE (Export Customizations & more)
    • Flexible, Cost-effective Remote Administration Services
    • Foglight 5 - Topology Localization
    • Foglight Advanced Administration Training - Limited Space for February 2012
    • Foglight APM Basics (Videos)
    • Foglight APM Features (videos)
    • -Foglight Best Practices
      • A brief (and ridiculous) explanation of scope
      • Foglight Custom Drag and Drop Portlets
      • Foglight Export Component Tutorial
      • Foglight Services mini series
      • Foglight Services: Advanced Service Visualisation
      • Foglight Services: Email routing
      • Foglight Tips – Dashboard Refresh
      • Foglight Tips – Sharing My Dashboards
      • Foglight Todo list part 2: Building a Model
      • Nothing to do? build a ToDo List!
    • Foglight Best Practices (videos)
    • Foglight Best Practices Monthly Webcast – Sign Up for Session 1!
    • Foglight Best Practices: Dashboards and Reports Webcast Registration Open Now!
    • Foglight dashboard as a SharePoint WebPart
    • Foglight Dev Camp & Hackathon 2017
    • Foglight End User Management: Using Network TAPs versus a Switch SPAN Port
    • Foglight End User Service Availability Reporting, Foglight Experience Monitor or Foglight Transaction Recorder which one to use?
    • Foglight Event Synchronization Solution for HP Operations Manager Services Pack Available Now!
    • Foglight Experience Viewer (FxV) URL Search Shortcuts
    • Foglight Host OS Monitoring (videos)
    • Foglight iGoogle Gadget
    • Foglight nologinuser dashboard in SharePoint
    • Foglight Public Virtual Training Courses
    • Foglight Quickstart Services Offering
    • Foglight Reporting using Metric Queries or Groovy
    • Foglight Training Classes -- Public and Private Options Available
    • Foglight Training Packages with Free Healthcheck Services - Limited Time Offer
    • Fraud Support with FxV
    • FxM and Apache Proxy Server (X-Forwarded-Host)
    • FxM: IP Multicasting and Sessionizing
    • FxV Storage Tier Expansion & Analysis Repository Considerations
    • Getting the most out of Foglight's .NET Monitoring - Part 1
    • Getting the most out of Foglight's .NET Monitoring - Part 2: Agent Configuration Specifics and Best Practices
    • Getting the most out of Foglight's .NET Monitoring - Part 3: Monitoring a .NET Executable Application
    • HDIDT - View an Exported Real User Session File
    • How are your Java components processing?
    • How to Handle NTLM within UEM
    • Improve Organizational Adoption of Your APM Solution
    • January Foglight Best Practices Thursday, January 5 - Register Now!
    • Java APM
    • June 2012 Best Practices Webcast Open for Registration!
    • Migrating your Foglight Management Server
    • Monitoring .NET Request Memory Usage with Foglight
    • Monitoring an independent Java process using Foglight
    • Monitoring application availability using Foglight Utility Agents
    • New Foglight Services Packs Available
    • New Sizing Guide for FxM and FxV
    • New UEM Sizing Guide
    • Predicting the Impact of Moving a Guest to Another Host
    • +Quest Application Performance Monitoring (APM) Implementation Methodology
    • Reading a XML File with a powershell script agent
    • Really Simple (Foglight) Syndication
    • Services Section of Quest.com Gets a Facelift
    • Setting the value of a Registry Variable from the Command Line
    • SNMP trap variables in Foglight Alarms
    • The End-User as an Instrument...
    • Thoughts from the road - Foglight Java agent Tag and Follow
    • +Thoughts from the road – User session replay - YOU CAN ACTUALLY DO THAT???
    • Training Update - New Foglight Reporting Course Available
    • Understanding Foglight Metrics
    • Updates to Quest's Foglight Public Virtual Training Calendar
    • Use a Foglight to monitor itself
    • Use Foglight to Drive Business Performance
    • Use Foglight to monitor itself
    • User Experience Mgmt Overview
    • Using telnet or wget to check connectivity
    • Using the ConfigService API to setup agent properties (ASPs)
    • Utilizing MS Exchange distribution lists to help with user attribute maintenance
    • We've Redesigned SupportLink to Get You Answers Faster Than Ever - See for Yourself and Enter to Win an iPad!
    • [Case Scenario] - How to avoid duplicate rows when building a report with 5 min granular data
  • Custom Script Agent - Counting Files in a Windows Folder - How-To
  • Foglight Admin 101
  • Foglight monitoring application components running on Docker Containers
  • Foglight User 101
  • HabitatLux Fix Review – Trusted Home Maintenance Services in Dubai
  • Leather Wallets: The Timeless Accessory Every Man Should Own
  • Memory Utilization for all processes over X months
  • NetMonitor - Quick How-To Guide
  • Pantai Losari, sebuah ikon kota Makassar
  • Setting JBoss Server name and domain in Foglight
  • Setting Tomcat server name and domain in Foglight
  • testing a bug - Do not publish
  • WebMonitor - Quick How-To Guide
  • WebMonitor agent installation

Foglight Todo list part 2: Building a Model

Welcome to part 2 of my series on Foglight customisation. In this series we’re going to learn how to create our own models, dashboards, functions and lots of other bits and pieces. The example project we’re using to do this is a Todo list application. The usefulness of a Todo list in Foglight is left as an exercise for the reader (good luck with that).

Concept

Our Todo list application is going to be a simple beast, with one list for everyone, holding simple details such as task name, description, due date, and status. Although this might seem a little too simplistic it will let us create a nice dashboard and a couple of rules without getting too drowned in modelling.

Models in Foglight

Foglight is different to most monitoring tools, the data we collect is held in object-oriented models rather than flat tables. What does that mean? Well it allows us to use Foglight for modelling any kind of data, link data types together in a hierarchy, and quickly extend it’s capabilities with very little effort .

The general method for creating your own Foglight extensions is to decide on the data structure & create your definition, populate the model using agents (or in this case, scripts) and then build dashboards and rules against the data. In this post we’ll be covering the first 2 steps.

Where to work

Because Foglight has been designed to be quickly extended and customised by our users the tools you need are already available to you. Today, we’ll be using the Add Topology Type dashboard (administration -> data -> Add Topology Type) to import our data types, and the Script Editor (Administration -> Tooling -> Script Editor) to populate them and look at the data.

Files

As I mentioned earlier, the first thing we need to do is create the data model for the information we want to store. The fields we’ll be storing for our Todo items are

Name
Description
Completed (a boolean value)
Due date (a date value we can use in rules)
Foglight models are written in xml, and the type definition will look like this:


Note that I’ve added an identity field to the task name, this will define this object in the model, think of it as a primary key.

The above definition will allow us to create “task” objects, but since these don’t belong to anything else they would be orphaned objects, what we need to do is create a tasks model in Foglight to group them all together:

As you can see, I’ve created a TasksModel object, which is made up of many “task” objects. Notice that this new type extends CollectionModelRoot. This is a special class in Foglight that is used to anchor all the model roots together in the data browser. This is an important step because now we can get to our data easily though the data browser in model roots, and use much simpler queries in our dashboards.

So now we’ve got all the pieces together (you can get the complete text here) we can go to the Add Topology Type dashboard to import. As you can see you can either upload a file, or type (copy/paste) your own definition in. You can also use this dashboard to check that your dashboard is valid xml.

So once you’ve uploaded or copied in your definition, your new task list model is ready to go, all we need to do now is populate it with some data.

Population

Typically Foglight models are populated by data sent in by agents. Since we will be populating our Todo list using a dashboard we need some scripts to create our objects for us. Luckily, Foglight has many API’s and functions available to us to help out. For this section, we’ll be working in the script editor.

The magic function we’ll be using to create or edit our objects is:

def createOrUpdateObject(typeName, propertyValues) {
topSvc = server.TopologyService;

def type = topSvc.getType(typeName);
objShell = topSvc.getObjectShell(type);
propertyValues.each ({propertyName, propertyValue ->
def prop = type.getProperty(propertyName);
if (!prop.isMany()) {
objShell.set(prop, propertyValue);
}
else if (propertyValue instanceof Collection) {
objShell.getList(prop).addAll(propertyValue);
}
else {
objShell.getList(prop).add(propertyValue);
}
});
return topSvc.mergeData(objShell);
}
This function is written in groovy (the scripting language that is built into Foglight). If you’re not the programming type, then it’s probably enough for you to know that this function lets us create objects using syntax like this:

def Task1 = createOrUpdateObject("task", [name:"taskName", taskDescription:"taskDesc", completed:"taskCompleted",due:"taskDue"]);

We create a task object and tell Foglight the values for the parameters (you would only need to change the sections in double quotes). If you’d like to know more, I’d recommend you read the excellent post by the functions original author (see further reading below).

So to create some tasks in our model, paste the function above into the script editor and add these two lines below to create a task and update the taskModel with the new object, and click execute.

def Task1 = createOrUpdateObject("task", [name:"my First Task", taskDescription:"make a cool model", completed:"false",due:"19/10/2011"]);
taskModel = createOrUpdateObject("TasksModel", [name:"TasksModel", Tasks:[Task1]]);

To find your new objects, find “task” in the drop down at the top of the screen, or type “task” into the query box, and hit the button. All instances of the task object will appear below. Clicking on one loads the object into the script editor

As you can see our object has more properties than we declared, this is because our object is an extension of the TopologyObject class, and so we inherit the properties of that class.

Summary

In this post we’ve built a model for our todo list and written a quick script to create our objects. We’ve run through everything at quite a reckless pace in an effort to show some value quickly and not get us lost in the theory. I’d strongly suggest you follow the link in further reading if find yourself interested in the mechanics of what we’ve just done.

Tune in for the next exciting episode, where we will start to put together a dashboard to display our tasks and build on the script above to build it into a dashboard form.

Further Reading

As mentioned above, Geoff Vona has written an excellent article about the theory of models in Foglight, and its him I borrowed (stole) the create objects function from. So if this blog has been interesting, I strongly urge you to read the original post as it covers the principles here in much greater depth. http://foglight.org/Blog/tabid/55/EntryID/133/Default.aspx

This post is the first part of a series of tutorials for creating Foglight models, dashboards, and custom cartridges. For the rest of this series please visit the fglTasks page, you can find a complete list of my foglight posts here

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