Sonatype Nexus

Supported OS Linux Windows

Integration version1.0.0

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.

Setup

Installation

The Sonatype Nexus check is included in the Datadog Agent package. No additional installation is necessary.

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

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

Connect your Sonatype Nexus account to the agent

  1. Copy the conf.yaml.example file.

    cp /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml.example /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml
    
  2. Edit the /etc/datadog-agent/conf.d/sonatype_nexus.d/conf.yaml file. Add the following configurations.

    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:

    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>
    
  1. Restart the Agent.

Validation

Data Collected

Logs

The Sonatype Nexus integration does not include any logs.

Metrics

The Sonatype Nexus integration collects and forwards analytics, and instance health status metrics to Datadog.

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

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

Service Checks

See service_checks.json for a list of service checks provided by this integration.

Support

For further assistance, contact Datadog support.