# Online Monitoring

Flopsar allows you to observe your application data processing online. This feature is disabled by default and you need to enable it first. You can do this by selecting [`MONITORING`](/3.0/user-guide/online-monitoring.md#settings) tab in the Preferences window.

## Settings

In order to enable the monitoring feature, you need to toggle on `Online monitoring enabled` switch. The online monitoring has a notification feature, which is turned on by default. The notification is an audible bell, which is fired whenever certain conditions are fulfilled. You can either use a default alarm sound or use your own. In order to use a custom alarm sound, click the `Browse...` button and select a file with the sound. You can then check your sound by clicking the speaker button. If you do not intend to use an audible alarm, you can turn it off by unselecting the `Enable` option. If you do so, only the visual notification will be used.

![Monitoring Settings](/files/-LwrxjnXrVQN15DdUrz_)

You can define multiple online views by clicking green `+` button on the list above. If you want to open a view, you just need to double click the desired view record.

## Online View

![Online View](/files/-LwryCY2zjTmcFhc_afD)

Basically, this view presents methods execution time for the last 10 minutes and it is updated every 3 seconds. The view is divided into four sections. The top section contains three curve graphs, which represents the following metrics:

* `cyan graph` : total number of collected root calls,
* `orange graph` : current number of threads,
* `pink graph` : number of thrown exceptions, propagated to root calls.&#x20;

The other three stack area graphs represent the number of incomplete root calls. Each graph corresponds to a user-customizable duration level. The graphs are scaled with respect to their maximum value. There are three levels:

* `green` : number of root calls, which duration is not greater than `LEVEL 0` value,
* `yellow` : number of root calls, which duration is greater than `LEVEL 0` value and less than `LEVEL 1`,
* `red` : number of root calls, which duration is greater than `LEVEL 1` value.

{% hint style="info" %}
Please note, at least one method call from a root call must end and be sent to the server so that Flopsar can report the root call current execution time.
{% endhint %}

You can customize each online view settings by clicking [`SETTINGS`](/3.0/user-guide/online-monitoring.md#settings-1) item in the context menu.&#x20;

### Top Grid Bar

![Top Grid Bar](/files/-M3v-XVAwyLA3KbVUl2V)

There is a grid bar at the top of the online view. Each grid cell has a color, which corresponds to one of the levels. The cell color depends on the level that has the biggest number of root calls.

### Context Menu

The online view has a context menu, which provides several actions.

![Online View Context Menu](/files/-LzrXF3MPMbbC9H0K14A)

| Menu Item          | Description                                                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------ |
| *Details...*       | This action will display a [detailed data view](/3.0/user-guide/online-monitoring.md#online-view-details) of each agent. |
| *Settings...*      | This action will bring up the online view settings pane.                                                                 |
| *Save image as...* | This action will export the online view to an image and save it to a selected file.                                      |

### Online View Details

This view presents a table of all currently monitored agents.&#x20;

![Online View Details](/files/-LzrXegkdyVzoHW0_AE0)

The table contains the following columns:

* `AGENT` : agent name,
* `THREADS COUNT` : total number of threads running in the corresponding JVM,
* `LOAD` : current total number of methods calls,
* `EXCEPTIONS LOAD` : current total number of exceptions,
* `LEVEL COUNT` : total number of methods calls per `LEVEL`.&#x20;

### Options

In this view, you can change some online view settings. In order to change the window title, you need to update `WINDOW TITLE` text field. To change background and grid color, click the color picker to choose a color. You can also specify values for `LEVEL 0` and `LEVEL 1`.&#x20;

{% hint style="info" %}
`LEVEL 0` value cannot be less than 3 seconds.&#x20;
{% endhint %}

In `ALARM` section you can define two rules, which manage when the alarm should go off. If you disable the audible alarm in the Preferences window, the alarm will be only visual.

![Online Options](/files/-LycUOhO9liCLoUJH7s2)

In order to delete the window, just click `DELETE` button.&#x20;

### Agents

In the AGENTS tab, you have a list of all available agents to monitor. In order to add an agent, just select a check box next to the agent. There is also an icon at the end of agents records. If you click the icon, you will get a [threads dump](/3.0/user-guide/online-monitoring.md#threads-dump) from the corresponding JVM. Note, the agent must be connected to your server to be able to retrieve the dump.

![Agents List](/files/-LzrWqtBnAu5PnfnUdsd)

## Threads Dump

This query retrieves a threads dump from the selected agent. The result header contains the following metrics:

* `STARTED` : total number of threads created and also started since the JVM started,
* `PEAK` : peak live thread count since the JVM started,
* `TOTAL` : total number of threads,
* `DAEMON` : current number of live daemon threads.

![Exemplary Thread Dump](/files/-LyYV-OVaKPXEvVJJRu2)


---

# Agent Instructions: 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:

```
GET https://docs.flopsar.com/3.0/user-guide/online-monitoring.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
