Skip to content

Meta Service configuration

NebulaGraph provides two initial configuration files for the Meta Service, nebula-metad.conf.default and nebula-metad.conf.production. Users can use them in different scenarios conveniently. The default file path is /usr/local/nebula/etc/.

Caution

  • It is not recommended to modify the value of local_config to false. If modified, the NebulaGraph service will first read the cached configurations, which may cause configuration inconsistencies between clusters and cause unknown risks.
  • It is not recommended to modify the configurations that are not introduced in this topic, unless you are familiar with the source code and fully understand the function of configurations.

How to use the configuration files

To use the initial configuration file, choose one of the above two files and delete the suffix .default or .production from the initial configuration file for the Meta Service to apply the configurations defined in it.

About parameter values

If a parameter is not set in the configuration file, NebulaGraph uses the default value. Not all parameters are predefined. And the predefined parameters in the two initial configuration files are different. This topic uses the parameters in nebula-metad.conf.default.

Caution

Some parameter values in the configuration file can be dynamically modified during runtime. We label these parameters as Yes that supports runtime dynamic modification in this article. When the local_config value is set to true, the dynamically modified configuration is not persisted, and the configuration will be restored to the initial configuration after the service is restarted. For more information, see Modify configurations.

For all parameters and their current values, see Configurations.

Basics configurations

Name Predefined value Description Whether supports runtime dynamic modifications
daemonize true When set to true, the process is a daemon process. No
pid_file pids/nebula-metad.pid The file that records the process ID. No
timezone_name - Specifies the NebulaGraph time zone. This parameter is not predefined in the initial configuration files. You can manually set it if you need it. The system default value is UTC+00:00:00. For the format of the parameter value, see Specifying the Time Zone with TZ. For example, --timezone_name=UTC+08:00 represents the GMT+8 time zone. No

Note

  • While inserting property values of time types, NebulaGraph transforms time types (except TIMESTAMP) to the corresponding UTC according to the time zone specified by timezone_name. The time-type values returned by nGQL queries are all UTC time.
  • timezone_name is only used to transform the data stored in NebulaGraph. Other time-related data of the NebulaGraph processes still uses the default time zone of the host, such as the log printing time.

License configurations

Enterpriseonly

The license configurations are for the Enterprise Edition only.

Name Predefined value Description Whether supports runtime dynamic modifications
license_manager_url - The address of license manager. Set the value to the host IP and port number 9119 where the license management tool is located in the Meta service configuration file of NebulaGraph (nebula-metad.conf), e.g. 192.168.8.100:9119. No

Logging configurations

Name Predefined value Description Whether supports runtime dynamic modifications
log_dir logs The directory that stores the Meta Service log. It is recommended to put logs on a different hard disk from the data. No
minloglevel 0 Specifies the minimum level of the log. That is, log messages at or above this level. Optional values are 0 (INFO), 1 (WARNING), 2 (ERROR), 3 (FATAL). It is recommended to set it to 0 during debugging and 1 in a production environment. If it is set to 4, NebulaGraph will not print any logs. Yes
v 0 Specifies the detailed level of VLOG. That is, log all VLOG messages less or equal to the level. Optional values are 0, 1, 2, 3, 4, 5. The VLOG macro provided by glog allows users to define their own numeric logging levels and control verbose messages that are logged with the parameter v. For details, see Verbose Logging. Yes
logbufsecs 0 Specifies the maximum time to buffer the logs. If there is a timeout, it will output the buffered log to the log file. 0 means real-time output. This configuration is measured in seconds. No
redirect_stdout true When set to true, the process redirects thestdout and stderr to separate output files. No
stdout_log_file metad-stdout.log Specifies the filename for the stdout log. No
stderr_log_file metad-stderr.log Specifies the filename for the stderr log. No
stderrthreshold 3 Specifies the minloglevel to be copied to the stderr log. No
timestamp_in_logfile_name true Specifies if the log file name contains a timestamp. true indicates yes, false indicates no. No

Networking configurations

Name Predefined value Description Whether supports runtime dynamic modifications
meta_server_addrs 127.0.0.1:9559 Specifies the IP addresses and ports of all Meta Services. Multiple addresses are separated with commas. No
local_ip 127.0.0.1 Specifies the local IP for the Meta Service. The local IP address is used to identify the nebula-metad process. If it is a distributed cluster or requires remote access, modify it to the corresponding address. No
port 9559 Specifies RPC daemon listening port of the Meta service. The external port for the Meta Service is predefined to 9559. The internal port is predefined to port + 1, i.e., 9560. Nebula Graph uses the internal port for multi-replica interactions. No
ws_ip 0.0.0.0 Specifies the IP address for the HTTP service. No
ws_http_port 19559 Specifies the port for the HTTP service. No
ws_storage_http_port 19779 Specifies the Storage service listening port used by the HTTP protocol. It must be consistent with the ws_http_port in the Storage service configuration file. This parameter only applies to standalone NebulaGraph. No
heartbeat_interval_secs 10 Specifies the default heartbeat interval. Make sure the heartbeat_interval_secs values for all services are the same, otherwise NebulaGraph CANNOT work normally. This configuration is measured in seconds. Yes

Caution

The real IP address must be used in the configuration file. Otherwise, 127.0.0.1/0.0.0.0 cannot be parsed correctly in some cases.

Storage configurations

Name Predefined Value Description Whether supports runtime dynamic modifications
data_path data/meta The storage path for Meta data. No

Misc configurations

Name Predefined Value Description Whether supports runtime dynamic modifications
default_parts_num 10 Specifies the default partition number when creating a new graph space. No
default_replica_factor 1 Specifies the default replica number when creating a new graph space. No

RocksDB options configurations

Name Predefined Value Description Whether supports runtime dynamic modifications
rocksdb_wal_sync true Enables or disables RocksDB WAL synchronization. Available values are true (enable) and false (disable). No

Black box configurations

Enterpriseonly

The Nebula-BBox configurations are for the Enterprise Edition only.

Name Predefined Value Description Whether supports runtime dynamic modifications
ng_black_box_switch true Whether to enable the Nebula-BBox feature. No
ng_black_box_home black_box The name of the directory to store Nebula-BBox file data. No
ng_black_box_dump_period_seconds 5 The time interval for Nebula-BBox to collect metric data. Unit: Second. No
ng_black_box_file_lifetime_seconds 1800 Storage time for Nebula-BBox files generated after collecting metric data. Unit: Second. Yes

Zone configurations

Name Predefined Value Description Whether supports runtime dynamic modifications
zone_list Empty A list of Zone names. When the value is not empty, the Zone feature is enabled. For details, see Manage Zones. No

Last update: September 19, 2023