Analyzing the size and space usage of the blobstore and repository
- groovy script for outputting metrics to a file in Prometheus metric exposition format
- nginx for exposing metrics from a file
- supported nexus versions < 3.74.0-05
- script nx-estimate.groovy originally sourced from support.sonatype.com
Go to Nexus > Administration > System > Tasks > Create task > "Admin - Execute script" and configure
- Task name: scriptname
- Language: groovy
- Script source: paste the nx-estimate.groovy script
- Set task frequency or cron expression
- Copy the nx-estimate-nginx.conf file to /etc/nginx/conf.d/ directory
- Configure the server section in nginx.conf for metric export.
- Update the nginx configuration by running nginx -s reload