Skip to content

Feature Request: NeuVector pod logs in JSON format #1276

Description

@xingzhang-suse

Is your feature request related to a problem?

NVSHAS-10266 NeuVector pod logs in JSON format

== Customer's request ==

We have deployed NeuVector on our GKE cluster, and the pod logs are being collected and stored in Google Cloud Logging.

However, the current NeuVector pod log format is not in JSON, which results in higher logging costs for us.

Could you please escalate this request to the development team to investigate and provide a solution?

Solution you'd like

Modify configuration on log4j and leverage json4s-native to format the log

Alternatives you've considered

No response

Anything else?

No response

Activity

  1. added
    enhancementNew feature or request
    UINeuVector manager repo's tasks, including UI and seb server
    on Aug 18, 2026
  2. added this to the v5.6.2 milestone on Aug 18, 2026
  3. changed the title [-]Feature Request:[/-] [+]Feature Request: NeuVector pod logs in JSON format[/+] on Aug 18, 2026
  4. removed this from the v5.6.2 milestone on Aug 20, 2026
  5. added this to the v5.6.3 milestone on Aug 27, 2026
  6. added 7 commits that reference this issue on Sep 23, 2026
  7. modified the milestones: v5.6.3, v5.7.0 on Sep 24, 2026
  8. added 3 commits that reference this issue on Sep 24, 2026
  9. added 2 commits that reference this issue on Sep 25, 2026
  10. esther-suse commented on Oct 8, 2026

    @esther-suse

    Verified in @kyledong-suse 's private build. The issue is fixed.

    1. Set LOG_FORMAT=json on controller and enforcer pods

    kubectl set env deployment/neuvector-controller-pod LOG_FORMAT=json -n neuvector
    kubectl set env daemonset/neuvector-enforcer-pod LOG_FORMAT=json -n neuvector
    
    Or: edit the controller or enforcer yaml:
    env:
      - name: LOG_FORMAT
        value: "json"
    under both containers
    

    2. After the pods are ready, check JSON logs

    2.1 Controller (check module CTL)

    k logs neuvector-controller-pod-9df99dfd4-wprpf -n neuvector --tail=50
    
    Defaulted container "neuvector-controller-pod" out of: neuvector-controller-pod, init (init)
    {"time":"2026-10-02T21:46:00.347","level":"INFO","module":"CTL","log":"cache.ScannerUpdateHandler: - cvedb=4.292 entries=449788"}
    {"time":"2026-10-02T21:46:00.348","level":"INFO","module":"CTL","log":"cache.ScannerUpdateHandler: Add or update scanner - scanner={ID:10.42.2.220 CVEDBVersion:4.292 CVEDBCreateTime:2026-09-25T20:33:03Z JoinedAt:2026-10-02 00:01:06.283554095 +0000 UTC RPCServer:10.42.2.220 RPCServerPort:18402 BuiltIn:false CVEDBEntries:449788 ScanCredit:2 MaxConcurrentScansPerScanner:2}"}
    {"time":"2026-10-02T21:46:00.348","level":"INFO","module":"CTL","log":"scan.AddScanner: - id=10.42.2.220"}
    {"time":"2026-10-02T21:46:00.348","level":"INFO","module":"CTL","log":"cache.ScannerUpdateHandler: Add or update scanner - scanner={ID:10.42.3.88 CVEDBVersion:4.292 CVEDBCreateTime:2026-09-25T20:33:03Z JoinedAt:2026-10-02 00:01:56.470202777 +0000 UTC RPCServer:10.42.3.88 RPCServerPort:18402 BuiltIn:false CVEDBEntries:449788 ScanCredit:2 MaxConcurrentScansPerScanner:2}"}
    {"time":"2026-10-02T21:46:00.348","level":"INFO","module":"CTL","log":"scan.AddScanner: - id=10.42.3.88"}
    ......
    

    2.2 Enforcer ( check agent AGT + monitor MON + dp DP)

    k logs neuvector-enforcer-pod-z9mn6  -n neuvector | grep "DP\|MON\|AGT"
    
    {"time":"2026-10-02T21:45:16","level":"INFO","module":"MON","log":"/usr/local/bin/monitor starts, pid=2367838"}
    {"time":"2026-10-02T21:45:16","level":"INFO","module":"MON","log":"Start dp, pid=2367857"}
    {"time":"2026-10-02T21:45:16","level":"INFO","module":"MON","log":"Start agent, pid=2367858"}
    {"time":"1970-01-01T00:00:00","level":"DEBU","module":"DP","log":"dpi_dlp_init: enter"}
    {"time":"1970-01-01T00:00:00","level":"DEBU","module":"DP","log":"dpi_dlp_register_options: enter"}
    {"time":"1970-01-01T00:00:00","level":"DEBU","module":"DP","log":"net_run: enter"}
    {"time":"2026-10-02T21:45:16","level":"DEBU","module":"DP","log":"cmd|dp_ctrl_loop: enter"}
    {"time":"2026-10-02T21:45:16","level":"DEBU","module":"DP","log":"dlp|dp_bld_dlp_thr: dp bld_dlp thread starts"}
    {"time":"2026-10-02T21:45:16","level":"DEBU","module":"DP","log":"dp0|dpi_frag_init: enter"}
    {"time":"2026-10-02T21:45:16","level":"DEBU","module":"DP","log":"dp0|dpi_session_init: enter"}
    {"time":"2026-10-02T21:45:16","level":"DEBU","module":"DP","log":"dp0|dp_data_thr: dp thread starts"}
    {"time":"2026-10-02T21:45:16.076","level":"INFO","module":"AGT","log":"main.main: START - version=16fc8751"}
    {"time":"2026-10-02T21:45:16.076","level":"INFO","module":"AGT","log":"main.main: - bind=10.42.2.230"}
    {"time":"2026-10-02T21:45:16.076","level":"ERRO","module":"AGT","log":"sysinfo.getStructureTableAddressEFI: systab - err=open /proc/1/root/sys/firmware/efi/systab: no such file or directory"}
    ......
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

UINeuVector manager repo's tasks, including UI and seb serverenhancementNew feature or request

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions