Page 1 of 1

[Nagios-devel] Quick patch to send logs to a printer.

Posted: Fri Jul 29, 2005 6:04 am
by Guest
This is a quick patch which may be of interest to somebody: an addition
to the standard Nagios log.

If you define PRINTER_FILE to something like '/dev/lp0', your logs will
be echoed to that printer. The date will be reformatted in human
readable form on the printer.

So, after configure, in common.h, add:

#define PRINTER_FILE "/dev/lp0"

Ensure /dev/lp0 writeable by user nagios.

This is a good solution, as when I hear the printer working I know there
is a new problem. Much faster than any other method.

This is also ideal way of making use of an old dot-matrix wide carriage
tractor feed printer, which most companies seem to have in a cupboard
somewhere :)

Hoping somebody can make use of it,

Ben Clewett.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]