Skip to content

Logcheck

services.logcheck.config

Config options that you would like in logcheck.conf.

Type: strings concatenated with "\n"

Default

"FQDN=1"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.enable

Whether to enable logcheck cron job, to mail anomalies in the system logfiles to the administrator. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.extraGroups

Extra groups for the logcheck user, for example to be able to use sendmail, or to access certain log files.

Type: list of string

Default

[ ]

Example

["postdrop""mongodb"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.extraRulesDirs

Directories with extra rules.

Type: list of path

Default

[ ]

Example

["/etc/logcheck"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.files

Which log files to check.

Type: list of path

Default

["/var/log/messages"]

Example

["/var/log/messages""/var/log/mail"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignore

This option defines extra ignore rules.

Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignore.<name>.level

Set the logcheck level.

Type: one of "workstation", "server", "paranoid"

Default

"server"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignore.<name>.regex

Regex specifying which log lines to ignore.

Type: string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignoreCron

This option defines extra ignore rules for cronjobs.

Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignoreCron.<name>.cmdline

Command line for the cron job. Will be turned into a regex for the logcheck ignore rule.

Type: string

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignoreCron.<name>.timeArgs

"min hr dom mon dow" crontab time args, to auto-create a cronjob too. Leave at null to not do this and just add a logcheck ignore rule.

Type: null or string

Default

null

Example

"02 06 * * *"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.ignoreCron.<name>.user

User that runs the cronjob.

Type: string

Default

"root"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.level

Set the logcheck level. Either "workstation", "server", or "paranoid".

Type: string

Default

"server"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.mailTo

Email address to send reports to.

Type: string

Default

"root"

Example

"you@domain.com"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.timeOfDay

Time of day to run logcheck. A logcheck will be scheduled at xx:02 each day. Leave default (*) to run every hour. Of course when nothing special was logged, logcheck will be silent.

Type: string

Default

"*"

Example

"6"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix

services.logcheck.user

Username for the logcheck user.

Type: string

Default

"logcheck"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/logging/logcheck.nix