[Support] Zabbix-Agent & Zabbix-Agent2


Recommended Posts

@VRx Im having a touch of difficulty. 

If i run Zabbix Agent, Server, and Web Interface all on host network, im all good. 

However, if i run them on Br0 network, i lose the ability to monitor my unraid network interface traffic. 

Using key net.if.in and net.if.out, i believe it monitors network interfaces listed in /proc/net/dev. 

When running agent on Br0, it appears, proc/net/dev is of the container, not the host system, and it doesnt appear that i can pass the host file to the container. 

Any chance i could get some help with that?

Also, it doesnt seem that Agent, Server and Web Interface can be on the same Br0 IP address, even though there all using different ports.

Link to comment
  • 2 weeks later...
On 9/16/2022 at 10:56 PM, TurboStreetCar said:

Also, it doesnt seem that Agent, Server and Web Interface can be on the same Br0 IP address, even though there all using different ports.

I omit the technical possibilities but do you think it logical that two containers should use the same ip? Do you also assign the same ip for two computers in the network?

 

 

On 9/16/2022 at 10:56 PM, TurboStreetCar said:

When running agent on Br0, it appears, proc/net/dev is of the container, not the host system, and it doesnt appear that i can pass the host file to the container. 

https://forums.docker.com/t/container-read-host-proc-net-dev/3439

 

Link to comment
On 9/16/2022 at 10:56 PM, TurboStreetCar said:

Any chance i could get some help with that?

You could try to bind /proc/net/dev to /host/proc/net/dev inside container.
But You need also to instruct zabbix agent it should monitor /host/proc/net/dev.
I have not tried this solution.

  • Like 1
Link to comment
On 9/28/2022 at 3:11 AM, VRx said:

I omit the technical possibilities but do you think it logical that two containers should use the same ip? Do you also assign the same ip for two computers in the network?

 

 

Well, i would say computers are different that containers, as containers only use specific ports and have specific purposes. Additionally, when on host network, they all are using the same IP. I'm aware internally there is separate networks broken up within Unraid, or dockers network system, but externally, all three containers (Zabbix Agent, Server, and Web Interface) are all on the same host IP. Would be nice to break that out to a separate network.

 

On 9/28/2022 at 3:23 AM, VRx said:

You could try to bind /proc/net/dev to /host/proc/net/dev inside container.
But You need also to instruct zabbix agent it should monitor /host/proc/net/dev.
I have not tried this solution.

 

I will try passing /proc/net/dev to the container at the /host/ path, but im not sure how to "reroute" the net key to that new location. i assume it would be somewhere in the conf file? Only issue with that is updates would break that modification. 

Appreciate the input. 

Link to comment
On 9/30/2022 at 11:34 AM, TurboStreetCar said:

Well, i would say computers are different that containers, as containers only use specific ports and have specific purposes.

This is not as clear cut as you say, it depends on the configuration. The assignment of the ip address to the container is the use of the macvlan driver. This assigns the mac address to the container and binds it to the physical network. This is a very different situation to the one you describe and is much closer to computers than containers.
 

 

On 9/30/2022 at 11:34 AM, TurboStreetCar said:

Additionally, when on host network, they all are using the same IP. I'm aware internally there is separate networks broken up within Unraid, or dockers network system, but externally, all three containers (Zabbix Agent, Server, and Web Interface) are all on the same host IP. Would be nice to break that out to a separate network.

How can I help You? This is how bridged and macvlan networks are working in docker environment.
It is not my fault and it is also not the fault of the unRAID developers. Quite simply, docker was created for something other than what is used by many. For many reasons, a container should represent one service / process, meanwhile, we build containers that include a database, an application or several applications. Probably if you build one image containing the agent server and zabbix web it will work according to your expectations. I am not in favor of duplicating applications since they already exist in the image repository. Unfortunately, but applications such as zabbix server should be run in a host or virtual machine, not in a container, it will not cause such problems.
 

On 9/30/2022 at 11:34 AM, TurboStreetCar said:

I will try passing /proc/net/dev to the container at the /host/ path, but im not sure how to "reroute" the net key to that new location. i assume it would be somewhere in the conf file? Only issue with that is updates would break that modification. 

Try looking for a solution on the zabbix community forum

Link to comment
  • 1 month later...
On 1/11/2022 at 6:25 AM, VRx said:

Sorry, I think I missed notification about reply.
 

 

On the docker configuration page you have preconfigured /mnt/user and /mnt/cache (as array and cache pool).
You can change it on Your own, for example by disk or maybe add some other pools.
Access Mode can be just Read Only
For example:
/mnt/user on host You can bind to /mnt/array in zabbix agent container

/mnt/cache on host You can bind to /mnt/something in zabbix agent container
In Zabbix GUI You must set container paths to monitor, so:
/mnt/array
and

/mnt/something

I'm drawing a blank here. I've got the template configured using Linux by Zabbix Agent and it's working great. It has discovered /mnt/cache but it is not discovering /mnt/array. 

 

It has also discovered all sorts of other filesystems (/, /etc/hostname - and some others). I assume those are related to the docker file as they seem to be detecting my docker file size.

 

Any tips to get /mnt/array detected?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.