oVirt从4.4开始集成了Grafana作为监控门户,但使用oVirt Node+HostedEngine方式部署的环境默认是未开启的,如果想使用的话,可以在部署完成后通过engine-setup重新开启Grafana,以下为具体步骤:
1、首先在Node主机上将HostedEngine设置为全局维护模式,执行以下命令:
hosted-engine –set-maintenance –mode=global
2、在HostedEngine里重新setup,执行以下命令:
engine-setup –reconfigure-optional-components
注意Grafana的配置项选择默认的Yes:Configure Grafana on this host (Yes, No) [Yes]:
注意有配置Grafana用户密码的地方,具体过程如下:
[root@engine100 ~]# engine-setup –reconfigure-optional-components
[ INFO ] Stage: Initializing
[ INFO ] Stage: Environment setup
Configuration files: /etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf, /etc/ovirt-engine-setup.conf.d/10-packaging.conf, /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf
Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20210324174226-sqingw.log
Version: otopi-1.9.4 (otopi-1.9.4-1.el8)
[ INFO ] Stage: Environment packages setup
[ INFO ] Stage: Programs detection
[ INFO ] Stage: Environment setup (late)
[ INFO ] Stage: Environment customization
–== PRODUCT OPTIONS ==–
Configure Cinderlib integration (Currently in tech preview) (Yes, No) [No]:
[ INFO ] ovirt-provider-ovn already installed, skipping.
Configure Grafana on this host (Yes, No) [Yes]:
–== PACKAGES ==–
[ INFO ] Checking for product updates…
[ INFO ] No product updates found
–== NETWORK CONFIGURATION ==–
Setup can automatically configure the firewall on this system.
Note: automatic configuration of the firewall may overwrite current settings.
Do you want Setup to configure the firewall? (Yes, No) [Yes]:
[ INFO ] firewalld will be configured as firewall manager.
–== DATABASE CONFIGURATION ==–
DWH database is on localhost, user for Grafana not configured yet.
Create a local user for Grafana? (Yes, No) [Yes]:
The detected DWH database size is 29.32115077972412 MB.
Setup can backup the existing database. The time and space required for the database backup depend on its size. This process takes time, and in some cases (for instance, when the size is few GBs) may take several hours to complete.
If you choose to not back up the database, and Setup later fails for some reason, it will not be able to restore the database and all DWH data will be lost.
Would you like to backup the existing database before upgrading it? (Yes, No) [Yes]:
Perform full vacuum on the oVirt engine history
database ovirt_engine_history@localhost?
This operation may take a while depending on this setup health and the
configuration of the db vacuum process.
See https://www.postgresql.org/docs/12/sql-vacuum.html
(Yes, No) [No]:
–== OVIRT ENGINE CONFIGURATION ==–
Perform full vacuum on the engine database engine@localhost?
This operation may take a while depending on this setup health and the
configuration of the db vacuum process.
See https://www.postgresql.org/docs/12/sql-vacuum.html
(Yes, No) [No]:
–== STORAGE CONFIGURATION ==–
–== PKI CONFIGURATION ==–
–== APACHE CONFIGURATION ==–
–== SYSTEM CONFIGURATION ==–
–== MISC CONFIGURATION ==–
Grafana admin password:
Please confirm password:
[WARNING] Password is weak: The password fails the dictionary check – it is based on a dictionary word
Use weak password? (Yes, No, Abort) [No]: Yes
–== END OF CONFIGURATION ==–
[ INFO ] Stage: Setup validation
During execution engine service will be stopped (OK, Cancel) [OK]:
[ INFO ] Hosted Engine HA is in Global Maintenance mode.
[WARNING] Less than 16384MB of memory is available
[ INFO ] Cleaning stale zombie tasks and commands
–== CONFIGURATION PREVIEW ==–
Default SAN wipe after delete : False
Host FQDN : engine100.com
Firewall manager : firewalld
Update Firewall : True
Set up Cinderlib integration : False
Engine database host : localhost
Engine database port : 5432
Engine database secured connection : False
Engine database host name validation : False
Engine database name : engine
Engine database user name : engine
Engine installation : True
PKI organization : com
Set up ovirt-provider-ovn : True
Grafana integration : True
Grafana database user name : ovirt_engine_history_grafana
Configure WebSocket Proxy : True
DWH installation : True
DWH database host : localhost
DWH database port : 5432
DWH database secured connection : False
DWH database host name validation : False
DWH database name : ovirt_engine_history
DWH database user name : ovirt_engine_history
Backup DWH database : True
Configure VMConsole Proxy : True
Please confirm installation settings (OK, Cancel) [OK]:
[ INFO ] Cleaning async tasks and compensations
[ INFO ] Unlocking existing entities
[ INFO ] Checking the Engine database consistency
[ INFO ] Stage: Transaction setup
[ INFO ] Stopping engine service
[ INFO ] Stopping ovirt-fence-kdump-listener service
[ INFO ] Stopping dwh service
[ INFO ] Stopping vmconsole-proxy service
[ INFO ] Stopping websocket-proxy service
[ INFO ] Stage: Misc configuration (early)
[ INFO ] Stage: Package installation
[ INFO ] Stage: Misc configuration
[ INFO ] Upgrading CA
[ INFO ] Updating OVN SSL configuration
[ INFO ] Updating OVN timeout configuration
[ INFO ] Backing up database localhost:ovirt_engine_history to ‘/var/lib/ovirt-engine-dwh/backups/dwh-20210324174421.ftesdvdu.dump’.
[ INFO ] Creating/refreshing DWH database schema
[ INFO ] Configuring WebSocket Proxy
[ INFO ] Backing up database localhost:engine to ‘/var/lib/ovirt-engine/backups/engine-20210324174449.x4fqmnyq.dump’.
[ INFO ] Creating/refreshing Engine database schema
[ INFO ] Creating a user for Grafana
[ INFO ] Creating/refreshing Engine ‘internal’ domain database schema
Unregistering existing client registration info.
[ INFO ] Install selinux module /usr/share/ovirt-engine/selinux/ansible-runner-service.cil
[ INFO ] Generating post install configuration file ‘/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf’
[ INFO ] Stage: Transaction commit
[ INFO ] Stage: Closing up
[ INFO ] Starting engine service
[ INFO ] Starting dwh service
[ INFO ] Starting Grafana service
[ INFO ] Restarting ovirt-vmconsole proxy service
–== SUMMARY ==–
[ INFO ] Restarting httpd
Web access is enabled at:
http://engine100.com:80/ovirt-engine
https://engine100.com:443/ovirt-engine
Internal CA 4A:1D:9E:78:3A:C4:5B:DA:82:62:76:95:A9:3F:78:B6:84:F7:78:90
SSH fingerprint: SHA256:fk1Ojix4WP0TJ3evggIiAnnUQ6tpjkE/vUBFDYSjvFY
[WARNING] Less than 16384MB of memory is available
Web access for grafana is enabled at:
https://engine100.com/ovirt-engine-grafana/
Please run the following command on the engine machine engine100.com, for SSO to work:
systemctl restart ovirt-engine
–== END OF SUMMARY ==–
[ INFO ] Stage: Clean up
Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20210324174226-sqingw.log
[ INFO ] Generating answer file ‘/var/lib/ovirt-engine/setup/answers/20210324174857-setup.conf’
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ INFO ] Execution of setup completed successfully
[root@engine100 ~]#
3、第二步的setup执行完成后,到主机上将HostedEngine的维护模式置回none,执行如下命令:
hosted-engine –set-maintenance –mode=none
4、重新访问engine管理台,可以看到有了“监控门户”,使用第二步中setup过程中配置的用户密码即可访问:
PS:转载文章请注明来源:oVirt中文社区(www.cnovirt.com)
扫码加好友拉你进oVirt技术交流群!
FATAL: Invalid option ‘?reconfigure-optional-components’