How to get current feed versions (NVT, SCAP, CERT, GVMD_DATA) from the shell?

Hi everyone, I’m using the Greenbone Community Edition (greenbone-feed-sync 24.3.0) in a Docker-based setup.

In the GSA Web UI (under /feedstatus), I can clearly see the current feed versions.

I’d like to retrieve exactly these feed version numbers from the command line, so I can log them or include them in automated monitoring scripts.

How can I reliably get the current feed versions (NVT, SCAP, CERT, GVMD_DATA) from the CLI or shell — the same ones shown in the GSA UI?
Is there a hidden command, JSON API endpoint, or some trick to extract these values from the local feed data?

Thanks in advance! :folded_hands:
Marc

Hi,

#!/bin/bash

# Set credentials
GMP_USER="admin"
GMP_PASS="yourpassword"

# Run gvm-cli and print feed status directly
gvm-cli socket --gmp-username "$GMP_USER" --gmp-password "$GMP_PASS" --xml "<get_feeds/>"

It probably contains also versionnumber.

edit: if management daemon is not running same host, then you need to connect it via ip address or some other way.

Eero

Hi everyone,

I was able to solve it. I’m using a Docker-based setup and created a dedicated container (Alpine-based) that runs a docker exec into the Greenbone container on a schedule via cron.

Inside the main container, I call all the individual feed sync commands (greenbone-nvt-sync, greenbone-scapdata-sync, greenbone-certdata-sync, and greenbone-feed-sync --type GVMD_DATA) and write their output to a central log file.

This way, I have both the feed sync logs and timestamps available, and I can parse or forward them as needed for monitoring.

Thanks,
Marc

This topic was automatically closed after 90 days. New replies are no longer allowed.