From ZoneMinder Wiki
Jump to: navigation, search

Logwatch is a system log analyzer and reporter. This article describes the extensions logwatch extension for ZoneMinder. This should help you to get noticed if something goes wrong on your ZoneMinder box.

Overview of the provided Informations

Beside the normal logwatch informations this extension provides the following informations:

  • Number of alert states for the different cameras
  • Number of ZoneMinder daemon crashes (includes the information which daemon crashed)
  • Number of ZoneMinder MySQL errors (includes the [ZoneMinder] error message)

With detail => 3

(As a convention 0 values aren't displayed)


You need to install logwatch. Logwatch is part of the most distributions, simple install it via the package management of your distribution. Of course you can download logwatch it from the logwatch website [1] too.

Install the extension for ZoneMinder

first you have to download the required files from here. Extract the archive, copy the file zoneminder.conf to /usr/share/logwatch/default.conf/services/ and copy the file zondeminder to /usr/share/logwatch/scripts/services/ (these locations depends on your logwatch install location and may vary). That's all.

Using ZoneMinder logwatch extension

Just run logwatch --service zondeminder. If you want more detailed informations (see overview) run it with --details 3. For a more detailed informations on how to use logwatch have a look at the manpage [2].


For example you can run:

logwatch  --service zoneminder --range 'yesterday' --detail high --print --archives --mailto <your mail address>

Maybe you want to create a daily cronjob. Create a file called logwatch in /etc/'cron.d/' for example:

0 18 * * *    root    logwatch  --service zoneminder --range 'yesterday' --detail high --print --archives --mailto <your mail address>
Retrieved from "?title=Logwatch&oldid=2698"