The log of OpenStack is described in detail
- 2020-05-27 07:35:59
Recently, I used OpenStack in my project. Since I just started to use it, I made a lot of mistakes. Then I checked the log and took time to sort out the information of the log system.
Log is very important for a stable system, and it is also essential for a large system like OpenStack. Understanding the log of Openstack system is very important to ensure the stability of OpenStack environment. It is a good habit to look at the log for system errors.
OpenStack generates a large amount of log information to help troubleshoot problems that occur during system installation and run. Here are some log locations for common services.
The OpenStack compute service log is located at /var/log/nova, and the default permission owner is an nova user. It is important to note that not all log files are included on every server, for example, nova-compute.log is only generated on compute nodes.nova-compute.log: logs generated during startup and running of virtual machine instances nova-network.log: logs about network status, allocation, routing, and security groups nova-manage. log: log generated when running the nova-manage command nova-scheduler.log: logs related to scheduling, assigning tasks to nodes, and message queues nova-objectstore.log: mirroring related logs nova-api. log: message-related logs of user interactions with OpenStack and interactions between OpenStack components nova-cert. log: log of the nova-cert process nova-console. log: details about VNC services for nova-console nova-consoleauth. log: verification details for nova-console service nova-dhcpbridge. log: network information first associated with the dhckbridge service
Dashboard is an web application of DJango, which runs on the Apache server by default. The corresponding running logs are also recorded in the Apache logs, which can be viewed by the user in /var/log/apache2/.
Store the log
Object storage Swift default logs are written to syslog, which can be viewed via /var/log/syslog on Ubuntu systems, or in other systems, in /var/log/messages.
Block storage the logs generated by Cinder are stored in the /var/log/cinder directory by default
-cinder-api. log: details about the es1064en-api service
-cinder-scheduler. log: details about the operation of the cinder scheduling service
-cinder-volume. log: log entries related to the cinder volume service
Identity authentication Keystone service of logging in/var/log/keystone/keystone log.
The mirror service Glance logs are stored in the /var/log/glance directory by default
- api. log: Glance API related logs
- registry. log: Glance registry service related log
Depending on the log configuration, information such as meta-information updates and access records are saved.
The web service Neutron logs are stored in the /var/log/neutron directory by default
-dhcp-agent. log: log about dhcp-agent
-l3-agent. log: logs related to the l3 agent and its functions
-metadata-agent. log: log related to Nova metadata service via neutron proxy
-openvswitch-agent. log: log entries for openvswitch operations. When implementing the OpenStack network, if a different plug-in is used, there will be a corresponding log file name
- server. log: logs related to Neutron API services
Changing log level
The default logging level for each OpenStack service is warning level (Warning), which is sufficient to understand the state of the running system or basic error location, but sometimes the logging level needs to be raised to help diagnose problems, or lowered to reduce logging noise. Since the logging Settings for the various services are similar, the Nova service is used as an example.
Set the logging level for the Nova service
Change the logging level of the listed services to DEBUG, INFO, or WARNING
[logger_root] level = WARNING handlers = null [logger_nova] level = INFO handlers = stderr qualname = nova ......
Set the logging level in the other OpenStack services
Other services (such as Glance and Keystone) currently have logging level stones set in their master profiles, such as /etc/glance/ glance-api.conf. You can adjust the log level to INFO and DEBUG by modifying the corresponding Settings in these files:
[DEFAULT] #set INFO log level output verbose = False #set DEBUG log level output debug = False
Thank you for reading, I hope to help you, thank you for your support of this site!