# Metrics

NetObserv SNMP exposes the `/metrics` endpoint to provide Prometheus-compatible statistics related to its performance and the resources it uses.

The endpoint returns data in a Prometheus text-based exposition format. Please refer to the [Prometheus documentation](https://prometheus.io/docs/introduction/overview) to learn more.

### Information

This section describes the information metrics that can be retrieved from the `/metrics` endpoint.

#### app\_info

`app_info` provides application details. The following is an example of an `app_info` record:

```shell
app_info{arch="arm64",cpus="8",env="native",hostname="M1-MacBook-Pro.local",os="darwin",run_id="b1214e11-198f-43e7-81f1-c9986e9b3ff7",version="7.5"} 1
```

The `app_info` data provides the following labels:

| Label           | Description                          |
| --------------- | ------------------------------------ |
| `arch`          | environment running application      |
| `cpus`          | number of cpus available             |
| `env`           | native install or Docker             |
| `hostname`      | name of machine                      |
| `instance_name` | name of the collector instance       |
| `os`            | operating system running application |
| `run_id`        | run id of application                |
| `version`       | version of the collector             |

#### license\_info

`license_info` provides license details. The following is an example of a `license_info` record:

```shell
license_info{account_id="account_id",application="snmpcoll",expiration="1772150400",instance_name="default",level="7"} 1
```

The `license_info` record provides the following labels:

| Label           | Description                         |
| --------------- | ----------------------------------- |
| `account_id`    | account id of license               |
| `application`   | name of the application             |
| `expiration`    | license expiration date (unix time) |
| `instance_name` | name of the collector instance      |
| `level`         | license level.                      |

#### license\_telemetry\_hosts

`license_telemetry_hosts` provides the maximum number of SNMP devices that can be polled according to the license and configurations. The following is an example of a `license_telemetry_hosts` record:

```shell
license_telemetry_hosts{application="snmpcoll",instance_name="default"} 100
```

The `license_telemetry_hosts` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |

#### license\_telemetry\_objects

`license_telemetry_objects` provides the maximum number of SNMP objects that can be polled according to the license and configurations. The following is an example of a `license_telemetry_objects` record:

```shell
license_telemetry_objects{application="snmpcoll",instance_name="default"} 1000
```

The `license_telemetry_objects` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |

### Polling

The following metrics are provided by the device poller.

#### snmp\_input\_poll\_total

`snmp_input_poll_total` provides the total count of device polls.

```shell
snmp_input_poll_total{application="snmpcoll",instance_name="default",poll_type="get"} 1
```

The `snmp_input_poll_total` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |
| `poll_type`     | SNMP poll operation type       |

#### snmp\_input\_poll\_err\_total

`snmp_input_poll_err_total` provides the total count of device poll errors.

```shell
snmp_input_poll_err_total{application="snmpcoll",instance_name="default",err="GenErr"} 1
```

The `snmp_input_poll_err_total` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |
| `err`           | SNMP poll error                |

#### snmp\_input\_devices\_scheduled\_total

`snmp_input_devices_scheduled_total` provides the total count of devices that are currently scheduled to be polled.

```shell
snmp_input_devices_scheduled_total{application="snmpcoll",instance_name="default"} 1
```

The `snmp_input_devices_scheduled_total` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |

#### snmp\_input\_objects\_scheduled\_total

`snmp_input_objects_scheduled_total` provides the total count of objects that are currently scheduled to be polled.

```shell
snmp_input_objects_scheduled_total{application="snmpcoll",instance_name="default"} 2
```

The `snmp_input_objects_scheduled_total` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |

### Processing

The following metrics are provided by the record processor.

#### snmp\_processor\_records\_total

`snmp_processor_records_total` provides the total count of records processed.

```shell
snmp_processor_records_total{application="snmpcoll",instance_name="default"} 2
```

The `snmp_processor_records_total` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |

#### snmp\_processor\_records\_err\_total

`snmp_processor_records_err_total` provides the total count of records that errored during processing.

```shell
snmp_processor_records_err_total{application="snmpcoll",instance_name="default"} 0
```

The `snmp_processor_records_err_total` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |

#### snmp\_processor\_record\_queue\_util

`snmp_processor_record_queue_util` provides the record queue size to capacity ratio (queue utilization).

```shell
snmp_processor_record_queue_util{application="snmpcoll",instance_name="default"} 0
```

The `snmp_processor_record_queue_util` record provides the following labels:

| Label           | Description                    |
| --------------- | ------------------------------ |
| `application`   | name of the application        |
| `instance_name` | name of the collector instance |


---

# 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.elastiflow.com/snmpcoll/api-reference-overview/metrics.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.
