> For the complete documentation index, see [llms.txt](https://docs.lithnet.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lithnet.io/okta-ma/administration/logging-and-monitoring.md).

# Logging and monitoring

Where the management agent records what it did, and what to watch in production.

There are three places to look when something goes wrong, and you'll usually need more than one of them:

* **MIM run history** for the run result, object counts, and per-object errors
* **The management agent log** for what the connector was doing at the time
* **The Windows Application event log** for warnings and errors worth alerting on

Start with the run history error, then match its time against the management agent log.

## Management agent log

The path, level, and retention are set on the Connectivity page. The file rolls daily, and **Number of days to retain logs** controls how many daily files are kept.

Levels are `Trace`, `Debug`, `Info`, `Warn`, `Error`, and `Fatal`. Run at the `Info` level for day-to-day use, and drop to `Debug` or `Trace` only while reproducing a problem.

Timestamps are the MIM server's local time. The MIM Synchronization Service account must be able to create and append to the file.

## Reading import diagnostics

At `Info` level an import records, for each object type, how many objects Okta returned, how long the enumeration took, the processing concurrency, and how long any factor or membership requests took.

This split is what lets you diagnose a slow import. A long enumeration time with fast processing points to Okta or rate limiting, while fast enumeration with long processing points to the per-object work, which in practice means the factor or membership attributes.

When those attributes are selected, the log also records the number of extra requests made, the values returned, any failures, and the elapsed time. Read those figures before you touch page sizes or concurrency in [Advanced settings](/okta-ma/administration/advanced-settings.md).

One number regularly causes confusion: MIM reports a single imported-object count that covers every selected object type, so an import of 52 users and 52 groups reports 104. The management agent log records the two counts separately.

## Windows event log

Warnings and errors are written to the **Application** log with the source:

```
Lithnet Okta MA
```

## What to monitor

* Failed run profiles
* An import that returns zero objects when it should not
* Import and export error counts
* Run durations drifting upwards
* Okta rate-limit errors
* Log file growth, and failures to write the log
* API token validity, or changes to the OAuth app
* Certificate expiry, if you use X.509 authentication
* That the scheduled full import is actually completing


---

# 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.lithnet.io/okta-ma/administration/logging-and-monitoring.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.
