Skip to content

Instantly share code, notes, and snippets.

View utix's full-sized avatar

Aurélien Lajoie utix

View GitHub Profile
@utix
utix / trivy_datadog_stats.py
Created October 5, 2022 15:46
Simple script to send Vulnerabilities stats to datadog from a trivy json response, `DD_SITE="datadoghq.eu" ./trivy_datadog_stats.py` to use it
#!/usr/bin/env python3
"""
Submit metrics returns "Payload accepted" response
"""
from datetime import datetime
import json
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.metrics_api import MetricsApi