Read SecObserve Metrics
secobserve_product_metricsRead pre-aggregated vulnerability and license counts for a product, group, or instance. Use current, timeline, or status to review counts, trends, or metric freshness.
Instructions
Read pre-aggregated observation and license counts for a product, a group, or the whole instance.
Far cheaper than counting rows with secobserve_list: these come from the metrics tables a background job maintains. That also means they are as old as the last calculation -- kind="status" tells you how old, and is worth reading before quoting a number as current.
Args: params (MetricsInput): Validated input containing: - kind (str): "current", "timeline" or "status". - product_id (Optional[int]): One product, or every product in a group when the id is a product group. Omit for the instance. - age (Optional[MetricsAge]): Window for "timeline": "Past 7 days", "Past 30 days", "Past 90 days", "Past 365 days". - response_format (ResponseFormat): "json" (default) or "markdown".
Returns: str: For kind="current", a JSON object of counts keyed by severity (open_critical, open_high, ...) and by license evaluation result. For kind="timeline", a JSON object keyed by ISO date, each value the counts for that day. For kind="status", {"last_calculated": ISO timestamp, "calculation_interval": minutes}.
Examples: - Use when: "how many critical findings are open in product 12?" -> kind="current", product_id=12 - Use when: "is our backlog growing?" -> kind="timeline", age="Past 90 days" - Use when: a metric looks wrong -> kind="status", to check the job has run. - Don't use when: you need the findings themselves (use secobserve_list).
Error Handling: 403 means no view permission on the product. An empty timeline usually means the metrics job has not run yet for that window -- check kind="status".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |