- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
We are running Australia, and I'm running discovery on Windows servers with a running instance of IIS and the IIS discovery pattern runs but it doesn't look like the IIS Virtual Directory discovery pattern despite the fact many IIS Virtual directory CIs are created. Should I see the IIS Virtual Directory in the logs?
I'm asking because I'm looking at creating tags using data from web.config or appsettings.json files and it seems to be the best place to create an extension for that purpose is in the IIS Virtual Directory discovery pattern.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sebastienla :
- Child/Extension Evaluation: The IIS Virtual Directory pattern is executed as a dependent/child patternor during the extension/inclusion steps of the main IIS pattern. The primary Discovery status log only displays main top-level triggers (Windows OS - Servers, IIS web server process classification).
- Execution Context: Child pattern execution logs are nested inside the main IIS pattern log. When you click "Press Here" next to Exploring CI Pattern, Pattern name: IIS in the Discovery Log, you can see the sub-steps where virtual directories are queried via WMI/PowerShell/APPCMD and mapped.
1. Use a Pattern Extension on the Parent IIS Pattern
- Open Pattern Designer $\rightarrow$ Discovery Patterns.
- Select IIS (or IIS Virtual Directory).
- Create an Extension Section rather than modifying OOTB Identification sections. This keeps your customizations upgrade-safe across platform releases.
2. Pattern Logic Workflow
- Get Directory Paths: Leverage the existing temporary tables populated by the IIS pattern execution (such as $iis_web_site or $iis_virtual_directory) where physical file paths are gathered.
- Fetch Config Files: Use a Get File or Parse File operation (or run PowerShell Get-Content / WMI commands via Command operation) to retrieve web.config or appsettings.json from those paths.
- Parse & Transform: Use standard JSON/XML parsing steps within Pattern Designer to isolate key/value pairs needed for tagging.
- Populate CI Attributes or Key-Value Custom Tables: you canMap the parsed properties directly to CI fields or into the cmdb_key_value table if using ServiceNow Tagging framework.
3. Performance & Security Safeguards
- File Size Guardrails: Constrain Get File operations to specific directory depths or maximum file sizes to prevent Discovery mid-server timeouts on large IIS web root directories.
- Credential Permissions: I would ensure the Discovery user running the pattern has local administrative or sufficient file-read rights on the targeted Windows servers to parse web.config files.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @sebastienla :
- Child/Extension Evaluation: The IIS Virtual Directory pattern is executed as a dependent/child patternor during the extension/inclusion steps of the main IIS pattern. The primary Discovery status log only displays main top-level triggers (Windows OS - Servers, IIS web server process classification).
- Execution Context: Child pattern execution logs are nested inside the main IIS pattern log. When you click "Press Here" next to Exploring CI Pattern, Pattern name: IIS in the Discovery Log, you can see the sub-steps where virtual directories are queried via WMI/PowerShell/APPCMD and mapped.
1. Use a Pattern Extension on the Parent IIS Pattern
- Open Pattern Designer $\rightarrow$ Discovery Patterns.
- Select IIS (or IIS Virtual Directory).
- Create an Extension Section rather than modifying OOTB Identification sections. This keeps your customizations upgrade-safe across platform releases.
2. Pattern Logic Workflow
- Get Directory Paths: Leverage the existing temporary tables populated by the IIS pattern execution (such as $iis_web_site or $iis_virtual_directory) where physical file paths are gathered.
- Fetch Config Files: Use a Get File or Parse File operation (or run PowerShell Get-Content / WMI commands via Command operation) to retrieve web.config or appsettings.json from those paths.
- Parse & Transform: Use standard JSON/XML parsing steps within Pattern Designer to isolate key/value pairs needed for tagging.
- Populate CI Attributes or Key-Value Custom Tables: you canMap the parsed properties directly to CI fields or into the cmdb_key_value table if using ServiceNow Tagging framework.
3. Performance & Security Safeguards
- File Size Guardrails: Constrain Get File operations to specific directory depths or maximum file sizes to prevent Discovery mid-server timeouts on large IIS web root directories.
- Credential Permissions: I would ensure the Discovery user running the pattern has local administrative or sufficient file-read rights on the targeted Windows servers to parse web.config files.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Here's what I have in the IIS Pattern log. I don't see anything about a child discovery pattern being run, by chance, do you have an example you can share?
