If the O&M platform is deployed in a containerized environment, you need to have some basic docker O&M knowledge.
You are advised to prioritize using FineOps's O&M Component and Component Management functions to view container information.
Command: docker ps-a
Returned value description: You can view the status, port mappings, and other important information of all containers to better manage and debug containerized applications.
Returned Value
Description
CONTAINER ID
It shows the unique identifier of the container.
It is usually represented as a combination of capital letters and numbers.
IMAGE
It shows the name of the image used by the container.
COMMAND
It shows the command used to start the container.
CREATED
It shows the timestamp of container creation.
STATUS
It shows the running status and health conditions of the container, such as running (Up), stopped (Exited), and restarting.
PORTS
It shows the ports exposed by containers and the ports bound to hosts.
NAMES
It shows specified names or automatically generated names of containers.
Example:
In the sample server, you can see an ops container with the ID f1ac156d4db9, using ops: v1.6.0 image, and running with the container name fanruan230718121827_ops.
The container was created 6 days ago and has been running for six days since its creation. The container is marked as healthy, indicating that the internal application is running normally and is in good condition.
It maps port number 8081 of the host 192.168.101.58 to port number 8080 of the container, meaning you can communicate with ops by accessing the host's 192.168.101.58:8081 IP address.
Command:
Scenario
Command
Restarting the container
docker restart Container ID/Container name
Stopping the container
docker stop Container ID/Container name
Starting the container
This section shows how to stop and start ops containers.
1.Search for containers with ops in names: docker ps -a | grep ops.
You can identify the container ID: f1ac156d4db9 based on the returned value.
2.Stop the container: docker stop f1ac156d4db9.
3.Search for containers with ops in names again: docker ps -a | grep ops.
Confirm that the container status is Exited, indicating that the container has been successfully stopped.
1. Search for containers with ops in names: docker ps -a | grep ops.
Confirm that the container status is Exited now, indicating that the container has not been started. You can identify the container ID: f1ac156d4db9 based on the returned value.
2. Start the container: docker start f1ac156d4db9.
3. View all container status: docker ps -a.
Make sure that the ops container and its associated components (such as ops_agent) are all started.
You can identify the ops container ID: 7b396943b0da based on the returned value.
2. Monitor container logs in real-time: docker logs -f 7b396943b0da.
2. View the configuration of the ops container: docker inspect 7b396943b0da.
3. You can view logs' storage location under Binds of the returned value and download them.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy