Upgrading Prometheus

ZStack uses Prometheus to provide data monitoring features. Currently, the following two Prometheus versions are supported by ZStack:
  • Prometheus 1.8.2: This version is supported by all versions of ZStack.
  • Prometheus 2.9.2: This version is supported by ZStack 3.5.0 and later versions. Compared with its earlier versions, Prometheus 2.9.2 greatly improves the system stability, resource usage, and functionality.

Version Upgrade Mechanism

When you upgrade ZStack, note that:
  • If you upgrade ZStack from a version earlier than 3.5.0 to ZStack 3.5.0 or a later version, Prometheus 1.8.2 is used by default.
  • If you upgrade ZStack from 3.5.0 or a later version, the existing Prometheus version does not change.
  • If you install ZStack 3.5.0 or a later version for the first time, Prometheus 2.9.2 is used by default.

Switching Prometheus Versions

ZStack 3.5.0 and later versions support both Prometheus 1.8.2 and Prometheus 2.9.2. You can switch between these two versions by using the following methods:
  • Run the following commands to switch from Prometheus 1.8.2 to Prometheus 2.9.2:
    [root@localhost ~]# zstack-ctl configure Prometheus.versionMode=2.x [root@localhost ~]# zstack-ctl restart_node
    Note: After you upgrade ZStack from a version earlier than 3.5.0 to ZStack 3.5.0 or a later version, if you re-enable Prometheus 2.9.2, the existing monitoring data would not be available. To make sure that the existing monitoring data is available when you enable Prometheus 2.9.2, run the following commands:
    [root@localhost ~]# zstack-ctl configure Prometheus.versionMode=2.x-compatible [root@localhost ~]# zstack-ctl restart_node
  • Run the following commands to switch from Prometheus 2.9.2 to Prometheus 1.8.2:
    [root@localhost ~]# zstack-ctl configure Prometheus.versionMode=1.8.2 [root@localhost ~]# zstack-ctl restart_node
  • Run the following commands to disable Prometheus. Note that the monitoring data is not available after Prometheus is disabled.
    [root@localhost ~]# zstack-ctl configure Prometheus.versionMode=none [root@localhost ~]# zstack-ctl restart_node

Global Settings

Prometheus supports the following two global settings. You can configure the settings by going to Settings > Global Settings > Advanced.
  • Retention time of Monitoring data: The number of months that the monitoring data can be retained locally. Maximum value: 12 months. Default value: 6 months.
  • Retention size of Monitoring data: For Prometheus 2.9.2, you can set this parameter to limit the space used by the monitoring directory. Default value: 50 GB.

zstack.properties Core Configuration File

zstack.properties is a core configuration file of ZStack and is stored in each management node.

The zstack.properties file stores information such as the database URL, the user name and password for database access, and the IP address of the message bus. The content of the zstack.properties file in each management node is basically the same. You can obtain the path of the file by running the zstack-ctl status command.

If you use the default installation mode, the file is stored in /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties.

zstack.properties Parameters

The following table lists the parameters in the zstack.properties file.
Table 1. zstack.properties
Category Parameter Description
Database
  • Single-MN environment: DB.url = jdbc:mysql://Actual IP address of the MN:3306
  • Dual-MN environment: DB.url = jdbc:mysql://VIP:3306
The URL and port of the database.
DB.user = zstack The user name of the database.
DB.password = REoVaLs+sSFz5WKl8KVzjPQOt0gyL7MpkkIx6PjNB6urlpkp4U1rQsDkHGekirfG The password of the database. Default password: zstack.password.
Note: The Cloud encrypts the password of the database to ensure the account security.
SFTP backup storage SftpBackupStorageFactory.agentPort = 7171 The port of the SFTP backup storage.
Ansible Ansible.cfg.forks = 100 The forks value of Ansible.
Ansible.cfg.host_key_checking = False The host_key_checking value of Ansible.
Ansible.cfg.pipelining = True The pipelining value of Ansible.
Ansible.keepHostsFileInMemory = false Whether to reserve ansible/hosts in the memory.
Ansible.cfg.ssh_connection.ssh_args = -C -o ControlMaster=auto -o ControlPersist=1800s The SSH connection parameters of Ansible.
Message bus CloudBus.serverIp.0 = 10.0.5.87 The IP address of the CloudBus server.
Log org.jboss.logging.provider = slf4j The log service provider.
Console consoleProxyCertFile = /usr/local/zstack/zstack-ui/ui.keystore.pem The console certificate.
consoleProxyOverriddenIp = 172.20.11.50 The external IP address of the console proxy.
consoleProxyPort = 4900 The port of the console proxy.
ZWatch/SNS
  • Single-MN environment: sns.systemTopic.endpoints.http.url = http://localhost:5000/zwatch/webhook
  • Dual-MN environment: sns.systemTopic.endpoints.http.url = http://VIP:5000/zwatch/webhook
  • Dual-MN environment: ticket.sns.topic.http.url = http://VIP:5000/zwatch/webhook
The system endpoint for receiving ZWatch notifications.
ZStack YUM Ansible.var.zstack_repo = "zstack-mn,qemu-kvm-ev-mn" The name of the YUM repository used by ZStack.
Management node (MN) service
  • Single/Dual-MN environment: management.server.ip = Actual IP address of the MN
  • Dual-MN environment: management.server.vip = VIP
The IP address of the MN server.
chrony chrony.serverIp.0 = 10.0.5.87 The IP address of the chrony server.
Default iptables rules of a KVM host KvmHost.iptables.rule.0 = '-I INPUT -p tcp -m tcp --dport 1234 -j ACCEPT' The preset iptables rules of the KVM compute node.
KvmHost.iptables.rule.1 = '-I INPUT -p tcp -m tcp --dport 2345 -j ACCEPT' The preset iptables rules of the KVM compute node.
ImageStore server imagestore.backupstorage.primary.storage.priority = [{\"PS\":\"Ceph\"\, \"priority\":\"5\"}\, {\"PS\":\"LocalStorage\"\, \"priority\":\"10\"}] Specifies the primary storage allocation priority for backup storages with the ImageStore type. The smaller the number, the higher the priority.

Notice

  • For versions earlier than 3.2.0, you can configure the default API timeout in the zstack.properties file. For example,
    ApiTimeout.org.zstack.header.image.APIAddImageMsg = timeout::3h
    The above method also applies to 3.2.0. If you upgrade the Cloud to 3.2.0 or a later version, when you set the timeout for corresponding APIs in the global settings, you can use the API timeout configured in zstack.properties as the default value.
    Note: After you upgrade the Cloud to 3.2.0 or a later version, you can configure the API timeout in global settings instead of by using zstack.properties.
  • From ZStack 3.3.0, you can set the AD/LDAP or email server connection timeout as needed. Method:
    Go to /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties, and set the following parameters in the zstack.properties configuration file:
    • Ldap.addServer.connectTimeout = XX # Set the AD/LDAP connection timeout.
    • SNS.addEmailPlatform.connectTimeout = XX # Set the email server connection timeout.
    • SNS.addEmailPlatform.readTimeout = XX # Set the data read timeout for an email server.
    Note:
    • By default, the timeout value of the preceding three parameters is 5000. Unit: ms.
    • If you need to modify the timeout, run the zstack-ctl configure command. For example,
      [root@localhost ~]# zstack-ctl configure Ldap.addServer.connectTimeout = 10000 [root@localhost ~]# zstack-ctl configure SNS.addEmailPlatform.connectTimeout = 10000 [root@localhost ~]# zstack-ctl configure SNS.addEmailPlatform.readTimeout = 10000

      After the settings are completed, restart the management node by running the zstack-ctl restart_node command to take effect.

  • From ZStack 3.3.0, you can set the memory name for ivshmem devices (also known as virtual PCI devices that implement memory sharing between VM instances and hosts). Method:
    Go to /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties, and set the following parameter in the zstack.properties configuration file:
    Kvm.ivshmem.dev.prefix = nu_fsec-$prefix$VMUUID # Set a name for the shared memory.
  • From ZStack 3.3.0, you can set the maximum number of concurrent threads for querying the total count of alarm messages. Method:
    Go to /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties, and set the following parameters in the zstack.properties configuration file:
    • InfluxDB.query.alarmData.count.maxThreadNum = 30 # Set the maximum number of concurrent threads for querying the total count of alarm messages triggered by the resource alarm. Default value: 30.
    • InfluxDB.query.eventData.count.maxThreadNum = 30 # Set the maximum number of concurrent threads for querying the total count of alarm messages triggered by the resource alarm. Default value: 30.
  • From ZStack 3.7.1, you can set the zstack-hamon port for the monitoring service in the multi-MN HA scenario. Method:
    Go to /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties, and set the following parameter in the zstack.properties configuration file:
    Prometheus.zsha2ExporterPort = 18081 # Set the zstack-hamon port for the monitoring service in the multi-MN HA scenario. # By default, port 18081 is the exporter of Prometheus.
  • From ZStack 3.9.0, you can set the primary storage priority when the backup storage type is local storage. Method:
    Go to /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties, and set the following parameter in the zstack.properties configuration file:
    imagestore.backupstorage.primary.storage.priority = [\{\"PS\":\"Ceph\"\, \"priority\":\"10\"}\, \{\"PS\":\"LocalStorage\"\, \"priority\":\"1\"}]    # With this configuration, the primary storage of the local storage type is used for VM instances.
  • From ZStack 3.10.0, you can set the log language as needed. Method:
    Go to /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties, and set the following parameter in the zstack.properties configuration file:
    locale = en








Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.