Skip to content

Commit

Permalink
update victoriametrics server to use port 9090 for consistency with
Browse files Browse the repository at this point in the history
default prometheus port (and to allow query utility to work as
is). Also bump retention period for victoria.

Signed-off-by: Karl W Schulz <[email protected]>
  • Loading branch information
koomie committed Dec 18, 2024
1 parent 37e8cde commit e39cf94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion omnistat/omni_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ def startVictoriaServer(self):
vm_logfile = self.runtimeConfig[section].get("victoria_logfile", "victoria_server.log")
vm_corebinding = self.runtimeConfig[section].getint("victoria_corebinding", None)

command = [vm_binary, "--storageDataPath=%s" % vm_datadir, "-memory.allowedPercent=10", "-retentionPeriod=10y"]
command = [
vm_binary,
"--storageDataPath=%s" % vm_datadir,
"-memory.allowedPercent=10",
"-retentionPeriod=10y",
"-httpListenAddr=:9090",
]
envAddition = {}
# restrict thread usage
envAddition["GOMAXPROCS"] = "4"
Expand Down
3 changes: 1 addition & 2 deletions omnistat/standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def polling(self, monitor, interval_secs):
logging.info("Previous metric push is still running - blocking till complete.")
push_thread.join()
logging.info("Resuming after previous metric push complete.")

try:
push_start_time = time.perf_counter()
dataToPush = self.__dataVM
Expand Down Expand Up @@ -256,7 +255,7 @@ def parse_args():
parser.add_argument("--interval", type=float, help="sampling frequency (in secs)", default=0.5)
parser.add_argument("--logfile", type=str, help="redirect stdout to logfile", default=None)
parser.add_argument("--endpoint", type=str, help="hostname of VictoriaMetrics server", default="localhost")
parser.add_argument("--port", type=int, help="port to access VictoriaMetrics server", default=8428)
parser.add_argument("--port", type=int, help="port to access VictoriaMetrics server", default=9090)

return parser.parse_args()

Expand Down

0 comments on commit e39cf94

Please sign in to comment.