Inventory Metric Log
Endpoints Summary
GET
/inventory_metric_log/
Swagger ↗
GET
/inventory_metric_log/{id}/
Swagger ↗
The
InventoryinventoryMetricmetricLog APIlog endpoints provide access to historical metric datacollectedfromdevicesmonitoredininventoryyour inventory.devices. These endpoints allow you to retrieveandtime-series data for device parameters, filtermetricbylogstimetoranges and device characteristics, and analyzedeviceperformanceperformance,trendsmonitoracrosstrends,yourand generate reports based on collected measurement data.infrastructure.
Base URL: https://control.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Inventoryinventory Metricmetric Loglog API category providesenables comprehensiveyou to access toand analyze historical metricperformance and status data collected from your inventorymonitored devices. These endpoints are essential for monitoring device performance, analyzing trends, and generating detailed reports based on collected measurement data.
Key Concepts:for:
-
MetricPerformanceLogsMonitoring:HistoricalTrackrecordsdeviceofmetricsmeasurementsovertakentimefromtodevices,identifyincludingtrends,values, timestamps,bottlenecks, andmetadataanomalies -
DeviceHistoricalAssociationAnalysis:EachRetrieve past metricisdatalinkedfortoreporting,acompliance,specificanddevicecapacityin your inventoryplanning -
Parameter TrackingTroubleshooting:MetricsCorrelatearedeviceorganized by parameters (what is being measured)issues withsupportspecificfortimemultipleperiodsnamingandconventionsparameter changes -
OriginDataTrackingIntegration:EachExport metric data for external analytics platforms or custom dashboards
The metric logs capture data from various sources (automatic monitoring, manual entry, scripts, APIs) and provide a comprehensive audit trail of device performance. Each log entry recordsincludes howthe original value, processed result, timestamp, and origin information to ensure data integrity and traceability.
Key concepts:
CommonDevice UseContext: Cases:
The API supports powerful filtering capabilities to help you retrieve exactly the data you need, with pagination for handling large datasets efficiently.
Endpoints
GET /inventory_metric_log/
Description: Retrieves a paginated list of inventory metric logslog entries with comprehensive filtering options.capabilities. This endpoint is idealyour primary tool for querying historical device performance data, allowing you to filter by time ranges, device names, parameter types, and metric names to extract exactly the data acrossyou multiple devices and parameters, making it perfectneed for dashboard creation, trend analysis, and bulk data exports.analysis.
Use Cases:
BuildingMonitormonitoring dashboards with historical data
Full URL Example:
https://control.zequenze.com/api/v1/inventory_metric_log/?datetime__gte=2024-01-01&device__name=server-01¶meter__variable_name=cpu_usage&limit=50
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| datetime__gte | string | query | No | Filter for metrics |
| datetime__lte | string | query | No | Filter for metrics |
| device__name | string | query | No | Filter |
| metric__name | string | query | No | Filter by metric name to focus on specific measurement types |
| parameter__name | string | query | No | Filter by parameter name to get specific types of measurements |
| parameter__short_name | string | query | No | Filter |
| parameter__variable_name | string | query | No | Filter by |
| cursor | string | query | No | Pagination cursor for |
| limit | integer | query | No | Number of results per page ( |
| metric_name | string | query | No | Alternative filter for |
| parameter_name | string | query | No | Alternative filter for |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_metric_log/?datetime__gte=2024-01-01T00:00:00Z01&device__name=web-server-01¶meter__name=cpu_usageparameter__variable_name=memory_usage&limit=100" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"next": "https://control.zequenze.com/api/v1/inventory_metric_log/?cursor=eyJkYXRldGltZSI6IjIwMjQtMDEtMTVUMTA6MzA6MDBaIiwiaWQiOjEwMH0%eyJpZCI6MTAwfQ%3D%3D",
"previous": null,
"results": [
{
"id": 1245,1547,
"datetime": "2024-01-15T10:15T14:30:00Z"00.123456Z",
"device_name": "web-server-01",
"parameter_name": "Memory Usage",
"metric_name": "System Memory",
"origin": "au",
"value": 78.5,
"result": 78.5,
"original_value": "78.5%"
},
{
"id": 1546,
"datetime": "2024-01-15T14:25:00.987654Z",
"device_name": "web-server-01",
"parameter_name": "Memory Usage",
"metric_name": "System Memory",
"origin": "au",
"value": 76.2,
"result": 76.2,
"original_value": "76.2%"
},
{
"id": 1545,
"datetime": "2024-01-15T14:20:00.555123Z",
"device_name": "web-server-01",
"parameter_name": "CPU Usage",
"metric_name": "cpu_usage",System "origin": "au",
"value": 85.7,
"result": 85.7,
"original_value": "85.7%"
},
{
"id": 1244,
"datetime": "2024-01-15T10:25:00Z",
"device_name": "web-server-01",
"parameter_name": "Memory Usage",
"metric_name": "memory_usage",
"origin": "au",
"value": 72.3,
"result": 72.3,
"original_value": "72.3%"
},
{
"id": 1243,
"datetime": "2024-01-15T10:20:00Z",
"device_name": "web-server-01",
"parameter_name": "Disk Usage",
"metric_name": "disk_usage"CPU",
"origin": "sc",
"value": 45.8,
"result": 45.8,
"original_value": "45.8 GB"8"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated metric log data |
| 401 | Unauthorized - Invalid or missing |
| 400 | Bad Request - Invalid |
GET /inventory_metric_log/{id}/
Description: Retrieves detailed information for a specific inventory metric log entry by its unique ID. This endpoint provides detailedthe information about a single metric measurement, including all metadata andsame filtering capabilities foras relatedthe queries.list endpoint but returns only the single record that matches both the ID and any additional filter criteria you specify.
Use Cases:
InvestigatingGet complete details for a specific metricanomalieslog entry
Full URL Example:
https://control.zequenze.com/api/v1/inventory_metric_log/1245/1547/?device__name=web-server-01
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | integer | path | Yes | |
| datetime__gte | string | query | No | Additional |
| datetime__lte | string | query | No | Additional |
| device__name | string | query | No | Additional |
| metric_name | string | query | No | Additional |
| parameter_name | string | query | No | Additional |
| parameter__variable_name | string | query | No | Additional |
cURL Example:
curl -X GET "https://control.zequenze.com/api/v1/inventory_metric_log/1245/1547/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"id": 1245,1547,
"datetime": "2024-01-15T10:15T14:30:00Z"00.123456Z",
"device_name": "web-server-01",
"parameter_name": "CPUMemory Usage",
"metric_name": "cpu_usage"System Memory",
"origin": "au",
"value": 85.7,78.5,
"result": 85.7,78.5,
"original_value": "85.7%78.5%"
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns the |
| 401 | Unauthorized - Invalid or missing |
| 404 | Not Found - Metric log entry with specified ID |
Common Use Cases
Use Case 1: Performance MonitoringTrend DashboardAnalysis
Retrieve recentMonitor CPU and memory usage trends for critical servers over the past week to identify performance patterns and potential capacity issues.
# Get CPU metrics for all web servers to display current system health status.
Approach: Use the listlast endpoint7 withdays
devicecurl name-X filteringGET and"https://control.zequenze.com/api/v1/inventory_metric_log/?datetime__gte=2024-01-08&datetime__lte=2024-01-15&device__name=prod-server-01¶meter__variable_name=cpu_usage&limit=200" datetime\
range-H to"Authorization: getBearer recentYOUR_API_TOKEN"
metrics across multiple parameters.
Use Case 2: HistoricalIncident Trend AnalysisInvestigation
GenerateExamine monthly performance reports by queryingall metric data forfrom a specific timedevice periodsduring anda parameters.
Approach:incident Usetimeframe datetimeto filteringcorrelate performance issues with parameter-specificsystem queriesproblems.
# collectGet dataall formetrics trendduring analysisincident andwindow
reporting.curl -X GET "https://control.zequenze.com/api/v1/inventory_metric_log/?datetime__gte=2024-01-15T02:00:00&datetime__lte=2024-01-15T04:00:00&device__name=database-server-03" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 3: AnomalyAutomated InvestigationData Collection Verification
InvestigateVerify that automatic monitoring systems are properly collecting data by filtering for specific performanceorigins incidentsand by examining detailed metric logs around the time of an alert.
Approach: Use the detail endpoint to examine specific metric entries, combined with datetime filtering to see surroundingchecking data points.continuity.
# Check recent automatic measurements
curl -X GET "https://control.zequenze.com/api/v1/inventory_metric_log/?datetime__gte=2024-01-15&origin=au&limit=50" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Use Case 4: AutomatedCustom AlertingDashboard SystemData Export
BuildExport specific metric data for integration with external monitoring systemsdashboards thator checkbusiness recentintelligence metric values against thresholds and trigger alerts.tools.
Approach:
# RegularlyExport polltemperature thedata listfor endpointenvironmental withmonitoring
recentcurl datetime-X filtersGET and"https://control.zequenze.com/api/v1/inventory_metric_log/?parameter__variable_name=temperature&datetime__gte=2024-01-01&limit=1000" parameter-specific\
queries-H to"Authorization: monitorBearer criticalYOUR_API_TOKEN"
metrics.
Use Case 5: Compliance Reporting
Generate audithistorical reports showing metric collection history and data sources for compliance purposes.
Approach:by Queryretrieving metric logsdata with proper origin filteringtracking toand showtimestamps.
# dataGet wasmanual collected (automatic vs manual)entries for audit trails.trail
curl -X GET "https://control.zequenze.com/api/v1/inventory_metric_log/?origin=ma&datetime__gte=2024-01-01&datetime__lte=2024-01-31" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Best Practices
Pagination Management:
-
Use
reasonableTimelimitRangevaluesFilters:(50-100)Alwaystospecifybalance performancedatetime__gteanddata volume
Efficient Filtering:
datetime__lte to limit Implement Pagination: For large data sets, use the limit parameter (recommended: 50-100 records per request) and parameterfollow filtersthe next cursor for subsequent pages to reduceavoid unnecessarytimeouts.
Cache Frequently Accessed Data: If you're building dashboards or reports, cache metric data transfer
Monitor Origin Types: Pay attention to the origin field to distinguish between automatic monitoring data (au) and manual entries (ma, gu, cl) for data quality analysis.
Handle Time Zones Properly: Use ISO 8601 format with timezone information in datetime filters. The API returns all timestamps in UTC, so convert to local time zones as needed in your application.
Filter by Device Groups: When monitoring multiple similar devices, make separate API calls for each device rather than retrieving all data and filtering client-side for better performance.
Validate Data Integrity: Compare value, result, and original_value fields to understand any data processing or conversion that occurred during metric collection.
Error Handling:Handling
Performance Optimization:deleted.
Origin Code Reference:
aumaguclscap