Ad Widget

Collapse

How to monitor two machines behind the firewall/NAT

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kanour
    Senior Member
    • May 2006
    • 105

    #1

    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?
  • DiedX
    Senior Member
    • Oct 2004
    • 106

    #2
    Forward 2 ports, and enable zabbix-client on an other port?

    Forward 1 port, and let 1 client check another?
    https://www.diederik.nl

    Comment

    • kanour
      Senior Member
      • May 2006
      • 105

      #3
      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?

      Comment

      • DiedX
        Senior Member
        • Oct 2004
        • 106

        #4
        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!
        https://www.diederik.nl

        Comment

        • kanour
          Senior Member
          • May 2006
          • 105

          #5
          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?

          Comment

          • kanour
            Senior Member
            • May 2006
            • 105

            #6
            The error which is displayd in host is:
            Not available Got empty string from [als04.allsupp.ath.cx] IP [] Parameter [agent.version]

            Comment

            • kanour
              Senior Member
              • May 2006
              • 105

              #7
              Also error:
              Not available Got empty string from [als04.allsupp.ath.cx] IP [] Parameter [agent.ping]

              Comment

              • Alexei
                Founder, CEO
                Zabbix Certified Trainer
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2004
                • 5654

                #8
                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.
                Alexei Vladishev
                Creator of Zabbix, Product manager
                New York | Tokyo | Riga
                My Twitter

                Comment

                • kanour
                  Senior Member
                  • May 2006
                  • 105

                  #9
                  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?

                  Comment

                  • erisan500
                    Senior Member
                    Zabbix Certified Specialist
                    • Aug 2005
                    • 285

                    #10
                    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
                    EriSan
                    Zabbix Certified Specialist

                    Comment

                    • kanour
                      Senior Member
                      • May 2006
                      • 105

                      #11
                      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?

                      Comment

                      • kanour
                        Senior Member
                        • May 2006
                        • 105

                        #12
                        Does anything has to be installed except the agentd on win xp machine?

                        Comment

                        • erisan500
                          Senior Member
                          Zabbix Certified Specialist
                          • Aug 2005
                          • 285

                          #13
                          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
                          EriSan
                          Zabbix Certified Specialist

                          Comment

                          • kanour
                            Senior Member
                            • May 2006
                            • 105

                            #14
                            Still same.
                            Not available Connection reset by peer

                            Where could be the mistake? Is there any prerequisit prior installation of win32 agent?

                            Comment

                            • erisan500
                              Senior Member
                              Zabbix Certified Specialist
                              • Aug 2005
                              • 285

                              #15
                              Please post the locations of zabbixw32.exe and zabbix_agentd.conf and what command you used to install the agent.


                              EriSan
                              EriSan
                              Zabbix Certified Specialist

                              Comment

                              Working...