This commit is contained in:
Cyberes 2023-04-21 23:54:17 -06:00
parent 7d42eb0e5b
commit 62e0a6162e
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ def main():
db_lag_MAX = 0.01 if not args.crit else args.crit # in seconds
try:
db_lag, null_present, raw_data = get_waiting_for_db(args.grafana_api_key, args.interval, args.range, args.grafana_server)
null_warn = f'Null data was present for this timeseries.\n{raw_data}' if null_present else ''
null_warn = f'Null data was present for this timeseries, value may be incorrect.\n{raw_data}' if null_present else ''
if db_lag > db_lag_MAX:
print(f"CRITICAL: DB lag is {db_lag} sec. {null_warn} |'db-lag'={db_lag}s;;;")
sys.exit(nagios.CRITICAL)