Solved dummy-ups polling with nut declares UPS dead

I have a UPS for which there is no out-of-the-box sysutils/nut driver. nut, however, provides the excellent dummy-ups driver, which, according to the documentation, reads the state of the pseudo-UPS from a freely configurable file, and reports that to nut_upsmon. From upsmon.conf(5) man page,
upsmon requires a UPS to provide status information every few seconds (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status fetch fails, the UPS is marked stale. If it stays stale for more than DEADTIME seconds, the UPS is marked dead.
The ups.conf(5) man page makes reference to the nutupsdrv(8) man page, which makes reference to the dummy-ups(8) man page. The dummy-ups(8) man page explains how the dummy-ups .seq and .dev files work and how to provide values in them for nutupsdrv.

None of the man pages explains what "providing status information to upsmon" means. I have a script that updates the information in the .seq file specified for the dummy-ups and provides the information on whether the UPS is on-grid or off-grid. After a time considerably longer than DEADTIME, upsmon will invariably complain that it lost communication with the UPS.

What needs to be provided in the .seq file to convince upsmon that the communication has not been lost, or what have I misunderstood?
 
And to add one more question, what variables should be provided in the seq file so that upsmon gets satisfactory state information and the ups.log file will not receive entires like NA NA NA [NA] NA NA?
 
And to add one more question, what variables should be provided in the seq file so that upsmon gets satisfactory state information and the ups.log file will not receive entires like NA NA NA [NA] NA NA?
From the upslog(8) man page:
The default format string is:

%TIME @Y@m@d @H@M@S% %VAR battery.charge% %VAR input.voltage%
%VAR ups.load% [%VAR ups.status%] %VAR ups.temperature%
%VAR input.frequency%
from which we can gather that the default variables that need to be provided in the .seq/.dev file are battery.charge, input.voltage, ups.load, ups.status, ups.temperature, and input.frequency. Or one can change the variables that upslog is to collect.

And, most importantly, restart the nut_upslog service, or it will be logging your no-longer-existing UPS.
 
After a time considerably longer than DEADTIME, upsmon will invariably complain that it lost communication with the UPS.

What needs to be provided in the .seq file to convince upsmon that the communication has not been lost, or what have I misunderstood?
If DEADTIME is set to a value of, say, 30, and POLLFREQ is 300, the UPS will not be reported dead in 30 seconds but after a considerably longer time, and that will confuse the user. Set DEADTIME to 30 and POLLFREQ to 15 and don't worry about the backend file being updated every 600 seconds. It will work.
 
Back
Top