View Full Version : Zabbix Agent w/ DHCP
pnicolosi78
17-02-2005, 18:59
My scenario is this. We monitor several clients' servers using Zabbix. While we have no problem with static IP addresses and getting them to be able to talk to the Zabbix server, we can't seem to get our clients which use an internet service that has dynamic IPs. How would I configure the agent, and zabbix server to recognize the client and get the information that I need from it? Any help would be greatly appreciated., and no, making the client get a static IP is not a viable option at this point. :confused:
Maybe you could assign static DNS names and monitor these hosts by DNS name rather than IP address...
pnicolosi78
17-02-2005, 20:31
how do I do that? :confused:
Well, actually I have no idea :rolleyes: Possibly combination of DHCP and DNS could do the trick. In this case, I believe MAC addresses can be used to uniquely identify client servers.
Not sure of your exact environment, but look into Dynamic DNS services.
I believe EveryDNS.net has a reliable free service. I'm sure there are several other around.
Basically you run a client on your hosts with dynamic IP's, the client code sends an update to the server when the host ip changes.
pnicolosi78
18-02-2005, 22:34
I know about dynamic DNS services, I just wasn't sure if Zabbix has to use IP addresses or if it can use a fully qualified domain name. I.E windowssucks.microsoft.com. So can Zabbix reference servers by dns name? Conversely, can the agents refer to the zabbix server by a dns name? And one more question, can an agent transmit data back to multiple zabbix servers? I.e if I have a zabbix1.domain.com and a zabbix2.domain.com both having different IP addresses, can the agent transmit back to both?
Mark Ramm-Christensen
21-02-2005, 16:01
I know about dynamic DNS services, I just wasn't sure if Zabbix has to use IP addresses or if it can use a fully qualified domain name. I.E windowssucks.microsoft.com. So can Zabbix reference servers by dns name? Conversely, can the agents refer to the zabbix server by a dns name? And one more question, can an agent transmit data back to multiple zabbix servers? I.e if I have a zabbix1.domain.com and a zabbix2.domain.com both having different IP addresses, can the agent transmit back to both?
I believe you need a static IP for the server. The zabbix agent will respond to multiple server requests, as long as they are all listed as allowed in the .conf file. Check the docs for more details.
To specify multiple servers, you can either write
their addresses in one line separated by commans, or create multiple
"Server = ..." lines.
I have not tried to configure zabbix_sender with multiple servers, so I can't speak to that.
--Mark
Mark is correct on on the agent stuff. The agentd.conf needs an IP address for the server. It will not reverse a dns name to an IP. And it can contain multiple IPs if you want more than one server to query the agent. As for zabbix_sender, i think you would have to call it multilple times, using a while loop or such, one for each server you wanted to send to.
Using a dynamic provider for the client works fine. By default zabbix_server will query based on the hostname you have configured. You can override that by checking the use IP Address box on the host config. I have had excellent results with dyndns.org.
HTH
cooper
pnicolosi78
23-02-2005, 04:01
Unfortunately the servers I monitor with Zabbix are all WIndows servers. For what my company wants me to have monitor, it does the job. The Zabbix server will always have a static IP, so long as the Zabbix Agent can be reached by DNS name it will work for me. The pain with my setup is having to traverse the internet and open up ports on firewalls. Thanks for the help from everyone.
pnicolosi78
24-02-2005, 18:20
if my network has multiple ISPs for redundancy, can I specify two seperate IPs for the Zabbix server in the .conf file for the zabbix agent? Will this cause a problem with the database if it's reporting to two different IPs? Basically I'm looking for a failover in-case my primary internet connection goes down.