---
title: Charmhub | Deploy Nagios using Charmhub - The Open Operator Collection
description: Deploy the latest version of Nagios on any cloud.
url: https://charmhub.io/nagios/configurations
---

# Nagios

[Llama (LMA) Charmers](https://charmhub.io/publisher/llama-charmers "View all packages from Llama (LMA) Charmers")

* [Llama (LMA) Charmers](https://charmhub.io/publisher/llama-charmers "View all packages from Llama (LMA) Charmers")
* [Monitoring](https://charmhub.io/?filter=monitoring)

Platform:

18.04

16.04

14.04

stable 63

```
juju deploy nagios
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [admin\_email](https://charmhub.io/nagios/configurations#admin_email)
* [admin\_host\_notification\_commands](https://charmhub.io/nagios/configurations#admin_host_notification_commands)
* [admin\_host\_notification\_options](https://charmhub.io/nagios/configurations#admin_host_notification_options)
* [admin\_host\_notification\_period](https://charmhub.io/nagios/configurations#admin_host_notification_period)
* [admin\_pager](https://charmhub.io/nagios/configurations#admin_pager)
* [admin\_service\_notification\_commands](https://charmhub.io/nagios/configurations#admin_service_notification_commands)
* [admin\_service\_notification\_options](https://charmhub.io/nagios/configurations#admin_service_notification_options)
* [admin\_service\_notification\_period](https://charmhub.io/nagios/configurations#admin_service_notification_period)
* [check\_external\_commands](https://charmhub.io/nagios/configurations#check_external_commands)
* [check\_timeout](https://charmhub.io/nagios/configurations#check_timeout)
* [command\_check\_interval](https://charmhub.io/nagios/configurations#command_check_interval)
* [command\_file](https://charmhub.io/nagios/configurations#command_file)
* [contactgroup-members](https://charmhub.io/nagios/configurations#contactgroup-members)
* [daemon\_dumps\_core](https://charmhub.io/nagios/configurations#daemon_dumps_core)
* [debug\_file](https://charmhub.io/nagios/configurations#debug_file)
* [debug\_level](https://charmhub.io/nagios/configurations#debug_level)
* [debug\_verbosity](https://charmhub.io/nagios/configurations#debug_verbosity)
* [email\_max\_notifications](https://charmhub.io/nagios/configurations#email_max_notifications)
* [enable\_livestatus](https://charmhub.io/nagios/configurations#enable_livestatus)
* [enable\_pagerduty](https://charmhub.io/nagios/configurations#enable_pagerduty)
* [extra\_contacts](https://charmhub.io/nagios/configurations#extra_contacts)
* [extraconfig](https://charmhub.io/nagios/configurations#extraconfig)
* [flap\_detection](https://charmhub.io/nagios/configurations#flap_detection)
* [livestatus\_args](https://charmhub.io/nagios/configurations#livestatus_args)
* [livestatus\_enable\_xinetd](https://charmhub.io/nagios/configurations#livestatus_enable_xinetd)
* [livestatus\_path](https://charmhub.io/nagios/configurations#livestatus_path)
* [livestatus\_xinetd\_only\_from](https://charmhub.io/nagios/configurations#livestatus_xinetd_only_from)
* [livestatus\_xinetd\_port](https://charmhub.io/nagios/configurations#livestatus_xinetd_port)
* [load\_monitor](https://charmhub.io/nagios/configurations#load_monitor)
* [log\_archive\_path](https://charmhub.io/nagios/configurations#log_archive_path)
* [log\_rotation\_method](https://charmhub.io/nagios/configurations#log_rotation_method)
* [monitor\_self](https://charmhub.io/nagios/configurations#monitor_self)
* [nagios\_group](https://charmhub.io/nagios/configurations#nagios_group)
* [nagios\_host\_context](https://charmhub.io/nagios/configurations#nagios_host_context)
* [nagios\_user](https://charmhub.io/nagios/configurations#nagios_user)
* [nagiosadmin](https://charmhub.io/nagios/configurations#nagiosadmin)
* [notification\_interval](https://charmhub.io/nagios/configurations#notification_interval)
* [notification\_options](https://charmhub.io/nagios/configurations#notification_options)
* [nrpe\_packet\_version](https://charmhub.io/nagios/configurations#nrpe_packet_version)
* [pagerduty\_key](https://charmhub.io/nagios/configurations#pagerduty_key)
* [pagerduty\_notification\_levels](https://charmhub.io/nagios/configurations#pagerduty_notification_levels)
* [pagerduty\_path](https://charmhub.io/nagios/configurations#pagerduty_path)
* [password](https://charmhub.io/nagios/configurations#password)
* [ro-password](https://charmhub.io/nagios/configurations#ro-password)
* [send\_traps\_to](https://charmhub.io/nagios/configurations#send_traps_to)
* [sender\_email](https://charmhub.io/nagios/configurations#sender_email)
* [service\_check\_timeout](https://charmhub.io/nagios/configurations#service_check_timeout)
* [service\_check\_timeout\_state](https://charmhub.io/nagios/configurations#service_check_timeout_state)
* [site\_name](https://charmhub.io/nagios/configurations#site_name)
* [ssl](https://charmhub.io/nagios/configurations#ssl)
* [ssl\_cert](https://charmhub.io/nagios/configurations#ssl_cert)
* [ssl\_chain](https://charmhub.io/nagios/configurations#ssl_chain)
* [ssl\_key](https://charmhub.io/nagios/configurations#ssl_key)
* [traps\_host\_notification\_options](https://charmhub.io/nagios/configurations#traps_host_notification_options)
* [traps\_service\_notification\_options](https://charmhub.io/nagios/configurations#traps_service_notification_options)
* [use\_syslog](https://charmhub.io/nagios/configurations#use_syslog)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* admin\_email | string

  Default: root@localhost

  Comma separated list of email addresses used for the admin,
  used by $ADMINEMAIL$ in notification commands. If specify multiples emails,
  contactgroup-members will be ignored.
* admin\_host\_notification\_commands | string

  Default: notify-host-by-email

  This directive is used to define a list of the short names of the commands
  used to notify the default admin contact of a host problem or recovery.
  Change this or add commands if you have custom notification plugins.
  Multiple notification commands should be separated by commas.
  All notification commands are executed when the contact needs to be notified.
* admin\_host\_notification\_options | string

  Default: d,r

  This directive is used to define the host states for which notifications
  can be sent out to the default admin contact. Valid options are a combination of one
  or more of the following:
  d = notify on DOWN host states,
  u = notify on UNREACHABLE host states,
  r = notify on host recoveries (UP states),
  f = notify when the host starts and stops flapping,
  s = send notifications when host or service scheduled downtime starts and ends.
  If you specify n (none) as an option, the contact will not receive any type of host notifications.
* admin\_host\_notification\_period | string

  Default: 24x7

  This directive is used to specify the short name of the time period during
  which the default admin contact can be notified about host problems or recoveries.
  You can think of this as an "on call" time for host notifications
  for the contact. Read the documentation on time periods for more information
  on how this works and potential problems that may result from improper use.
* admin\_pager | string

  Default: pageroot@localhost

  Email address used for the admin pager, used by $ADMINPAGER$ in
  notification commands.
* admin\_service\_notification\_commands | string

  Default: notify-service-by-email

  This directive is used to define a list of the short names of the commands
  used to notify the default admin contact of a service problem or recovery.
  Change this or add commands if you have custom notification plugins.
  Multiple notification commands should be separated by commas.
  All notification commands are executed when the contact needs to be notified.
* admin\_service\_notification\_options | string

  Default: w,u,c,r

  This directive is used to define the service states for which notifications
  can be sent out to the default admin contact. Valid options are a combination of one
  or more of the following:
  w = notify on WARNING service states,
  u = notify on UNKNOWN service states,
  c = notify on CRITICAL service states,
  r = notify on service recoveries (OK states),
  f = notify when the service starts and stops flapping.
  If you specify n (none) as an option, the contact will not receive any type of service notifications.
* admin\_service\_notification\_period | string

  Default: 24x7

  This directive is used to specify the short name of the time period during
  which the default admin contact can be notified about service problems or recoveries.
  You can think of this as an "on call" time for service notifications
  for the contact. Read the documentation on time periods for more information
  on how this works and potential problems that may result from improper use.
* check\_external\_commands | int

  Default: 1

  Config variable to enable checking external commands - 0 is disable, 1 is enable.
* check\_timeout | int

  Default: 10

  A number of seconds before nrpe checks timeout from not being able
  to connect to the client or finish execution of the command.
  Raise this value to combat 'CHECK\_NRPE Socket timeout alerts'
* command\_check\_interval | string

  Default: -1

  How often to check for external commands.
* command\_file | string

  Default: /var/lib/nagios3/rw/nagios.cmd

  File that Nagios checks for external command requests.
* contactgroup-members | string

  Default: root

  Comma separated list of contacts to add as members of the admins
  group.
* daemon\_dumps\_core | int

  Option to determine if Nagios is allowed to create a core dump.
* debug\_file | string

  Default: /var/log/nagios3/nagios.debug

  Path for the debug file.
* debug\_level | int

  Specify the debug level for nagios. See the docs for more details.
* debug\_verbosity | int

  Default: 1

  How verbose will the debug logs be - 0 is brief, 1 is more detailed
  and 2 is very detailed.
* email\_max\_notifications | int

  Specify how many times to send mails for a given alert.

  By default, the notify-host-by-email and notify-service-by-email commands will send
  email for every notification. If re-notification is enabled, this may not be
  desireable. (For example, if re-notification is used in conjunction with PagerDuty,
  it may be desireable to re-notify PagerDuty but not re-send emails.)

  If this is set to a positive integer, these commands will be modified so emails are
  only sent up to the specified number of times per alert, after which no more emails
  will be sent. For example, setting this to 1 will make the email commands send
  email on the first occurance of any alert, but not on any re-notifications.

  If set to 0, the default behavior is maintained.
* enable\_livestatus | boolean

  Config variable to enable livestatus module or not.
* enable\_pagerduty | boolean

  Config variable to enable pagerduty notifications or not.
* extra\_contacts | string

  Define extra contacts for Nagios. They will be appended in the
  default administrators contact group. This is useful for adding
  notification integrations with external services.
  Contacts are passed as a YAML array, and must have a contact name,
  a command to be executed for host notifications and a command to
  be executed for service notifications. These commands may use all
  relevant Nagios macros ($HOSTNAME$, $SERVICENAME$, etc). Refer to
  the Nagios documentation for more information.
  Only [A-Za-z0-9\_-] contact names are valid. Be careful with
  commands, since they are not sanitized.
  Example

  + name: opsteam\_email
    host: /usr/bin/sendmail -s "alert for $HOSTNAME$" opsteam@mycompany.com
    service: /usr/bin/sendmail -s "alert for $SERVICENAME$" opsteam@mycompany.com
  + name: snmp\_collector
    host: /path/to/snmp/helper ....
    service: /path/to/snmp/helper ....
* extraconfig | string

  Any additional nagios configuration you would like to
  add can be set into this element. It will be placed in
  /etc/nagios3/conf.d/extra.cfg
* flap\_detection | boolean

  Default: True

  Enable flap detection on monitored hosts and services.
* livestatus\_args | string

  Arguments to be passed to the livestatus module, defaults to empty.
* livestatus\_enable\_xinetd | boolean

  Expose livestatus socket through a network port using xinetd.
  NOTE: this socket does not support authentication nor authorization, so exposing it to the
  network will enable everyone to query it, so it is recommended to limit the hosts that
  can send queries by listing those hosts in the the livestatus\_xinetd\_only\_from option.
* livestatus\_path | string

  Default: /var/lib/nagios3/livestatus/socket

  Default path to livestatus socket, if enabled via enable\_livestatus
* livestatus\_xinetd\_only\_from | string

  Default: 127.0.0.1

  List of space-separated IPs that will be able to access livestatus through xinetd. If left empty,
  only localhost will be able to access it.
* livestatus\_xinetd\_port | string

  Default: 6557

  Port to be used for livestatus through xinetd.
* load\_monitor | string

  Default: 5.0!4.0!3.0!10.0!6.0!4.0

  A string to pass to the Nagios load monitoring command. Default is
  to report warning at 5.0, 4.0 and 3.0 averages, critical at 10.0,
  6.0 and 4.0.
* log\_archive\_path | string

  Default: /var/log/nagios3/archives

  Path for archived log files
* log\_rotation\_method | string

  Default: d

  Log rotation method that Nagios should use to rotate the main logfile.
* monitor\_self | boolean

  Default: True

  If true, enable monitoring of the nagios unit itself.
* nagios\_group | string

  Default: nagios

  The effective group that nagios will run as.
* nagios\_host\_context | string

  Default: juju

  a string that will be prepended to instance name to set the host name
  in nagios. So for instance the hostname would be something like:
  juju-postgresql-0
  If you're running multiple environments with the same services in them
  this allows you to differentiate between them.
* nagios\_user | string

  Default: nagios

  The effective user that nagios will run as.
* nagiosadmin | string

  Default: nagiosadmin

  Username for Nagios admin user.
* notification\_interval | int

  Interval at which to send notifications for an alert. This will be in minutes as long
  as the global-level config option interval\_length remains at the default of 60 seconds.

  The default, 0, means to never re-alert.
* notification\_options | string

  Default: w,u,c,r,f,s

  This directive is used to define the service states for which notifications
  can be created. Valid options are a combination of one or more of the following:
  w = notify on WARNING service states,
  u = notify on UNKNOWN service states,
  c = notify on CRITICAL service states,
  r = notify on service recoveries (OK states),
  f = notify when the service starts and stops flapping.
  s = notify when the scheduled downtime starts and ends.
  If you specify n (none) as an option, the contact will not receive any type of service notifications.
* nrpe\_packet\_version | int

  Default: 3

  Defines the nrpe packet version to use

  The valid options are 2 and 3

  https://support.nagios.com/kb/article.php?id=518
* pagerduty\_key | string

  Pagerduty API key to use for notifications
* pagerduty\_notification\_levels | string

  Default: u,c,r,f,s

  A string to use for the service\_notification\_options in the
  pagerduty contact configuration. Add w to page for warning events.
* pagerduty\_path | string

  Default: /var/lib/nagios3/pagerduty

  Path for Pagerduty notifications to be queued.
* password | string

  Password to use for Nagios administrative access. If not
  provided, a password will be generated (see documentation for
  instructions on retrieving the generated password.)
* ro-password | string

  Password to use for read-only Nagios access. If left blank, the nagiosro account will not be created.
* send\_traps\_to | string

  Defines the IP or Host Name to send snmp traps to. Leave blank (empty) to disable
  the traps functionality.
* sender\_email | string

  The email from which Nagios will try sending emails. If
  unset, the message will not include an explicit sender address and a
  default value will be added by the MTA, typically “user@host”.
* service\_check\_timeout | int

  Default: 60

  Number of seconds Nagios allows for a service check before killing
  it off. This ties in with service\_check\_timeout\_state. NRPE will
  alert for the lower of this value or check\_timeout. Also note that
  host\_check\_timeout is set to 30 seconds, and it's preferred to have
  service\_check\_timout greater than host\_check\_timeout.
* service\_check\_timeout\_state | string

  Default: c

  This setting determines the state Nagios will report when a
  service check times out - that is does not respond within
  service\_check\_timeout seconds. This can be useful if a
  machine is running at too high a load and you do not want
  to consider a failed service check to be critical (the default).
  Valid settings are:
  c - Critical (default)
  u - Unknown
  w - Warning
  o - OK
* site\_name | string

  An unique site name for Nagios deployment
* ssl | string

  Default: off

  Enable SSL communication for Nagios. Possible values are
  "on", "off", or "only". The "only" option disables
  All HTTP communication in favor of HTTPS - may play havok with
  existing nagios deployments.
* ssl\_cert | string

  base64 encoded server certificate. If left blank, the certificate
  and key will be autogenerated as self-signed.
* ssl\_chain | string

  base64 encoded chain certificates file. If ssl\_cert is
  blank, this will be ignored.
* ssl\_key | string

  base64 encoded server certificate key. If ssl\_cert is
  blank, this is ignored.
* traps\_host\_notification\_options | string

  Default: d,r

  This directive is used to define the host states for which notifications
  can be sent out to the default traps contact. Valid options are a combination of one
  or more of the following:
  d = notify on DOWN host states,
  u = notify on UNREACHABLE host states,
  r = notify on host recoveries (UP states),
  f = notify when the host starts and stops flapping,
  s = send notifications when host or service scheduled downtime starts and ends.
  If you specify n (none) as an option, the contact will not receive any type of host notifications.
* traps\_service\_notification\_options | string

  Default: w,u,c,r

  This directive is used to define the service states for which notifications
  can be sent out to the default traps contact. Valid options are a combination of one
  or more of the following:
  w = notify on WARNING service states,
  u = notify on UNKNOWN service states,
  c = notify on CRITICAL service states,
  r = notify on service recoveries (OK states),
  f = notify when the service starts and stops flapping.
  If you specify n (none) as an option, the contact will not receive any type of service notifications.
* use\_syslog | int

  Default: 1

  Log messages to syslog as well as main file.
