Got 3750-X monitoring working

This commit is contained in:
2026-03-17 19:38:27 +01:00
parent c474f9c9c2
commit e66998b826
9 changed files with 424 additions and 132 deletions

View File

@@ -1,7 +1,7 @@
import asyncio, os
from typing import Annotated, Final
from db.Influx import fluxIDRACWriter
from db.MariaDB import sqlIDRACDataWriter
from db.Influx import fluxDataWriter
from db.MariaDB import sqlDataWriter
USEINFLUX: Final[int] = int(os.getenv("USEINFLUX", 1))
USESQL: Final[int] = int(os.getenv("USESQL", 0))
@@ -15,7 +15,7 @@ async def ALLdbIDRACWriter(inputQueue: asyncio.Queue) -> None:
try:
if USESQL:
sqlResult = await sqlIDRACDataWriter(qu)
sqlResult = await sqlDataWriter(qu)
match sqlResult:
case 1:
print("Wrong source")
@@ -26,7 +26,7 @@ async def ALLdbIDRACWriter(inputQueue: asyncio.Queue) -> None:
case _:
print("Inserted in SQL")
if USEINFLUX:
fluxResult = await fluxIDRACWriter(qu)
fluxResult = await fluxDataWriter(qu)
match fluxResult:
case 1:
print("could not insert")