---
title: Sonatype Nexus
description: Gain insights into Sonatype Nexus analytics and instance health data.
breadcrumbs: Docs > Integrations > Sonatype Nexus
---

# Sonatype Nexus
Supported OS Integration version2.3.0   Sonatype Nexus Instance HealthSonatype Nexus MetricsSonatype Nexus Metrics
## Overview{% #overview %}

Sonatype Nexus is a popular repository management solution designed for managing software components and dependencies across the entire software development lifecycle. It supports a wide range of development languages and formats, making it a central hub for DevOps and continuous integration/continuous delivery (CI/CD) pipelines.

The Sonatype Nexus integration collects analytics and instance health status metrics from Sonatype Nexus and sends them to Datadog for comprehensive analysis.

**Minimum Agent version:** 7.64.0

## Setup{% #setup %}

### Installation{% #installation %}

The Sonatype Nexus check is included in the [Datadog Agent package](https://app.datadoghq.com/account/settings/agent/latest). No additional installation is necessary.

### Get API credentials from Sonatype Nexus{% #get-api-credentials-from-sonatype-nexus %}

1. The `Username` and `Password` of either the **Administrator** account or a user with the **nx-metrics-all** privilege

1. The `Server URL` of the Repository instance (for example, https://123.123.123.123:8081)

### Connect your Sonatype Nexus account to the agent{% #connect-your-sonatype-nexus-account-to-the-agent %}

1. Copy the `conf.yaml.example` file.

   ```sh
   cp /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml.example /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml
   ```

1. Edit the `/etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml` file. Add the following configurations.

   ```yaml
   instances:
   
       ## @param username - string - required
       ## Username of Sonatype Nexus instance
       #
     - username: <SONATYPE_NEXUS_USERNAME>
   
       ## @param password - string - required
       ## Password of Sonatype Nexus instance
       #
       password: <SONATYPE_NEXUS_PASSWORD>
   
       ## @param server_url - string - required
       ## Sonatype Nexus server url
       #
       server_url: <SONATYPE_NEXUS_SERVER_URL>
   
       ## @param min_collection_interval - number - required
       ## This changes the collection interval of the check. For more information, see:
       ## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval
       #
       min_collection_interval: 600
   ```

- Example for the `conf.yaml` when multiple instances of Sonatype Nexus are configured:

  ```yaml
  instances:
    - min_collection_interval: 1800
      username: <SONATYPE_NEXUS_USERNAME>
      password: <SONATYPE_NEXUS_PASSWORD>
      server_url: <SONATYPE_NEXUS_SERVER_URL>
    - min_collection_interval: 1800
      username: <SONATYPE_NEXUS_USERNAME>
      password: <SONATYPE_NEXUS_PASSWORD>
      server_url: <SONATYPE_NEXUS_SERVER_URL>
  ```
[Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands.md?tab=agentv6v7#start-stop-and-restart-the-agent).
### Validation{% #validation %}

- [Run the Agent's status subcommand](https://docs.datadoghq.com/agent/guide/agent-commands.md#agent-status-and-information) and look for `sonatype_nexus` under the Checks section.

## Data Collected{% #data-collected %}

### Logs{% #logs %}

The Sonatype Nexus integration does not include any logs.

### Metrics{% #metrics %}

|  |
|  |
| **sonatype\_nexus.analytics.available\_cpus**(gauge)                                            | Available CPUs for the sonatype nexus instance            |
| **sonatype\_nexus.analytics.blob\_store.blobcount\_by\_type**(gauge)                            | Blobstore blobs count by type                             |
| **sonatype\_nexus.analytics.blob\_store.count\_by\_type**(gauge)                                | Blobstore count by type                                   |
| **sonatype\_nexus.analytics.blob\_store.size\_by\_type**(gauge)                                 | Blobstore size by type                                    |
| **sonatype\_nexus.analytics.cleanup\_dry\_run\_avg\_execution\_time**(gauge)                    | Cleanup dry runs average execution time                   |
| **sonatype\_nexus.analytics.cleanup\_dry\_run\_count**(gauge)                                   | Count of cleanup dry runs                                 |
| **sonatype\_nexus.analytics.component\_total\_count**(gauge)                                    | Count of components                                       |
| **sonatype\_nexus.analytics.downloaded\_bytes\_by\_format**(gauge)                              | Downloaded bytes by format                                |
| **sonatype\_nexus.analytics.failed\_unique\_user\_authentication\_count**(gauge)                | Count of failed unique user authentications               |
| **sonatype\_nexus.analytics.gc.g1\_old\_generation\_count**(gauge)                              | Count of jvm garbage collection (G1 old generation)       |
| **sonatype\_nexus.analytics.gc.g1\_old\_generation\_time**(gauge)                               | Time of jvm garbage collection (G1 old generation)        |
| **sonatype\_nexus.analytics.gc.g1\_young\_generation\_count**(gauge)                            | Count of jvm garbage collection (G1 young generation)     |
| **sonatype\_nexus.analytics.gc.g1\_young\_generation\_time**(gauge)                             | Time of jvm garbage collection (G1 young generation)      |
| **sonatype\_nexus.analytics.jvm.heap\_memory\_max**(gauge)                                      | Maximum jvm heap memory                                   |
| **sonatype\_nexus.analytics.jvm.heap\_memory\_used**(gauge)                                     | Used jvm heap memory                                      |
| **sonatype\_nexus.analytics.log4j\_visualizer\_non\_vulnerable\_daily\_download\_count**(gauge) | Count of non-vulnerable daily downloads                   |
| **sonatype\_nexus.analytics.log4j\_visualizer\_vulnerable\_daily\_download\_count**(gauge)      | Count of vulnerable daily downloads                       |
| **sonatype\_nexus.analytics.repository\_asset\_count\_by\_format\_type**(gauge)                 | Count of repository assets by format and type             |
| **sonatype\_nexus.analytics.repository\_count\_by\_format\_type**(gauge)                        | Count of repositories by type                             |
| **sonatype\_nexus.analytics.repository\_total\_count**(gauge)                                   | Total count of repositories                               |
| **sonatype\_nexus.analytics.successful\_unique\_user\_authentication\_count**(gauge)            | Count of successful unique user authentications           |
| **sonatype\_nexus.analytics.total\_memory**(gauge)                                              | Total memory for the sonatype nexus instance              |
| **sonatype\_nexus.analytics.unique\_users\_count**(gauge)                                       | Count of Unique Users                                     |
| **sonatype\_nexus.analytics.uploaded\_bytes\_by\_format**(gauge)                                | Uploaded bytes by the format                              |
| **sonatype\_nexus.analytics.uptime**(gauge)                                                     | Uptime of the sonatype nexus instance                     |
| **sonatype\_nexus.status.NuGet\_V2\_repositories\_health**(gauge)                               | Status of the health of the NuGet V2 repositories         |
| **sonatype\_nexus.status.available\_cpus\_health**(gauge)                                       | Status of the health of the available CPUs                |
| **sonatype\_nexus.status.blob\_store.file\_path\_health**(gauge)                                | Status of the health of the File Blob Stores Path         |
| **sonatype\_nexus.status.blob\_store.quota\_health**(gauge)                                     | Status of the health of the Blob Stores Quota             |
| **sonatype\_nexus.status.blob\_store.ready\_health**(gauge)                                     | Status of the health of the Blob Stores Ready             |
| **sonatype\_nexus.status.coordinate\_content\_selectors\_health**(gauge)                        | Status of the health of the Coordinate Content Selectors  |
| **sonatype\_nexus.status.default\_admin\_credentials\_health**(gauge)                           | Status of the health of the Default Admin Credentials     |
| **sonatype\_nexus.status.default\_role\_realm\_health**(gauge)                                  | Status of the health of the DefaultRoleRealm              |
| **sonatype\_nexus.status.default\_secret\_encryption\_key\_health**(gauge)                      | Status of the health of the Default Secret Encryption Key |
| **sonatype\_nexus.status.file\_descriptors\_health**(gauge)                                     | Status of the health of the File Descriptors              |
| **sonatype\_nexus.status.lifecycle\_phase\_health**(gauge)                                      | Status of the health of the Lifecycle Phase               |
| **sonatype\_nexus.status.re\_encryption\_required\_health**(gauge)                              | Status of the health of the Re-encryption required        |
| **sonatype\_nexus.status.read\_only\_detector\_health**(gauge)                                  | Status of the health of the Read-Only Detector            |
| **sonatype\_nexus.status.scheduler\_health**(gauge)                                             | Status of the health of the Scheduler                     |
| **sonatype\_nexus.status.scripting\_health**(gauge)                                             | Status of the health of the Scripting                     |
| **sonatype\_nexus.status.thread\_deadlock\_detector**(gauge)                                    | Status of the health of the Thread Deadlock Detector      |

### Events{% #events %}

The Sonatype Nexus integration forwards the `sonatype_nexus.authentication_validation` event to Datadog.

### Service Checks{% #service-checks %}

See [service_checks.json](https://github.com/DataDog/integrations-core/blob/master/sonatype_nexus/assets/service_checks.json) for a list of service checks provided by this integration.

## Support{% #support %}

For further assistance, contact [Datadog support](https://docs.datadoghq.com/help/).
