make sure to jump over to Marc's video @OneMarcFifty and check out some even better ways to monitor, inventory, and alert using Zabbix! ua-cam.com/video/DFdDEf5iib4/v-deo.html
I tried setting up a docker solution for zabbix many many months ago and it was a headache. The easiest solution was to run the dam thing as a virtual machine. Where it took me days tinkering and stressing out myself without any luck it took me literally 10 minutes to have it up and running as a vm. It's still up and working perfectly for the company I work for and the backing up..OMG so easy.
Very nice video. Been using Zabbix for several years for monitoring a small data center setup across 3 locations. The proxy function works well for situations like that. I don't particular like the interface, but using Zabbix more as a back-end with a Grafana front-end works well for us. Had to switch to a SQL cluster to make the Zabbix scale a little better. Zabbix/Graylog/Grafana makes a great monitoring solution for smaller installations. Less than 300 devices. May I suggest Graylog for a future video.
@brian, Great job on sharing all the awesome opensource project. FYI: I have noticed in several of your recent videos that you have been cutting out key points in the videos during editing. Case and point at 12:35 while editing the .env_db_mysql_proxy file there is a jump/skip of key information. The audio gives the impression you didn't change anything in the file, but is not the case. Go back and view like the previous 3 vids and you see simular issues.
I do occasionally cut certain parts. I'll make edits in some cases, but if the edits are not necessary, just something I did, then I'll cut that part for time sometimes. I ran the Zabbix setup and install 6 or 7 times before recording, then did it a few times while recording, and I take bits from each piece. Most likely why you are noticing these little jump cuts here an there...but almost talways I cut parts that aren't necessary bits to trim down my already very long form content.
Indeed, it is a big one, and getting the settings isn't easy, but their docker stuff is really ready to go other than the few changes I made. It leaves a lot of room for tweaking as you get more into it, so for me that's a huge bonus!
I would highly recommend doing a video on LibreNMS, it’s a fork of observium but more actively developed , as far as monitoring network devices and troubleshooting network issues it’s king of the hill, seriously
Dear Author, thank you so much for your great video on Zabbix install! Even though there are lot of changes now in Zabbix repo, it is still worth to follow your guide. It would be very useful to find out how to set up zabbix-agent on the host machine. I've been trying to find some guides about that, but unfortunately I can't. Looks like I'm setting config in the wrong way and cant even start service, even though it is running like a charm on a similar install on another host. I would appreciate if you will share your ideas about that. Keep up your brilliant work!
@@AwesomeOpenSource I have eth0 and tailscale0 interfaces, alongside with all of those bridges created by docker. Playing with addresses I have found a way to run zabbix-agent successfully at host OS, but Zabbix server still cannot get anything from agent.
So, you may need to make sure the host os can talk through the docker gateway address to the port that Zabbix server listens on. Not sure it will work, but should in theory.
I've used Zabbix for years now and it just keeps getting better and better. Flexible as well! I use Node-Red to grab and process data from a flaky energy meter and send the data to Zabbix. I also have a trigger when I don't get data for 5 mins to run an expect script that logs into a PDU the energy meter is connected to and toggles the power to reset it.
I love how you all have such great ways of getting things done. I would love to start collecting up "how to" from everyone on these videos. Maybe I can setup a wiki for sharing more ways of doing these things.
👍 I have been using it for the past 5years or so and love it. The lead developer Victor Kirhenshtein is awesome and so helpful and active in the forums. He has helped so many users and implemented a lot of user suggestions in the forums. I would definitely reach out to him if you get stuck at all.
A huge problem with zabbix is its lack of DNS caching. if you use DNS names instead of IPs then your DNS servers, with 50 hosts loaded into zabbix, will be hit approximately 46000 times a minute. a local DNS caching server is required for this. otherwise only use IPs and set everything being monitored with zabbix as static addresses. Zabbix otherwise is a great software and monitoring system. with our system, we have specifically denied all DNS requests from the zabbix server and all clients have the agent config set with just IPs.
hi, great video and tutorial I am having this issue zabbix-docker-zabbix-web-nginx-mysql-1 | ** Deploying Zabbix web-interface (Nginx) with MySQL database zabbix-docker-zabbix-web-nginx-mysql-1 | **** Secret file "/run/secrets/MYSQL_USER" is not found zabbix-docker-zabbix-server-1 | ** Preparing Zabbix server zabbix-docker-zabbix-server-1 | ** Preparing database zabbix-docker-zabbix-server-1 | **** Secret file "/run/secrets/MYSQL_USER" is not found
sometimes youtube will delete a post if you put certain characters in it. But, it looks like you need to add your MYSQL_USER environment variable to the .env file. I imagine that is being used in the container, but is either not set, or may be commented out in the .env file.
@@AwesomeOpenSource Thank you so much it worked, now I am facing different problem which I don't think it's a permission issue, because I tried to even put the directory as 777, still no luck zabbix-docker-mysql-server-1 | find: '/var/lib/mysql/': Permission denied zabbix-docker-mysql-server-1 | find: '/var/lib/mysql': Permission denied zabbix-docker-mysql-server-1 | chown: changing ownership of '/var/lib/mysql/': Permission denied zabbix-docker-mysql-server-1 | chown: changing ownership of '/var/lib/mysql': Permission denied
I apologize, it's been so long since I did this video that I don't recall what I had to do...I think, however I just had to allow it access to itself. I think it was just a port issue, but not 100^ certain anymore.
weird when im running the docker compose, if i typed docker-compose then i get some error about unsupported config, if i remove "-" and docker compose it works fine
They have updated docker compose recently, and the newest versions don't use the hyphen, so there may be something about the hypenated version that can't do what's needed with newer docker compose files, but glad you got it worked out.
I also get a similar error ERROR: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.zabbix-agent: 'profiles' Unsupported config option for services.zabbix-java-gateway: 'profiles' Unsupported config option for services.zabbix-proxy-mysql: 'profiles' Unsupported config option for services.zabbix-proxy-sqlite3: 'profiles' Unsupported config option for services.zabbix-snmptraps: 'profiles' Unsupported config option for services.zabbix-web-apache-mysql: 'profiles' Unsupported config option for services.zabbix-web-service: 'profiles' I did see somewhere that it had to do with the indents. I changed that but still cant figure it out.
So this is for internal use and non-windows machines or am I mistaken? Would like to find something that's self-hosted to limit my RMM company which saves me money and allow me to pass that savings to my clients.
This will absolutely work on windows machines. They have agents for all of the major OSes, and you can also use SNMP for various systems. I would suggest you go check out Marc's follow up video @OneMarcFifty (link to the video in the description), and then go to the zabbix website to see all of the things you can monitor and do with it.
Looking with google for a solution but i`m getting the same problem over and over i think i wil continu using The Dude that`s working fine for now. Or is there a problem to solve i don`t know im 2 days busy to resolve this problem but still can`t find the solution(s).
Uw this looks super fun to spin up a ubuntu server and test on... Question though, i'm following along with the video. If my host OS is ubuntu server any reason I wouldn't want to use the compose file with ubuntu in it? 🤔
I don't think it maters which one you use. Alpine will be a smaller footprint generally, but if you have the space, and you're more comfortable with ubuntu, it should be fine.
@@AwesomeOpenSource oh in that case! I may try cleaning out entirely the Ubuntu compose file deployment and try again with alpine. Or I could kill the whole VM and clone a fresh one. 😆 ahh the joys of being a sysadmin and having spare gear mess with. 🤓
While you were deploying this with docker-compose up && ,...... was there an option to specify if the container would be privileged or not? That may solve the problems you had afterwards? Or is this something completely irrelevant? Thank you
I didn't see an option for that specifically in their documentation. I found an article from someone else who was seeing the same issue, and since Docker creates its own firewall rules, it appeared to be an issue with the docker firewall... you can adjust those rules in the container with iptables commands, but if you do docker-compose down, then docker-compose up again, it will reinstate the original blocking rules. There could, however, be a more elegant solution that I'm just not aware of.
I am getting this error and having a really hard time finding the answer online. any help would be much appreciated. Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open /proc/sys/net/core/somaxconn: no such file or directory: unknown the file doesn't exist also. Did something get missed since this docker is running on an LXC with Ubuntu?
Hey, awesome video, unfortunately I ran into an issue where one of my containers wasn't able to start. Here's the error message: "Container zabbix-docker-zabbix-web-nginx-mysql-1 Starting 1.1s Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open /proc/sys/net/core/somaxconn: no such file or directory: unknown". Any help or guidance you could provide would be greatly appreciated! Thanks
What distro are you running on, and how did you install docker? make sure you are running docker-ce. if you install the distro docker, a lot of times it's lagging behind quite a bit, and you'll hit odd errors.
@@AwesomeOpenSource I'm running on Ubuntu server 22.04 LTS as a LXC container on ProxMox 7.3-4, and I installed docker-ce directly from the docker website. After inputting my comments I created several more VM's and LXC containers running Debian and Ubuntu with varied results but no successes. When I get time, I'll try CentOS or Ubuntu rather than Alpine and maybe installing metal and not virtual. Thanks for your input.
Great video (as always 😉). Quick one: I'm using Portainer to manage stacks and containers, and would like to create a stack from the docker-compose.yml file. I understand I'll have to use absolute path to the .env_* files (in env_vars folder) but the yml file references a ./zbx_env/var/lib/... folder which I cannot find in the folder tree created from git: is it created at runtime or should I create it before creating the stack? Thanks in advance for any help!
I said it in the video, but admittedly very quickly..the ./zbx_env folder is created when the docker-compose is run...so it's not there at the time you are editing the vars. Hope that helps.
@@AwesomeOpenSource I've tried to create a stack from the YML file and changed all ./env_var/* with the absolute path /srv/dev-disk-by-label-omvdata/docker/zabbix/env_vars/*. I then got an error from Portainer for all the env files: "failed to deploy a stack: open /srv/dev-disk-by-label-omvdata/docker/zabbix/env_vars/.env_db_mysql: no such file or directory" although files exist. Access rights look good, so I don't have any clue on this issue... I then tried to run docker-compose from the command line and the whole stuff began to install but soon reached a kind of dead-loop, saying "**** MySQL server is not available. Waiting 5 seconds" (alternatively from zabbix-nginx and zabbix-server containers) without going any further...
Zabbix really struggles with any sort of scaling. Beyond a handful of servers (20 or so) it really starts to crap out. Especially if you use any templates that collect a lot of data. It will also just completely die if you do a lot of backups and such over night. We need to restart our Zabbix server every hour. The default parameters for config cache fills up after bout 45 servers. You need to set at least 256MB for the config cache. Many people configure 1GB. The other cache values also need tweaked for each environment. You'll also need at minimum 50 pollers and tons of proxies. Probably 1 proxy for every 20 servers is a good place to start. If you spend any time on the Zabbix forum you'll find overall system performance and long term stability is a big issue. Not to mention you won't get any real support on the forums.
This sounds like a job for Kubernetes clustering. You could setup your zabbix in a small cluster of kubernetes systems to help load balance and scale in and out as needed.
@@AwesomeOpenSource Maybe in a homelab or shop that already utilizes kubernetes that would be a great solution but trying to deploy kubernetes clusters in a shop for a single use case just isn't a reality. It's hard enough getting buy in for a standalone docker container.
I dont recognise that kind of problems with zabbix. There are demos of thousands of monitored devices and I have experience for few hundred devices, with no performance issues. And what comes to scaling it scales nicely with proxies.
I know nothing of Zabbix. 1st I've heard of this. But what I would do is check the backend DB for performance issue. Modify OS configs if needed like dynamic hugepage and the like. I'm sure Zab already has correct table indexing. I've worked with software like this for over a decade. If the SNMP pollers aren't holding things up and it's not obvious hardware bottlenecks, I'd go to the DB.
Just wanted to let everyone know please do not run Agent 2 and/or Agent 2 Docker image until Zabbix fixes the heap-based buffer over-read issue. This has some serious security implications. nvd.nist.gov/vuln/detail/CVE-2022-43995 github.com/zabbix/zabbix-docker/issues/1026
Thanks for the video. Think ive missed something, any chance you could shed some light on what i have missed? seem to be getting permission errors when starting the docker. /zabbix-docker$ sudo docker-compose up -d && docker-compose logs -f WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus Starting zabbix-docker_mysql-server_1 ... done Starting zabbix-docker_db_data_mysql_1 ... done Starting zabbix-docker_zabbix-server_1 ... done Recreating zabbix-docker_zabbix-web-nginx-mysql_1 ... done Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 975, in send self.connect() File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) PermissionError: [Errno 13] Permission denied During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise raise value.with_traceback(tb) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 975, in send self.connect() File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, **kwargs) File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get return self.get(url, **self._set_request_timeout(kwargs)) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 555, in get return self.request('GET', url, **kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/docker-compose", line 33, in sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')()) File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main command_func() File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command project = project_from_options('.', options) File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options return get_project( File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project client = get_client( File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client client = docker_client( File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170, in docker_client client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs) File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__ self._version = self._retrieve_server_version() File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
I think 2 things could be going on. The first part about the resources ignored, is that part I talk about in the video where docker-compose ignores the resource limit parts... that's really for docker-swarm. No issue for that, just ignore it as well. The errors, may be due to either an older version of docker (are you using docker.io vs docker-ce?) I would suggest installing docker-ce, and you may need to install a newer version of docker-compose. I had to update my docker-compose from 1.25.x to 1.29.x in order for it to work properly. Maybe that will help. Let me know.
make sure to jump over to Marc's video @OneMarcFifty and check out some even better ways to monitor, inventory, and alert using Zabbix! ua-cam.com/video/DFdDEf5iib4/v-deo.html
Welcome from Latvia! From Zabbix homeland.
Thank you so much!
I tried setting up a docker solution for zabbix many many months ago and it was a headache. The easiest solution was to run the dam thing as a virtual machine. Where it took me days tinkering and stressing out myself without any luck it took me literally 10 minutes to have it up and running as a vm. It's still up and working perfectly for the company I work for and the backing up..OMG so easy.
Always go with whatever works best for you. 100%
Very nice video. Been using Zabbix for several years for monitoring a small data center setup across 3 locations. The proxy function works well for situations like that. I don't particular like the interface, but using Zabbix more as a back-end with a Grafana front-end works well for us. Had to switch to a SQL cluster to make the Zabbix scale a little better. Zabbix/Graylog/Grafana makes a great monitoring solution for smaller installations. Less than 300 devices. May I suggest Graylog for a future video.
I will absolutely take a look at Graylog. Thanks for the suggestion!
really good. was using this for years in many places. rock solid and tons of features.
It is some Amazing software for sure!
@brian,
Great job on sharing all the awesome opensource project. FYI: I have noticed in several of your recent videos that you have been cutting out key points in the videos during editing. Case and point at 12:35 while editing the .env_db_mysql_proxy file there is a jump/skip of key information. The audio gives the impression you didn't change anything in the file, but is not the case. Go back and view like the previous 3 vids and you see simular issues.
I do occasionally cut certain parts. I'll make edits in some cases, but if the edits are not necessary, just something I did, then I'll cut that part for time sometimes. I ran the Zabbix setup and install 6 or 7 times before recording, then did it a few times while recording, and I take bits from each piece. Most likely why you are noticing these little jump cuts here an there...but almost talways I cut parts that aren't necessary bits to trim down my already very long form content.
I've been using Zabbix since 2016. It developed a lot.
Zeems like some really great stuff. I'm about to setup some systems using @Onemarcfifty 's instructions.
This was a good one. Did struggle a-lot when I tried it a long time ago. Thanks
Hope it's helpful!
I use Zabbix for ages. Good reliable and free system. Very convinient for OS monitoring. But need some knowledge to install.
Indeed, it is a big one, and getting the settings isn't easy, but their docker stuff is really ready to go other than the few changes I made. It leaves a lot of room for tweaking as you get more into it, so for me that's a huge bonus!
I would highly recommend doing a video on LibreNMS, it’s a fork of observium but more actively developed , as far as monitoring network devices and troubleshooting network issues it’s king of the hill, seriously
It’s good for enterprise or large data centers?
@@JustThink2000 yeah I’ve seen it used in billion dollar companies
@@DanielRolfe wow. Thanks!
Zabbix is awesome tool, i am using it from 4 years
It is truly magnificent!
This is really powerful. I am a 2 year old user.
It really is amazing stuff.
Dear Author, thank you so much for your great video on Zabbix install! Even though there are lot of changes now in Zabbix repo, it is still worth to follow your guide. It would be very useful to find out how to set up zabbix-agent on the host machine. I've been trying to find some guides about that, but unfortunately I can't. Looks like I'm setting config in the wrong way and cant even start service, even though it is running like a charm on a similar install on another host. I would appreciate if you will share your ideas about that. Keep up your brilliant work!
Let me see what I can do. Glad it was helpful.
@@AwesomeOpenSource I have eth0 and tailscale0 interfaces, alongside with all of those bridges created by docker. Playing with addresses I have found a way to run zabbix-agent successfully at host OS, but Zabbix server still cannot get anything from agent.
So, you may need to make sure the host os can talk through the docker gateway address to the port that Zabbix server listens on. Not sure it will work, but should in theory.
Here from OneMarchFifty. I like the way he teaches and subscribed to you too.
Thanks so much, and glad to have you here!
Zabbix is very nice we already using this
That's awesome!
I've used Zabbix for years now and it just keeps getting better and better. Flexible as well! I use Node-Red to grab and process data from a flaky energy meter and send the data to Zabbix. I also have a trigger when I don't get data for 5 mins to run an expect script that logs into a PDU the energy meter is connected to and toggles the power to reset it.
I love how you all have such great ways of getting things done. I would love to start collecting up "how to" from everyone on these videos. Maybe I can setup a wiki for sharing more ways of doing these things.
Awesome video, you rock!
Thanks! You too!
I would also review NetXMS. Very powerful and customizable open source NMS as well
NetXMS is on my todo list of videos for the future, the only thing in my way is time.
👍 I have been using it for the past 5years or so and love it. The lead developer Victor Kirhenshtein is awesome and so helpful and active in the forums. He has helped so many users and implemented a lot of user suggestions in the forums. I would definitely reach out to him if you get stuck at all.
A huge problem with zabbix is its lack of DNS caching. if you use DNS names instead of IPs then your DNS servers, with 50 hosts loaded into zabbix, will be hit approximately 46000 times a minute. a local DNS caching server is required for this. otherwise only use IPs and set everything being monitored with zabbix as static addresses.
Zabbix otherwise is a great software and monitoring system. with our system, we have specifically denied all DNS requests from the zabbix server and all clients have the agent config set with just IPs.
Both CheckMK and Nagio have free versions that you may want to check out.
TrueNAS Scale has Zabbix in the TrueCharts system.
Do you think checkmk is better than Zabbix?
I've done videos on CheckMK, but not Nagios (yet). I'll get there though. They are all great options.
CheckMK is ok - but the free Enterprise Version only free for 30 days, or up to 25 hosts. That's why I'm checking out Zabbix.
You're wrong there's no Zabbix in TrueNas scale True Charts
@@MrEstevezv If you have incubator part of Truecharters installed it is there. So it it's not on the main, but yes you can install it.
What a great video ;-) Liked and subscribed ;-)
Your's is a terrific follow up as well! Super!
hi,
great video and tutorial
I am having this issue
zabbix-docker-zabbix-web-nginx-mysql-1 | ** Deploying Zabbix web-interface (Nginx) with MySQL database
zabbix-docker-zabbix-web-nginx-mysql-1 | **** Secret file "/run/secrets/MYSQL_USER" is not found
zabbix-docker-zabbix-server-1 | ** Preparing Zabbix server
zabbix-docker-zabbix-server-1 | ** Preparing database
zabbix-docker-zabbix-server-1 | **** Secret file "/run/secrets/MYSQL_USER" is not found
3rd time I post this, I really need help
sometimes youtube will delete a post if you put certain characters in it. But, it looks like you need to add your MYSQL_USER environment variable to the .env file. I imagine that is being used in the container, but is either not set, or may be commented out in the .env file.
@@AwesomeOpenSource
Thank you so much it worked,
now I am facing different problem which I don't think it's a permission issue, because I tried to even put the directory as 777, still no luck
zabbix-docker-mysql-server-1 | find: '/var/lib/mysql/': Permission denied
zabbix-docker-mysql-server-1 | find: '/var/lib/mysql': Permission denied
zabbix-docker-mysql-server-1 | chown: changing ownership of '/var/lib/mysql/': Permission denied
zabbix-docker-mysql-server-1 | chown: changing ownership of '/var/lib/mysql': Permission denied
You need to find out what the container wants the ownership to be. Make sure it's set properly. Permissions and ownership are different.
Great Video, but how do you solve the problem with the Zabbix Server in red?
I apologize, it's been so long since I did this video that I don't recall what I had to do...I think, however I just had to allow it access to itself. I think it was just a port issue, but not 100^ certain anymore.
weird when im running the docker compose, if i typed docker-compose then i get some error about unsupported config, if i remove "-" and docker compose it works fine
They have updated docker compose recently, and the newest versions don't use the hyphen, so there may be something about the hypenated version that can't do what's needed with newer docker compose files, but glad you got it worked out.
I also get a similar error
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.zabbix-agent: 'profiles'
Unsupported config option for services.zabbix-java-gateway: 'profiles'
Unsupported config option for services.zabbix-proxy-mysql: 'profiles'
Unsupported config option for services.zabbix-proxy-sqlite3: 'profiles'
Unsupported config option for services.zabbix-snmptraps: 'profiles'
Unsupported config option for services.zabbix-web-apache-mysql: 'profiles'
Unsupported config option for services.zabbix-web-service: 'profiles'
I did see somewhere that it had to do with the indents. I changed that but still cant figure it out.
So this is for internal use and non-windows machines or am I mistaken? Would like to find something that's self-hosted to limit my RMM company which saves me money and allow me to pass that savings to my clients.
This will absolutely work on windows machines. They have agents for all of the major OSes, and you can also use SNMP for various systems. I would suggest you go check out Marc's follow up video @OneMarcFifty (link to the video in the description), and then go to the zabbix website to see all of the things you can monitor and do with it.
Looking with google for a solution but i`m getting the same problem over and over i think i wil continu using The Dude that`s working fine for now. Or is there a problem to solve i don`t know im 2 days busy to resolve this problem but still can`t find the solution(s).
Uw this looks super fun to spin up a ubuntu server and test on... Question though, i'm following along with the video. If my host OS is ubuntu server any reason I wouldn't want to use the compose file with ubuntu in it? 🤔
I don't think it maters which one you use. Alpine will be a smaller footprint generally, but if you have the space, and you're more comfortable with ubuntu, it should be fine.
@@AwesomeOpenSource oh in that case! I may try cleaning out entirely the Ubuntu compose file deployment and try again with alpine. Or I could kill the whole VM and clone a fresh one. 😆 ahh the joys of being a sysadmin and having spare gear mess with. 🤓
Great video. Will this work on a raspberry pi 4 8Gb with ubuntu server 20.04 64bits and docker?
Looks like it will run on a pi4. I found this article, haven't tried it though. linuxhint.com/install-zabbix5-on-raspberry-pi4/
While you were deploying this with docker-compose up && ,...... was there an option to specify if the container would be privileged or not? That may solve the problems you had afterwards? Or is this something completely irrelevant?
Thank you
I didn't see an option for that specifically in their documentation. I found an article from someone else who was seeing the same issue, and since Docker creates its own firewall rules, it appeared to be an issue with the docker firewall... you can adjust those rules in the container with iptables commands, but if you do docker-compose down, then docker-compose up again, it will reinstate the original blocking rules. There could, however, be a more elegant solution that I'm just not aware of.
@@AwesomeOpenSource Oh ok. I thought about it considering the easiness of proxmox's check box while creating a container. That is why I asked
I am getting this error and having a really hard time finding the answer online. any help would be much appreciated.
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open /proc/sys/net/core/somaxconn: no such file or directory: unknown
the file doesn't exist also. Did something get missed since this docker is running on an LXC with Ubuntu?
I think I found it. LXC doesn't have any core items (atleast if you use it from a template) On a VM now and I see all the different items.
👍👍👍
Thank you!
Good day...
Is it possible to plot the time series data stored in MSSQL using zabix
That, I don't know. Not an MSSQL person, but definitely something I'm sure the Zabbix folks could help with.
@@AwesomeOpenSource thanks
Hey, awesome video, unfortunately I ran into an issue where one of my containers wasn't able to start. Here's the error message: "Container zabbix-docker-zabbix-web-nginx-mysql-1 Starting 1.1s
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open /proc/sys/net/core/somaxconn: no such file or directory: unknown". Any help or guidance you could provide would be greatly appreciated! Thanks
What distro are you running on, and how did you install docker? make sure you are running docker-ce. if you install the distro docker, a lot of times it's lagging behind quite a bit, and you'll hit odd errors.
@@AwesomeOpenSource I'm running on Ubuntu server 22.04 LTS as a LXC container on ProxMox 7.3-4, and I installed docker-ce directly from the docker website. After inputting my comments I created several more VM's and LXC containers running Debian and Ubuntu with varied results but no successes. When I get time, I'll try CentOS or Ubuntu rather than Alpine and maybe installing metal and not virtual. Thanks for your input.
Sorry you're having so much trouble. That's a fairly recent video, so I would think it should work, but I haven't installed it lately to be certain.
Great video (as always 😉). Quick one: I'm using Portainer to manage stacks and containers, and would like to create a stack from the docker-compose.yml file. I understand I'll have to use absolute path to the .env_* files (in env_vars folder) but the yml file references a ./zbx_env/var/lib/... folder which I cannot find in the folder tree created from git: is it created at runtime or should I create it before creating the stack? Thanks in advance for any help!
I said it in the video, but admittedly very quickly..the ./zbx_env folder is created when the docker-compose is run...so it's not there at the time you are editing the vars. Hope that helps.
@@AwesomeOpenSource Thanks a lot for your answer, I'll then import the .yml file straight as a stack! 👍
Let me know how it goes.
@@AwesomeOpenSource I've tried to create a stack from the YML file and changed all ./env_var/* with the absolute path /srv/dev-disk-by-label-omvdata/docker/zabbix/env_vars/*. I then got an error from Portainer for all the env files: "failed to deploy a stack: open /srv/dev-disk-by-label-omvdata/docker/zabbix/env_vars/.env_db_mysql: no such file or directory" although files exist. Access rights look good, so I don't have any clue on this issue...
I then tried to run docker-compose from the command line and the whole stuff began to install but soon reached a kind of dead-loop, saying "**** MySQL server is not available. Waiting 5 seconds" (alternatively from zabbix-nginx and zabbix-server containers) without going any further...
The solutiona is cool
I agree! It's Awesome!
Zabbix really struggles with any sort of scaling. Beyond a handful of servers (20 or so) it really starts to crap out. Especially if you use any templates that collect a lot of data. It will also just completely die if you do a lot of backups and such over night. We need to restart our Zabbix server every hour. The default parameters for config cache fills up after bout 45 servers. You need to set at least 256MB for the config cache. Many people configure 1GB. The other cache values also need tweaked for each environment. You'll also need at minimum 50 pollers and tons of proxies. Probably 1 proxy for every 20 servers is a good place to start. If you spend any time on the Zabbix forum you'll find overall system performance and long term stability is a big issue. Not to mention you won't get any real support on the forums.
This sounds like a job for Kubernetes clustering. You could setup your zabbix in a small cluster of kubernetes systems to help load balance and scale in and out as needed.
@@AwesomeOpenSource Maybe in a homelab or shop that already utilizes kubernetes that would be a great solution but trying to deploy kubernetes clusters in a shop for a single use case just isn't a reality. It's hard enough getting buy in for a standalone docker container.
I dont recognise that kind of problems with zabbix. There are demos of thousands of monitored devices and I have experience for few hundred devices, with no performance issues. And what comes to scaling it scales nicely with proxies.
I know nothing of Zabbix. 1st I've heard of this. But what I would do is check the backend DB for performance issue. Modify OS configs if needed like dynamic hugepage and the like. I'm sure Zab already has correct table indexing. I've worked with software like this for over a decade. If the SNMP pollers aren't holding things up and it's not obvious hardware bottlenecks, I'd go to the DB.
Check_MK is my favorite.
They aare both amazing tools, and the great thing is they give you options!
Great video, beats nagios and others as free and less complex, full featured. Also watched OneMarcFifty tips. 👻
Awesome thank you!
On the Wiki "cp docker-compose_v3_alpine_mysql_latest.yml docker-compose.yml" missing "a" file is .yaml
Ah, sorry, I'll try to fix that.
Just wanted to let everyone know please do not run Agent 2 and/or Agent 2 Docker image until Zabbix fixes the heap-based buffer over-read issue. This has some serious security implications.
nvd.nist.gov/vuln/detail/CVE-2022-43995
github.com/zabbix/zabbix-docker/issues/1026
Thanks for the tip.
Thanks for the video. Think ive missed something, any chance you could shed some light on what i have missed? seem to be getting permission errors when starting the docker.
/zabbix-docker$ sudo docker-compose up -d && docker-compose logs -f
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
WARNING: The following deploy sub-keys are not supported and have been ignored: resources.reservations.cpus
Starting zabbix-docker_mysql-server_1 ... done
Starting zabbix-docker_db_data_mysql_1 ... done
Starting zabbix-docker_zabbix-server_1 ... done
Recreating zabbix-docker_zabbix-web-nginx-mysql_1 ... done
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
File "/usr/lib/python3/dist-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 237, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 170, in docker_client
client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs)
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 197, in __init__
self._version = self._retrieve_server_version()
File "/usr/lib/python3/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
I think 2 things could be going on. The first part about the resources ignored, is that part I talk about in the video where docker-compose ignores the resource limit parts... that's really for docker-swarm. No issue for that, just ignore it as well. The errors, may be due to either an older version of docker (are you using docker.io vs docker-ce?) I would suggest installing docker-ce, and you may need to install a newer version of docker-compose. I had to update my docker-compose from 1.25.x to 1.29.x in order for it to work properly. Maybe that will help. Let me know.
quick tip for password ```head /dev/urandom | shasum -a 256 | cut -d '-' -f1 > .MYSQL_ROOT_PASSWORD```
Great tip! Thank you for that.
"lsof -i -P -n | grep LISTEN" good command
Great command! Gives you exactly what you need, and no super hard to remember.