Skip to content

Nagios

services.nagios.cgiConfigFile

Derivation for the configuration file of Nagios CGI scripts that can be used in web servers for running the Nagios web interface.

Type: package

Default

nagiosCGICfgFile

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.enable

Whether to enable Nagios to monitor your system or network.. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.enableWebInterface

Whether to enable the Nagios web interface. You should also enable Apache ({option}services.httpd.enable).

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.extraConfig

Configuration to add to /etc/nagios.cfg Type: attribute set of string

Default

{ }

Example

{debug_file = "/var/log/nagios/debug.log";debug_level = "-1";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.mainConfigFile

If non-null, overrides the main configuration file of Nagios.

Type: null or package

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.objectDefs

A list of Nagios object configuration files that must define the hosts, host groups, services and contacts for the network that you want Nagios to monitor.

Type: list of path

Example

[ ./objects.cfg ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.plugins

Packages to be added to the Nagios {env}PATH. Typically used to add plugins, but can be anything.

Type: list of package

Default

[pkgs.monitoring-plugins pkgs.msmtp pkgs.mailutils]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.validateConfig

if true, the syntax of the nagios configuration file is checked at build time Type: boolean

Default

pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost

Apache configuration can be done by adapting {option}services.httpd.virtualHosts. See for further information.

Type: submodule

Example

{ hostName = "example.org";adminAddr = "webmaster@example.org";enableSSL = true;sslServerCert = "/var/lib/acme/example.org/full.pem";sslServerKey = "/var/lib/acme/example.org/key.pem";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.acmeRoot

Directory for the acme challenge which is PUBLIC, don't put certs or keys in here. Set to null to inherit from config.security.acme.

Type: null or string

Default

"/var/lib/acme/acme-challenge"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.addSSL

Whether to enable HTTPS in addition to plain HTTP. This will set defaults for listen to listen on all interfaces on the respective default ports (80, 443).

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.adminAddr

E-mail address of the server administrator. Type: null or string

Default

null

Example

"admin@example.org"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.documentRoot

The path of Apache's document root directory. If left undefined, an empty directory in the Nix store will be used as root.

Type: null or path

Default

null

Example

"/data/webserver/docs"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.enableACME

Whether to ask Let's Encrypt to sign a certificate for this vhost. Alternately, you can use an existing certificate through {option}useACMEHost.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.enableUserDir

Whether to enable serving {file}~/public_html as /~«username».

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.extraConfig

These lines go to httpd.conf verbatim. They will go after directories and directory aliases defined by default.

Type: strings concatenated with "\n"

Default

""

Example

'' <Directory /home> Options FollowSymlinks AllowOverride All </Directory>''

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.forceSSL

Whether to add a separate nginx server block that permanently redirects (301) all plain HTTP traffic to HTTPS. This will set defaults for listen to listen on all interfaces on the respective default ports (80, 443), where the non-SSL listens are used for the redirect vhosts.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.globalRedirect

If set, all requests for this host are redirected permanently to the given URL.

Type: null or string

Default

null

Example

"http://newserver.example.org/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.hostName

Canonical hostname for the server. Type: string

Default

"‹name›"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.http2

Whether to enable HTTP 2. HTTP/2 is supported in all multi-processing modules that come with httpd. However, if you use the prefork mpm, there will be severe restrictions. Refer to https://httpd.apache.org/docs/2.4/howto/http2.html#mpm-config for details.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.listen

Listen addresses and ports for this virtual host.

::: {.note} This option overrides addSSL, forceSSL and onlySSL.

If you only want to set the addresses manually and not the ports, take a look at listenAddresses. :::

Type: list of (submodule)

Default

[ ]

Example

[{ip = "195.154.1.1";port = 443;ssl = true;}{ip = "192.154.1.1";port = 80;}{ip = "*";port = 8080;}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.listen.*.ip

IP to listen on. 0.0.0.0 for IPv4 only, * for all. Type: string

Default

"*"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.listen.*.port

Port to listen on Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.listen.*.ssl

Whether to enable SSL (https) support. Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.listenAddresses

Listen addresses for this virtual host. Compared to listen this only sets the addresses and the ports are chosen automatically.

Type: non-empty (list of string)

Default

["*"]

Example

["127.0.0.1"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.locations

Declarative location config. See https://httpd.apache.org/docs/2.4/mod/core.html#location for details.

Type: attribute set of (submodule)

Default

{ }

Example

{"/" = {proxyPass = "http://localhost:3000";};"/foo/bar.png" = {alias = "/home/eelco/some-file.png";};};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.locations.<name>.alias

Alias directory for requests. See https://httpd.apache.org/docs/2.4/mod/mod_alias.html#alias.

Type: null or path

Default

null

Example

"/your/alias/directory"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.locations.<name>.extraConfig

These lines go to the end of the location verbatim.

Type: strings concatenated with "\n"

Default

""

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.locations.<name>.index

Adds DirectoryIndex directive. See https://httpd.apache.org/docs/2.4/mod/mod_dir.html#directoryindex.

Type: null or string

Default

null

Example

"index.php index.html"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.locations.<name>.priority

Order of this location block in relation to the others in the vhost. The semantics are the same as with lib.mkOrder. Smaller values have a greater priority.

Type: signed integer

Default

1000

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.locations.<name>.proxyPass

Sets up a simple reverse proxy as described by https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html#simple.

Type: null or string

Default

null

Example

"http://www.example.org/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.logFormat

Log format for Apache's log files. Possible values are: combined, common, referer, agent.

Type: string

Default

"common"

Example

"combined"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.onlySSL

Whether to enable HTTPS and reject plain HTTP connections. This will set defaults for listen to listen on all interfaces on port 443.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.robotsEntries

Specification of pages to be ignored by web crawlers. See http://www.robotstxt.org/ for details.

Type: strings concatenated with "\n"

Default

""

Example

"Disallow: /foo/"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.servedDirs

This option provides a simple way to serve static directories.

Type: list of (attribute set)

Default

[ ]

Example

[{dir = "/home/eelco/Dev/nix-homepage";urlPath = "/nix";}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.servedFiles

This option provides a simple way to serve individual, static files.

::: {.note} This option has been deprecated and will be removed in a future version of NixOS. You can achieve the same result by making use of the locations.<name>.alias option. :::

Type: list of (attribute set)

Default

[ ]

Example

[{file = "/home/eelco/some-file.png";urlPath = "/foo/bar.png";}]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.serverAliases

Additional names of virtual hosts served by this virtual host configuration.

Type: list of string

Default

[ ]

Example

["www.example.org""www.example.org:8080""example.org"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.sslServerCert

Path to server SSL certificate. Type: path

Example

"/var/host.cert"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.sslServerChain

Path to server SSL chain file. Type: null or path

Default

null

Example

"/var/ca.pem"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.sslServerKey

Path to server SSL certificate key. Type: path

Example

"/var/host.key"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix

services.nagios.virtualHost.useACMEHost

A host of an existing Let's Encrypt certificate to use. This is useful if you have many subdomains and want to avoid hitting the rate limit. Alternately, you can generate a certificate through {option}enableACME. Note that this option does not create any certificates, nor it does add subdomains to existing ones – you will need to create them manually using .

Type: null or string

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/nagios.nix