dhconfig properties

The properties (or property) configuration data type of the dhconfig tool works with properties files stored in the system. properties also handles other types of configuration files, such as status-dashboard-defaults.json.

dhconfig properties [import|export|list|validate|delete|help] [arguments]

As with other dhconfig configuration data types, the --help argument provides detailed information on the available actions and arguments, as well as usage examples. Use --help whenever you need more information about the available options. For example, if you want information about the import action, you can run:

dhconfig properties import --help

Which prints the following:

usage: dhconfig properties import [--configfile <arg>] [-d <arg>] [--diskprops] [--etcd] [-f <arg>] [-force] [-h] [-k
       <arg> | -user <arg>] [-pf <arg>] [-r <arg>] [-u]  [-v]
Import properties files from disk.

...followed by a description of all of the subcommand's arguments and some usage examples.

Due to the number of available options and combinations, and the robust in-tool documentation via --help, an exhaustive list of all possible commands is not provided here. Instead, we will elaborate on some of the more complex arguments below, and then give some usage examples. We recommend that you use the --help argument as needed for more information.

Arguments

ArgumentDescription
-r,--rename <arg>When importing from a single file, assign a new name when stored in the system.
-u,--update-on-sameWhen importing a file, update the system even if the file contents are unchanged.
-force,--forceWhen a properties file is imported, dhconfig also validates the file like the validate action. The --force option can be used to import a file that has apparent errors. Use with care because this can cause problems later.

Examples

export

Export all properties files to /tmp:

/usr/illumon/latest/bin/dhconfig properties export --directory /tmp

Export all properties files to /tmp, bypassing configuration service:

/usr/illumon/latest/bin/dhconfig properties export --directory /tmp --etcd

Note

Bypassing configuration server: When you use the --etcd option, dhconfig connects directly to the etcd database, skipping the Configuration Server. This should only be done by administrators with the necessary permissions and is typically used for troubleshooting or recovery when the Configuration Server is unavailable.

Print iris-environment.prop:

/usr/illumon/latest/bin/dhconfig properties export iris-environment.prop

Export iris-environment.prop to local file:

/usr/illumon/latest/bin/dhconfig properties export iris-environment.prop > /tmp/my_properties.prop

Export iris-environment.prop and iris-endpoints.prop to /tmp:

/usr/illumon/latest/bin/dhconfig properties export --directory /tmp iris-environment.prop iris-endpoints.prop
/usr/illumon/latest/bin/dhconfig properties export --directory . --file iris-environment.prop --file iris-endpoints.prop

import

Note

Import actions require authentication, with sudo, --key, or --user.

Import my_properties.prop as iris-environment.prop:

sudo -u irisadmin /usr/illumon/latest/bin/dhconfig properties import --file /tmp/my_properties.prop --rename iris-environment.prop

Import several properties files from /tmp:

sudo -u irisadmin /usr/illumon/latest/bin/dhconfig properties import /tmp/p1.prop /tmp/p2.prop /tmp/p3.prop
sudo -u irisadmin /usr/illumon/latest/bin/dhconfig properties import --directory /tmp p1.prop p2.prop p3.prop

Import iris-environment.prop from /tmp:

sudo -u irisadmin /usr/illumon/latest/bin/dhconfig properties import /tmp/iris-environment.prop

or:

/usr/illumon/latest/bin/dhconfig properties import /tmp/iris-environment.prop --user iris

list

List all properties files in the system:

/usr/illumon/latest/bin/dhconfig properties list

validate

Use validate to check a properties file for errors without importing. This process parses the file to expose syntax errors and checks for common user errors, such as smart quotes and non-breaking spaces that can be inserted via cut-and-paste from formatted sources.

Validate a file without importing it:

/usr/illumon/latest/bin/dhconfig properties validate /tmp/my_properties.prop

delete

Note

Delete actions require authentication, with sudo, --key, or --user.

Delete a properties file:

sudo -u irisadmin /usr/illumon/latest/bin/dhconfig properties delete --file typo.prop