> For the complete documentation index, see [llms.txt](https://docs.patchmypc.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patchmypc.com/patch-my-pc-insights/advanced-insights-log-collector.md).

# Advanced Insights Log Collector

*Applies to: Patch My PC Advanced Insights*

Sometimes we need you to provide log files, including information about your Advanced Insights instance. We have two ways for you to collect logs, either that the Advanced Insights Application or by manually running the logs collector on the server.&#x20;

### Via Advanced Insights

{% hint style="info" %}
This functionality was introduced in version 2.6.3. If you do not see it, please upgrade to a later version of the application.&#x20;
{% endhint %}

{% hint style="warning" %}
If you run Advanced Insights with a different user other than the default Local System, you may encounter issues with generating logs based on the privileges the account has.&#x20;
{% endhint %}

To collect logs via Advanced Insights, as the Admin or a user with Admin privileges, navigate to Administration -> Settings.&#x20;

You will see on the first tab, at the bottom there is a button to "Export Debug File". Click the button, there will a wait whilst logs are collected. Once the logs are collected, a download will be initiated with a zip containing all the logs required. If for any reason this fails or you receive no download, please try the server approach outlined below.&#x20;

<figure><img src="/files/WlTjzOVTTqHEQoUpfqBG" alt=""><figcaption></figcaption></figure>

### Via Server hosting Advanced Insights

{% hint style="info" %}
**Note**

The Advanced Insights Log Collector is located at:

*`%Advanced Insights Install Directory%`*`\Api\LogCollector\AdvancedInsightsLogDiag.exe`

For example:

`C:\Program Files (x86)\Advanced Insights\Api\LogCollector\AdvancedInsightsLogDiag.exe` <br>

You can also specify the output directory as well, using the -o parameter

For example:

`C:\Program Files (x86)\Advanced Insights\Api\LogCollector\AdvancedInsightsLogDiag.exe -o "C:\Temp"`&#x20;
{% endhint %}

{% hint style="info" %}
The Log Collector can be executed manually and is also used within the Advanced Insights installer. Once the log collection process is completed, a zip file is created on the desktop (or location specified with the -o parameter) called:

**AdvancedInsights\_Diag\_xxxxxxxx\_xxxxxx.zip**

This ZIP should be shared with Patch My PC technical support.

*Example output:*
{% endhint %}

<figure><img src="/files/MNSW21fGoDQf8yzZ01fu" alt=""><figcaption><p>Advanced Insights log collection output.</p></figcaption></figure>

**This page provides details about what information the AdvancedInsightsLogDiag.exe collects.**

### Advanced Insights data and installation logs

The contents of the following directory are collected, which consist of the 'AdvancedInsightsApi.log' and any 'AdvInsights\_Verx.x.x.zip' installer logs.

C:\ProgramData\AdvancedInsights\Logs

<figure><img src="/files/UkrUpd9ebVYK7FbUFMy7" alt=""><figcaption><p>Advanced Insights default logging directory</p></figcaption></figure>

### Windows Application Event Log

The Windows Application Event log data is collected and output into 'Application\_EventLog.log' with a filter applied for the following event sources:

* ".NET Runtime"&#x20;
* "Advanced Insights"
* "MsiInstaller" - if required to diagnose install problems, the filter will include&#x20;

### Advanced Insights SQLite db

The 'ConfigManagerLocation' and 'ConfigManagerDatabase' value are collected from the Advanced Insights SQLite database file located at:

**'C:\ProgramData\AdvancedInsights\Data\Api\AdvancedInsightsConfig.db'**

### SQL Server information

The following information is queried from the SQL Server instance where the Configuration Manager database is located:\
\
**SQL Master db:**

* Configuration Manager database name
* &#x20;Configuration Manager databaste state (ONLINE/OFFLINE)
* Configuration Manager database compatibility level
* Configuration Manager database .mdf file path
* Configuration Manager database file size
* Configuration Manager database log file .ldf path
* Configuration Manager database log file size
* SQL Server version
* SQL Server Product Level
* SQL Server Edition
* SQL Server Engine Edition
* SQL Server Product build
* SQL Server Product Major version
* SQL Server Product minor version
* SQL Server Product update version
* SQL Server Installed updates
* SQL Server remote query timeout value
* SQL Server maximum degree of parallelism value
* SQL Server Minimum size of server memory (MB)
* SQL Server Maximum size of server memory (MB)

**Configuration Manager SQL database:**

* Advanced Insights Inventory Extensions class names and data counts.
* Advanced Insights Inventory Extensions Configuration Manager application information. For    example 'Name', 'created date', 'version', 'number of deployments'.
* Configuration Manager database level SQL configured properties:
  * MAXDOP
  * LEGACY\_CARDINALITY\_ESTIMATION
  * PARAMETER\_SNIFFING
  * QUERY\_OPTIMIZER\_HOTFIXES
* TempDB database configuration and file setup

**Performance**

* Execution Statistics for PMPC queries - stored in the file CM\_SQL\_query\_output.json

### Windows Server IIS information

* Information related to the Advanced Insights IIS websites and application pools are collected.
* Advanced Insights Api
* Advanced Insights Frontend
* Website name
* HTTPS bindings included the current SSL certificate properties

### Windows Server information

* The version of Advanced Insight currently installed.
* The install date of Advanced Insights.
* The install path of Advanced Insights.
* The install source of Advanced Insights.
* Server CPU properties.
* Installed Server RAM
* Server disks including total size and free space
* Windows OS version
* Check for Server pending restart.
* List Windows updates installed in the last 30 days.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.patchmypc.com/patch-my-pc-insights/advanced-insights-log-collector.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
