View Full Version : How to monitor two machines behind the firewall/NAT
Just would like to ask how to monitor more machines which are behind firewall/NAT?
Is there any best option?
Forward 2 ports, and enable zabbix-client on an other port?
Forward 1 port, and let 1 client check another?
OK. I understand to forward 2 ports 10052 and 10053 and setup each agentd to listen on these ports.
I don't understand to the second option? Can you explain?
yup!
The latter option is to connect to the first client, and let him check the services on the internal network. The problem with this option is that you cannot check all services.
I advice to use the first option!
I have to explain why I was asking.
I actualy setup the first option, but it did not work. It still does not work.
I have server (Debian) running zabbix_server_1.1beta9
-----------------
Internet
-------------------
I have firewall (Debian) running zabbix_agentd_1.1beta9 (port 10050)
I have workstation (Win XP) behind firewall running zabbixagentdW32_1.1beta3 (port 10052)
On the firewall I have DNAT to workstation (Win XP) on port 10052
On the server I have setup port 10052 for that Win XP host
Firewall itself accepts port 10050
I know that the setup is definitely OK, but win XP agent does not want to work.
Firewall works without problem.
As I received reply that other version of agent and server should work I am lost.
Would anyone have any suggestion?
The error which is displayd in host is:
Not available Got empty string from [als04.allsupp.ath.cx] IP [] Parameter [agent.version]
Also error:
Not available Got empty string from [als04.allsupp.ath.cx] IP [] Parameter [agent.ping]
I would suggest to use active checks. In this case the agent will be active side, and all connections will be made the agents not by ZABBIX server.
So in that case agent on winxp does not work. I still can not get anything.
In the case of active checks, how should be host named on the zabbix server? Or how the server recognize that it is the right host?
erisan500
12-05-2006, 14:42
I'll give you a cofiguration example:
Zabbix server ip 10.0.0.10
has host My_WinXP_Box with IP 10.0.20.20
-------------------------
internet
-------------------------
WinXP Client with ip 10.0.20.20 and the following zabbix_agentd.conf:
Server=10.0.0.10
Hostname=My_WinXP_Box
Your host on the zabbix server should also be called My_WinXP_Box and change the checks to Active checks. Now the monitored hosts will send their data to the zabbix server.
Offcourse the ip's should be changed to your public ip's.
EriSan
So I tried to install zabbix_server on the local net. The windows agent does not probably work at all. Even on local net.
Is there any testing procedure?
The service is running the configuration file is:
# This is config file for zabbix_agentd
# To get more information about ZABBIX, go http://www.zabbix.com
############ GENERAL PARAMETERS #################
# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
# No spaces allowed. First entry is used for sending active checks.
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.
Server=alssrv01
# Server port for sending active checks
ServerPort=10051
# Unique hostname. Required for active checks.
Hostname=als04
# Listen port. Default is 10050
ListenPort=10050
# IP address to bind agent
# If missing, bind to all available IPs
#ListenIP=127.0.0.1
# Number of pre-forked instances of zabbix_agentd.
# Default value is 5
# This parameter must be between 1 and 16
StartAgents=5
# How often refresh list of active checks. 2 minutes by default.
#RefreshActiveChecks=30
# Disable active checks. The agent will work in passive mode listening server.
#DisableActive=1
# Enable remote commands for ZABBIX agent. By default remote commands disabled.
#EnableRemoteCommands=1
# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)
DebugLevel=3
# Name of PID file
PidFile=C:\zabbix_agentd.pid
# Name of log file.
# If not set, syslog will be used
LogFile=C:\zabbix_agentd.log
# Spend no more than Timeout seconds on processing
# Must be between 1 and 30
Timeout=25
####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V
Any suggestions?
Does anything has to be installed except the agentd on win xp machine?
erisan500
12-05-2006, 16:05
replace the content from your zabbix_agentd.conf file with this:
Server=alssrv01
Hostname=als04
LogFile=C:\zabbix_agentd.log
Make sure if you use hostnames they resolve correctly. I suggest to use fixed ip addresses for testing and when everything works ok you can move to hostnames.
After you made the changes to the conf file, restart the zabbix service.
EriSan
Still same.
Not available Connection reset by peer
Where could be the mistake? Is there any prerequisit prior installation of win32 agent?
erisan500
15-05-2006, 11:59
Please post the locations of zabbixw32.exe and zabbix_agentd.conf and what command you used to install the agent.
EriSan
Hi. I created server on the local lan with XP and I am not able to make it work.
The interesting part is, that if I use SNMP teplate I get some values and it looks like it works. But if I use Win32 template I dont get anything.
Please advice.
erisan500
15-05-2006, 12:23
Just reply to my previous post.
And turn OFF that bloody WinXP firewall !!!
EriSan
as advised
conf = c:\zabbix_agentd.conf
Zabbixw32 = c:\program files\zabbix\zabbixw32.exe
install = c:\program files\zabbix\zabbixw32.exe install
service is looking to the right config file
Service is running normaly without crashes.
No firewall involved.
Is there any service which should be running? Is there anything else?
Firewall is off. I think that I try to test it on different XP machine. I dont know where is the mistake.
erisan500
15-05-2006, 13:03
Can you post the contents of C:\zabbix_agentd.log EriSan
Hi here is log file. I have done the restart of the service manualy.
I also installed the agent on another xp machine with the same result.
What I do wrong? :-)
[15-May-2006 20:44:47] Log file opened
[15-May-2006 20:44:49] Collector thread initialized successfully
[15-May-2006 20:44:49] Zabbix Win32 Agent started
[15-May-2006 20:53:33] Zabbix Win32 Agent stopped
************************************************** ************
[15-May-2006 20:53:33] Log file opened
[15-May-2006 20:53:33] Collector thread initialized successfully
[15-May-2006 20:53:33] Zabbix Win32 Agent started
[15-May-2006 21:01:54] Zabbix Win32 Agent stopped
************************************************** ************
[15-May-2006 21:01:54] Log file opened
[15-May-2006 21:01:54] Collector thread initialized successfully
[15-May-2006 21:01:54] Zabbix Win32 Agent started
Hi here is log file. I have done the restart of the service manualy.
I also installed the agent on another xp machine with the same result.
What I do wrong? :-)
[15-May-2006 20:44:47] Log file opened
[15-May-2006 20:44:49] Collector thread initialized successfully
[15-May-2006 20:44:49] Zabbix Win32 Agent started
[15-May-2006 20:53:33] Zabbix Win32 Agent stopped
************************************************** ************
[15-May-2006 20:53:33] Log file opened
[15-May-2006 20:53:33] Collector thread initialized successfully
[15-May-2006 20:53:33] Zabbix Win32 Agent started
[15-May-2006 21:01:54] Zabbix Win32 Agent stopped
************************************************** ************
[15-May-2006 21:01:54] Log file opened
[15-May-2006 21:01:54] Collector thread initialized successfully
[15-May-2006 21:01:54] Zabbix Win32 Agent started
Edit/Delete Message
erisan500
15-05-2006, 13:46
can you join the irc channel #zabbix on freenode so we can talk in real time?
EriSan
I am trying with kopete. Take me some time. Have to read the manual. Do not have experience with iRC
Skype: linuxgo
ICQ: 132596538
Finaly I solved the problem.
The issue was in zabbix_agentd.conf where variable Server did not work with FQDN. Even if I would ping the server through the FQDN.
When I inserted the IP it just works :-)