Files
SNMP-Influx-collector/cont/sqlTables.py
YuruC3 d3d274b2a1 A big rework is needed
A rework of exhaust temp, everything for PSU2 and
CPU2 temp is needed.

On R430 there is only Inlet Temp sensor
which crashes the program.

Also if there is only one cpu installed then the program
will also crash as there is no OID for cpu2

Adding a try: for above mentioned OIDs and then
combining output into one Queue entry should fix it
2026-03-01 21:29:28 +01:00

26 lines
894 B
Python

from sqlalchemy import Table, Column, MetaData, Integer, String, TIMESTAMP, BigInteger, Numeric, text
metadata = MetaData()
idracMeasurement = Table(
"IDRACmeasurement",
metadata,
Column("id", Integer, primary_key=True, autoincrement=True),
Column("time_stamp", TIMESTAMP, server_default=text("CURRENT_TIMESTAMP"), nullable=False),
Column("hostname", String(64), nullable=False),
Column("powerDrawPSU1", Numeric(7, 2)),
Column("powerDrawPSU2", Numeric(7, 2)),
Column("powerDrawBoard", Numeric(7, 2)),
Column("voltagePSU1", Numeric(7, 2)),
Column("voltagePSU2", Numeric(7, 2)),
Column("inletTemp", Numeric(5, 2)),
Column("exhaustTemp", Numeric(5, 2)),
Column("cpu1Temp", Numeric(5, 2)),
Column("cpu2Temp", Numeric(5, 2)),
Column("uptimeS", BigInteger),
Column("uptimeH", Numeric(8, 3)),
Column("uptimeD", Numeric(8, 3)),
)