Charmed MongoDB

Channel Revision Published Runs on
5/edge 114 24 Mar 2023
Ubuntu 22.04
3.6/stable 97 14 Feb 2023
3.6/candidate 97 12 Jan 2023
3.6/edge 100 03 Feb 2023
Ubuntu 20.04 Ubuntu 18.04
juju deploy mongodb --channel 3.6/stable
Show information


  • arbiter | string

    Default: disabled

    DEPRECATED >= 4.2 Enable arbiter mode. Possible values are 'disabled' for no arbiter, 'enable' to become an arbiter or 'host:port' to declare another host as an arbiter. replicaset_master must be set for this option to work.

  • auth | boolean

    Turn on/off security (breaks connection from related database client units)

  • autoresync | boolean

    DEPRECATED >= 4.2 Automatically resync if slave data is stale

  • backup_copies_kept | int

    Default: 7

    Number of backups to keep. Keeps one week's worth by default.

  • backup_directory | string

    Default: /home/ubuntu/backups

    Where can the backups be found.

  • backups_enabled | boolean

    Enable daily backups to disk.

  • bind_ip | string


    IP address that mongodb should listen for connections: - "" (or "all", for backward compatibility) will listen on any configured interface (default value). - "" (or "localhost") will listen on localhost - Any other value needs to map to a unit IP (if multiple units exist, the default value is used).

  • config_server_dbpath | string

    Default: /mnt/var/lib/mongodb/configsvr

    The path where the config server data files will be kept.

  • config_server_logpath | string

    Default: /mnt/var/log/mongodb/configsvr.log

    The path where to send config server log data.

  • config_server_port | int

    Default: 27019

    Port number to use for the config-server

  • cpu | boolean

    DEPRECATED >= 4.2 Enables periodic logging of CPU utilization and I/O wait

  • dbpath | string

    Default: /var/lib/mongodb

    The path where the data files will be kept.

  • diaglog | int

    DEPRECATED >= 4.2 Set oplogging level where n is 0=off (default), 1=W, 2=R, 3=both, 7=W+some reads

  • extra_config_options | string

    Default: none

    DEPRECATED >= 4.2 Extra options ( comma separated ) to be included ( at the end ) in the mongodb.conf file.

  • extra_daemon_options | string

    Default: none

    Extra options ( exactly as you would type them in the command line ) to be added via the command line to the mongodb daemon

  • journal | boolean

    Default: True

    Enable journaling,

  • key | string

    Key ID to import to the apt keyring to support use with arbitary source configuration from outside of Launchpad archives or PPA's.

  • logappend | boolean

    Default: True

    Append log entries to existing log file

  • logpath | string

    Default: /var/log/mongodb/mongodb.log

    The path where to send log data.

  • logrotate-frequency | string

    Default: daily

    How often should the logs be rotated. Use values from logrotate.

  • logrotate-maxsize | string

    Default: 500M

    Maximum log size before rotating.

  • logrotate-rotate | int

    Default: 5

    Number of log files to keep.

  • master | string

    Default: self

    DEPRECATED >= 4.2 Who is the master DB. If not "self", put the Master DB here as "host:port"

  • mongos_logpath | string

    Default: /mnt/var/log/mongodb/mongos.log

    The path where to send log data from the mongo router.

  • mongos_port | int

    Default: 27021

    Port number to use for the mongo router

  • nagios_context | string

    Default: juju

    Used by the nrpe-external-master subordinate charm. 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-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.

  • nagios_servicegroups | string

    A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup

  • noprealloc | boolean

    DEPRECATED >= 4.2 Disable data file preallocation

  • noscripting | boolean

    Turns off server-side scripting. This will result in greatly limited functionality

  • notablescan | boolean

    Turns off table scans. Any query that would do a table scan fails

  • nssize | string

    Default: default

    DEPRECATED >= 4.2 Specify .ns file size for new databases

  • objcheck | boolean

    Inspect all client data for validity on receipt (useful for developing drivers)

  • oplogSize | string

    Default: default

    Custom size for replication operation log

  • package | string

    Default: mongodb-server

    Package name of MongoDB server that will be installed, change if source repository is using different naming. Version of the package can be pinned (e.g. mongodb-org=4.4.0).

  • percona-mode | boolean

    Use this configuration option to enforce the charm to apply the percona mode. This config option is only tested with percona mongodb package. It's mandatory when installing the package from a private repository.

  • port | int

    Default: 27017

    Default MongoDB port

  • quota | boolean

    DEPRECATED >= 4.2 Enable db quota management

  • quotafiles | int

    Default: 8

    DEPRECATED >= 4.2 Limit the number of data files per database. Only effective if quota management is enabled

  • replicaset | string

    Default: myset

    Name of the replica set

  • replicaset_master | string

    Default: auto

    Replica Set master (optional). Possible values are 'auto' for automatic detection based on install time or 'host:port' to connect to 'host' on 'port' and register as a member.

  • source | string

    Default: None

    Optional configuration to support use of additional sources such as: - ppa:myteam/ppa - cloud:precise-proposed/icehouse - main The last option should be used in conjunction with the key configuration option.

  • verbose | boolean

    Verbose logging output

  • volume-dev-regexp | string

    Default: /dev/vd[b-z]

    Deprecated, use the storage subordinate. Block device for attached volumes as seen by the VM, will be "scanned" for an unused device when "volume-map" is valid for the unit.

  • volume-ephemeral-storage | boolean

    Default: True

    Deprecated, use the storage subordinate. If false, a configure-error state will be raised if volume-map[$JUJU_UNIT_NAME] is not set (see "volume-map" below) - see "volume-map" below. If true, service units won't try to use "volume-map" (and related variables) to mount and use external (EBS) volumes, thus storage lifetime will equal VM, thus ephemeral. YOU'VE BEEN WARNED.

  • volume-map | string

    Deprecated, use the storage subordinate. YAML map as e.g. "{ mongodb/0: vol-0000010, mongodb/1: vol-0000016 }". Service units will raise a "configure-error" condition if no volume-map value is set for it - it expects a human to set it properly to resolve it.

  • web_admin_ui | boolean

    Default: True

    DEPRECATED >= 4.2 Replica Set Admin UI (accessible via default_port + 1000)