In case that the volume is freshly created and is being written to
currently, lastwritten is NULL, which propagates through the expiry
calculation formula, resulting in a boolean field being NULL.
This causes an error to be raised, which results in a log line:
Jun 30 23:29:24 backup1 bareos_exporter[21509]: time="2021-06-30T23:29:24Z" level=error msg="sql: Scan error on column index 4, name \"expired\": sql/driver: couldn't convert () into type bool" method=PoolInfo
When an error occurs while fetching pool info, statistics about pools
are not exported to prometheus at all, which may result in missing data.
In case that the volume is freshly created and is being written to currently,
lastwritten
isNULL
, which propagates through the expiry calculation formula, resulting in a boolean field beingNULL
. This causes an error to be raised, which results in a log line:Jun 30 23:29:24 backup1 bareos_exporter[21509]: time="2021-06-30T23:29:24Z" level=error msg="sql: Scan error on column index 4, name \"expired\": sql/driver: couldn't convert () into type bool" method=PoolInfo
When an error occurs while fetching pool info, statistics about pools are not exported to prometheus at all, which may result in missing data.
Fixes #9