• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.

Question Docker

Ayki

Basic Pleskian
Server operating system version
AlmaLinux 9.5 (Teal Serval)
Plesk version and microupdate number
Plesk Obsidian 18.0.67 Update #2
Can anyone provide guidance on setting Zabbix (alpine-latest version) monitoring on Plesk as a docker image?

I am having a problem with Zabbix not finding the MySQL server.

I have created a database with a user with enough privileges and added those to Zabbix environment parameters.
1739449400827.png

But when zabbix container runs, keep getting the server not avaiable as shown below:

*DB_SERVER_HOST: 127.0.0.1
* DB_SERVER_PORT: 3306
* DB_SERVER_DBNAME: zabbix
********************
**** MySQL server is not available. Waiting 5 seconds...
**** MySQL server is not available. Waiting 5 seconds...
 
**** MySQL server is not available. Waiting 5 seconds...
I believe it is because a container itself contains the lo interface inside with the 127.0.0.1 address.

Code:
# docker run --rm -i -t alpine /bin/sh
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
52f827f72350: Pull complete 
Digest: sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099
Status: Downloaded newer image for alpine:latest
/ # ifconfig 
eth0      Link encap:Ethernet  HWaddr 02:42:AC:11:00:03  
          inet addr:172.17.0.3  Bcast:172.17.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:426 (426.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
/ #

Try to use 172.17.0.1; for containers, this address points to the host but be sure the database uses this address to receive connections.
 
Thanks Yamshanov.
I did think it must be a network related problem.
In this case would it be more productive to run the the sql server from within the container? This way it can be refered as local host. Do you know how I can execute that in Docker?
for example
# docker exec -it container-id bash
then install mySQl server?
What do you think?
Thanks
 
With the latest Docker versions, you can use docker-compose files to configure a few containers and connections between them. It seems Zabbix provides examples of these files; see 5 Installation from containers.

If you plan to monitor this server with Zabbix resources, I recommend moving monitoring outside the Plesk (because if something happens with a server, the monitoring on this server will also not be able to send a signal to you).
 
Thanks for your help Alexander

It just started to work without evene chnaging any local ip addresses. Once the docker data base is added to plesk databses from the Tools&settings >database Servers menu. It works rightout the box on 127.0.0.1->which every port was mapped in docker.

Do you know how to go about this for an appilcation like zabbix? As you know zabbix is avaiable on https:/site URL/zabbix
How this can be mapped in plesk docker?

Would be something like:
https://pleskserverurl:DockermappedPort/zabbix

Many thanks
 
Back
Top