Step-1:
1. goto portainer
2. open uptime kuma container in docker
3. Click on "Duplicate/Edit" under "Actions"
4. goto advanced container settings - Select "Volumes" Tab
5. Click on "+map additional volume" to add new volume mapping
6. At the bottom in container field type - /var/run/docker.sock & click on "bind"
7. At the bottom in host field type - /var/run/docker.sock
8. finally click on "Deploy the Container" and wait till container is re-installed and restarted
Step-2:
Open & login uptime kuma web interface and we'll setup docker host into it before monitoring:
1. Goto "settings"
2. Click on "Docker Host" - "Setup Docker Host"
3. In "Setup Docker Host" Screen -
Type the Friendly name - my name
click on "test" then a "Connected susseccufy" message will flash
4. now goto "Add new monitor"
5. In General - Select Monitor type as: "Docker Container"
6. Give "Friendly Name"
7. Give "Container Name / ID", i suggest to give Container ID.
8. Select "Docker Host" from drop down menu, the server created in step 3
9. Save - This will create docker container monitor and a green screen with success message will flash.