• Products
    • View all products
    • Free trials
    • Buy online
    • Product lines
      • ApexSQL
      • Change Auditor
      • Enterprise Reporter
      • Foglight Database Monitoring
      • Foglight Evolve
      • KACE
      • Metalogix
      • Migration Manager
      • NetVault Backup
      • One Identity
      • QoreStor
      • Quest On Demand
      • Rapid Recovery
      • Recovery Manager
      • RemoteScan
      • SharePlex
      • Spotlight
      • Stat
      • Toad
    • Featured products
      • Cloud Management
        • Cloud Access Manager
        • Foglight for Virtualization, Enterprise Edition
        • Identity Manager
        • On Demand Migration for Email
        • Quest On Demand
        • Rapid Recovery
      • Data Protection
        • Foglight for Virtualization
        • NetVault
        • NetVault for Office 365
        • QorePortal
        • QoreStor
        • Rapid Recovery
        • vRanger
      • Database Management
        • Foglight for Databases
        • Litespeed for SQL Server
        • SharePlex
        • Spotlight SQL Server Enterprise
        • Toad Data Point
        • Toad DevOps Toolkit
        • Toad Edge
        • Toad for Oracle
        • Toad for SQL Server
      • Identity & Access Management
        • Active Roles
        • Defender
        • Identity Manager
        • Identity Manager Data Governance
        • One Identity Safeguard
        • Password Manager
        • Privileged Access Suite for Unix
        • Starling Connect
        • Starling Two-Factor Authentication
        • syslog-ng
      • Microsoft Platform Management
        • Active Administrator
        • Change Auditor
        • Enterprise Reporter
        • GPOADmin
        • InTrust
        • Metalogix
        • Migration Manager
        • On Demand Migration for Email
        • Quest On Demand
        • Recovery Manager
      • Performance Monitoring
        • Foglight Capacity Director
        • Foglight Hybrid Cloud Manager
        • Foglight for Databases
        • Foglight for Operating Systems
        • Foglight for Oracle
        • Foglight for PostgreSQL
        • Foglight for SQL Server
        • Foglight for Storage Management
        • Foglight for Virtualization
        • Spotlight on SQL Server
      • Unified Endpoint Management
        • Desktop Authority Management Suite
        • KACE Cloud Mobile Device Manager
        • KACE Desktop Authority
        • KACE Privilege Manager
        • KACE Systems Deployment Appliance
        • KACE Systems Management Appliance
        • RemoteScan
  • Solutions
    • View all Solutions
    • Industries
      • Education
      • Energy
      • Federal Government
      • Financial Services
      • Healthcare
      • State & Local Government
    • Platforms
      • Active Directory
      • Cisco
      • DB2
      • Exchange
      • Google
      • Hyper-v
      • Lotus Notes
      • OneDrive for Business
      • Office 365
      • Oracle
      • SAP/Sybase
      • SharePoint
      • SQL Server
      • Teams
      • Unix/Linux
      • VMware
      • Windows Server
    • Cloud Management
    • Data Protection
      • Overview
      • Backup & Recovery
      • Cloud Management
      • Deduplication & Compression
      • Disaster Recovery
      • Office 365 Data Protection
      • Virtualization Management
    • Database Management
      • Overview
      • Administration
      • Cloud Migration
      • Data Preparation and Provisioning
      • Development
      • DevOps
      • Performance Monitoring
      • Replication
      • Supported Platforms
        • IBM DB2
        • MySQL
        • Oracle
        • PostgreSQL
        • SAP Solutions
        • SQL Server
    • GDPR Compliance
    • Identity & Access Management
      • Overview
      • Identity Administration
      • Identity Governance
      • Privileged Access Management
      • AD Account Lifecycle Management
      • Access Control
      • Cloud
      • Log Management
    • Microsoft Platform Management
      • Overview
      • Mergers & Acquisitions
      • Migration & Consolidation
      • Office 365 Migration & Management
      • Security & Compliance
      • Windows Backup & Recovery
      • Supported Platforms
        • Active Directory
        • Cisco
        • Exchange
        • Google
        • Groupwise
        • Lotus Notes
        • Office 365
        • OneDrive for Business
        • SharePoint
        • SQL Server
        • Teams
        • Unix/Linux
        • Windows Server
    • Performance Monitoring
      • Overview
      • Database Performance Monitoring
      • Operating System Monitoring
      • Storage Performance & Utilization Management
      • Supported Platforms
        • Active Directory
        • DB2
        • Exchange
        • Java
        • Hyper-V
        • .NET
        • Oracle
        • SAP/Sybase
        • Storage
        • SQL Server
        • VMware
    • Unified Endpoint Management
      • Overview
      • Endpoint Compliance
      • Endpoint Security
      • Endpoint Visibility
      • Industries
        • Education
        • Healthcare
      • Supported Platforms
        • Internet of things
        • Microsoft® Windows
        • MAC
        • UNIX/LinuX
  • Resources
    • Blogs
      • Data Protection
      • Database Management
      • IT industry Insights
      • IT Ninja
      • Microsoft Platform Management
      • Performance Monitoring
      • Toad World Blog
      • Unified Endpoint Management
    • Customer Stories
    • Documents
    • Events
    • Webcasts
    • Technical Documentation
    • Videos
    • Whitepapers
  • 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
    • Partner Community
  • Blogs
    • IT Industry Insights
    • Quest Solution Blogs
      • Data Protection
      • Database Management
      • ITNinja
      • Microsoft Platform Management
      • Performance Monitoring
      • Toad World Blog
      • Unified Endpoint Management
  • Forums
  • 製品情報
    • すべての製品情報を見る
    • 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%83%BCス
    • マイアカウント
      • マイ プロダクト
      • Myサービスリクエスト
      • マイ ライセンス
      • マイ グループ
      • マイ プロファイル
    • ポリシーおよび手順
    • コンサルティングサービス
      • Microsoftプラットフォーム管理
      • データ保護
      • 統合エンドポイント管理
      • パフォーマンス監視
      • データベース管理
    • リリースノートおよびガイド
    • 教育サービス
    • ビデオチュートリアル
  • トライアル
  • パートナー
    • 概要
    • Partner Circleへのログイン
    • パートナーになる
    • Find a Partner
    • パートナーコミュニティ
  • コミュニティ
Quest Community
Quest Community
  • Site
  • User
  • Site
  • Search
  • User
Foglight
Foglight
Foglight Administrators Adventures in Agent Creation - Part 3
  • 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
    • 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
    • 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
  • (iNdOrE) && (GwAlIoR) +91-9915786526 ##LoVe Marriage Specialist Pandit ji kota
  • 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
  • Memory Utilization for all processes over X months
  • NetMonitor - Quick How-To Guide
  • 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

Adventures in Agent Creation - Part 3

This blog is a continuation of Adventures in Agent Creation - Part 2
In my previous installment, I introduced the concept of creating a high-performance collector for Foglight to gather Windows system counters. I would like to expand on that introduction now by diving deeper into the code.
First, a little background; Foglight has two methods of absorbing new data beyond the agents that come out of the box. These two mechanisms are SDK agents and script agents. A script agent is a special type of agent that can be written in any language but must produce a structured output to STDIO. Script agents provide amazing flexibility when consuming new data. Data generated by script agents can be used in a variety of ways including rules, metrics, dashboards, and other Foglight components.
Script agents themselves come in two flavors; a type one script agent essentially executes once and terminates, whereas a type two script agent continues to execute until some internal condition causes it to self-terminate. The interval at which either script agent executes is controlled by the Foglight Agent Manager for the platform on which the agent runs.
This subject of this article is a type two script agent.
In preparing this article and in designing the code I wanted to get it right by including only metrics essential to understanding web site performance. I used as boilerplate Microsoft’s own guide to improving web performance. “Improving .NET Application Performance and Scalability” proved to be an excellent handbook in deciding which counters were key to understanding how to measure performance.
Figure 1 – program main
Earlier versions of my agent suffered terribly from poor collection performance primarily due to excessive recursion. For this version I was determined to reduce recursion to an absolute minimum.
I ultimately achieved the desired level of performance by doing a kind of “counter look up” only once and in advance of beginning collection – at agent instantiation. This query in advance was necessary because I could not guarantee that any given target would have on it the desired counters published, nor could I guarantee the number of instances (applications) that I would be collecting.
Figure two shows an abbreviated list of the counters that we will be collecting.
Figure 2 – Counters
Armed with a list of counters, the agent begins by comparing this list to counters published on the target. This is accomplished by first building three data tables within a dataset; one for categories, one for instances, and one for filters (counters). Referential relationships are then built between the three tables.
Once the dataset is built, I iterate through the list of categories and counters – adding only those counters from the list published and active on the target.
Figure 3 – Building a dataset of counters
There is, of course, a delay in producing the dataset as I look for all counters on my list. But this hit is only once at start up. In this way we avoid looking up counters at runtime that do not exist. The advantage to this approach is that I incur my “cost” once during instantiation. The disadvantage is that I must restart the agent if a new counter is published.
At this point the dataset is completely built and we enter the working portion of our code – the do-while loop.
The loop begins by getting the current data values for each counter within the dataset. This is accomplished by using LINQ expressions to query the dataset for category and counter names instead of using recursion – saving a ton of time in the process. As we’ve already validated the counter’s existence prior to entering the loop we eliminate the need to do a lot of conditional management.
All we have to do now is create a new instance of the counter and sample data from the target.
Figure 4 – Reading the dataset
Output from the LINQ queries are added to a forth table in the dataset, and a dataset is returned.
Finally, the dataset is passed into a routine that will output the contents of the newly-created table containing sampled values in a format that Foglight expects.
The agent code compiles into an executable and using this method improved throughput tremendously. Next I will take you through incorporating this agent into Foglight.

Integrating the script into Foglight

Foglight provides a convenient mechanism to upload scripts and create agents that can be centrally controlled using Foglight administration. Under Administration -> Tooling, click Build Script Agent. Then simply point to the agent you wish to upload.
Figure 5 – Foglight Build Script Agent
Lastly, in Administration -> Agents -> Agent Status you can first deploy the newly created agent to your target, and then create a new instance of the agent using “Create Agent”.

In the final installment of this series, I will create a new dashboard using the data now collected from our counter agent.

  • Foglight Administration
  • foglight build script agent
  • build a dataset of counters
  • iis counter definition
  • counters
  • dataset
  • 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
  • © 2023 Quest Software Inc. ALL RIGHTS RESERVED.
  • Legal
  • Terms of Use
  • Privacy
  • Community Feedback & Support
  • Cookie Preference Center
  • 会社名
    • 会社情報
    • 購入
    • お問い合わせ
    • 採用情報
    • ニュース
  • リソース
    • ブログ
    • お客様の事例
    • ドキュメント
    • イベント
    • ビデオ
  • サポート
    • プロフェッショナルサービス
    • サポートの更新
    • テクニカルサポート
    • トレーニングと認定資格
    • サポートサービス
  • ソーシャルネットワーク
    • Facebook
    • Instagram
    • LinkedIn
    • Twitter
    • YouTube
  • © 2023 Quest Software Inc. ALL RIGHTS RESERVED.
  • 「法務」
  • ご利用規約
  • 個人情報保護方針
  • コミュニティのフィードバックとサポート