diff --git a/services/metricscollector/service.py b/services/metricscollector/service.py index 04cc795021e80af4efd44447aaf4bbc6a9e13fd8..974e546dca6fdf0413bf54cf81b0d2285dc30edf 100755 --- a/services/metricscollector/service.py +++ b/services/metricscollector/service.py @@ -8,6 +8,7 @@ # Python modules import asyncio +import pytz from dataclasses import dataclass from typing import Any, Optional, Tuple, List, Dict, Set, DefaultDict from collections import defaultdict @@ -52,6 +53,7 @@ class MetricsCollectorService(FastAPIService): self.id_mappings: Dict[str, List[CfgItem]] = {} self.n_parts: int = 0 self.ready_event: Optional[asyncio.Event] = None + self.tz = pytz.timezone(config.timezone) async def init_api(self): # Postpone initialization process until config datastream is fully processed @@ -189,7 +191,7 @@ class MetricsCollectorService(FastAPIService): # Matched rule found if map_item.ch_table not in out: out[map_item.ch_table] = { - "ts": item.ts.timestamp() * NS, + "ts": (item.ts.timestamp() + self.tz._utcoffset.seconds) * NS, "scope": map_item.ch_table, "labels": item.labels, "service": item.service, diff --git a/ui/web/inv/sensorprofile/Application.js b/ui/web/inv/sensorprofile/Application.js index 4b1c3a3dfc0386dba3e7c5717ad097d63b14052b..89de27e861a3b1441c94039bc1a7f90039f97873 100644 --- a/ui/web/inv/sensorprofile/Application.js +++ b/ui/web/inv/sensorprofile/Application.js @@ -101,7 +101,7 @@ Ext.define("NOC.inv.sensorprofile.Application", { fieldLabel: __("Collect interval"), allowBlank: true, uiStyle: "medium", - minValue: 20, + minValue: 1, maxValue: 3600 }, {