Ad Widget

Collapse

Monitor specific port

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Villain
    Member
    • Aug 2006
    • 84

    #1

    Monitor specific port

    Hello all,

    I am trying to monitor a specific port on one of my servers. For example, I want to see if the server is answering on port 8280 every few minutes. I do not have the Zabbix agent installed, nor can I install it on this particular machine.

    I setup an item as follows:

    Type: Simple Check
    Key: check_port[1.2.3.4,8280]
    Type of information: Numeric (integer 64bit)
    Units: <blank>
    Use Multiplier: do not use
    Update Interval: 180
    Keep History: 90
    Keep Trends: 365
    Status: disabled (now, was Monitored)
    Store Value: As is
    Show Value Throw Map: As is

    When I go to Monitoring > Latest Data my server is not listed under hosts. It also does not show any info. If I go back to configuration, items, and click the 'disabled' link to actiave the service, I can then see a '-' symbol for the data.

    I have changed the parameters to use a different 'Type of Information' but I still don't get any data. Am I doing something wrong? Does the 'check_port' Key not work for Simple Checks?

    How would I verify that a device is listening on port 8080 if I can't install the agent on that machine?

    Thank you
  • Villain
    Member
    • Aug 2006
    • 84

    #2
    In addition:

    I added an entry to my hosts file for the device in question, then changed the following:

    Key: net.tcp.port[servername,8280]

    After saving this, I am told that the port number in Key must be numeric. I'm not sure why it is giving me this, considering that 8280 is a numeric value.

    Is there something else I am doing incorrectly?

    Comment

    • janand2
      Junior Member
      • Aug 2006
      • 4

      #3
      Hi,
      do you run Windows agent oder Linux agent?

      Comment

      • Villain
        Member
        • Aug 2006
        • 84

        #4
        Neither. The machine that this is on cannot have an agent running, it's an embedded box that runs a specific application.

        All we were wanting to do is verify that a port was opening and the necessary program was responding to requests.

        Comment

        • Sarek
          Junior Member
          • Aug 2006
          • 24

          #5
          Wouldn't it be net.tcp.port[8280] ?
          Because it'd get the servername from the host the item is linked to. Or am I going insane?

          I just checked and if i put a key as

          tcp,8280
          it gives me a numeric value if the port is up/down.

          Originally posted by Villain
          In addition:

          I added an entry to my hosts file for the device in question, then changed the following:

          Key: net.tcp.port[servername,8280]

          After saving this, I am told that the port number in Key must be numeric. I'm not sure why it is giving me this, considering that 8280 is a numeric value.

          Is there something else I am doing incorrectly?
          Last edited by Sarek; 24-08-2006, 22:52. Reason: Adding to post

          Comment

          • Villain
            Member
            • Aug 2006
            • 84

            #6
            What's strange is that I can get data from the machines that are running the Zabbix agent, but I am not able to get anything from the simple checks. Is it possible that I am missing something on the OS level? Is there something else that would prevent Simple Checks from working when the agent works on other devices?

            I changed the line to read:

            http,8280 (it's an embedded apache install) and still get no data, even after waiting overnight.

            I've also tried using tcp,2022 to monitor port 2022 for another app we have running, as well as a few other suggestions I have read. Unfortunately, I'm still not getting data.

            Thanks for the help on this, it's rather puzzling that it's not working, so I hope we can figure it out.

            Comment

            • raminix
              Member
              • Jun 2006
              • 37

              #7
              Can you telnet from the Zabbix server to the specified port on the target host?

              The proper form is tcp,8802 of type simple check. Also, have you tried doing a tcpdump on the Zabbix server to see watch the traffic to and from that host?

              Comment

              • ufocek
                Senior Member
                • Aug 2006
                • 161

                #8
                Hi

                I have try check on this host 192.168.1.242 is apache was running
                I create own items like this:

                net.tcp.port[<192.168.1.242>, 8081]

                status -> not supported and
                error -> Port number must be numeric in [net.tcp.port[<192.168.1.242>, 8081]

                What's wrong?

                Comment

                • raminix
                  Member
                  • Jun 2006
                  • 37

                  #9
                  Originally posted by ufocek
                  Hi

                  I have try check on this host 192.168.1.242 is apache was running
                  I create own items like this:

                  net.tcp.port[<192.168.1.242>, 8081]

                  status -> not supported and
                  error -> Port number must be numeric in [net.tcp.port[<192.168.1.242>, 8081]

                  What's wrong?
                  You need to format it as such:

                  net.tcp.port[192.168.1.242,8081]

                  When you see interstitials "<" and ">" in an example, it means it is an optional parameter. Do not type in the "<" and ">" characters. Also, try it without the space between the comma and port number.

                  Comment

                  • Sarek
                    Junior Member
                    • Aug 2006
                    • 24

                    #10
                    It doesn't already know the ip from the host it's linked to?

                    Originally posted by raminix
                    You need to format it as such:

                    net.tcp.port[192.168.1.242,8081]

                    When you see interstitials "<" and ">" in an example, it means it is an optional parameter. Do not type in the "<" and ">" characters. Also, try it without the space between the comma and port number.

                    Comment

                    • raminix
                      Member
                      • Jun 2006
                      • 37

                      #11
                      Originally posted by Sarek
                      It doesn't already know the ip from the host it's linked to?
                      The net.tcp.port check allows you to specify a specific IP address, but doesn't necessarily need one. It will default to 127.0.0.1 if one is not supplied.

                      Where this would come in handy is on a host with multiple interfaces with services bound to specific interfaces. Supplying the IP address allows you to specify which interface to check.

                      Comment

                      • RobertS
                        Member
                        • Aug 2006
                        • 57

                        #12
                        A) Simple check

                        1. Create a host with the ip of the box you want to monitor; fill in Name, Use IP, IP, set it to "not monitored" -> save
                        2. Create a item type "simple check" , key "tcp,8280"
                        3. Set the host to monitored

                        The zabbix server will check the port on the target host using fping (which has to be installed on zabbix server). 1=port is reachable, 0=no answer

                        B) Using an agent

                        You can use a host with an agent installed to do the check. Therefor you have to create a item "net.tcp.port[1.2.3.4,8280]". 0=port is reachable, 1=no answer

                        Comment

                        • reds
                          Junior Member
                          • Jul 2007
                          • 12

                          #13
                          Originally posted by RobertS
                          A) Simple check

                          1. Create a host with the ip of the box you want to monitor; fill in Name, Use IP, IP, set it to "not monitored" -> save
                          2. Create a item type "simple check" , key "tcp,8280"
                          3. Set the host to monitored

                          The zabbix server will check the port on the target host using fping (which has to be installed on zabbix server). 1=port is reachable, 0=no answer

                          B) Using an agent

                          You can use a host with an agent installed to do the check. Therefor you have to create a item "net.tcp.port[1.2.3.4,8280]". 0=port is reachable, 1=no answer
                          When you add the item to the zabbix server, does it force the zabbix agent to try to connect to the ip on the given port?

                          Also, according to the manual 0 = unavailabe, and 1 = available to connect.

                          Which kind of confuses me, because I know the port is up and open ready for connections. Yet it is returning 0.

                          Comment

                          • hollo
                            Junior Member
                            • Oct 2007
                            • 20

                            #14
                            Hi,
                            I fill pretty silly i have to ask this question, but i really cant get this simple check to work :s

                            my version is: ZABBIX 1.4.1 Copyright 2001-2007 by SIA Zabbix
                            running on debian

                            Well... i enter this in my item settings:

                            Desc: xxx
                            Type: Simple check
                            Key: tcp[222]
                            - if i enter tcp,222 as you mention above i get this
                            - [ERROR: Cannot update item]
                            - * Incorrect key format 'key_name[param1,param2,...]'
                            Type of information: Numeric

                            and all the rest doesnt really matter

                            but then with my settings i get the following errorcode in the items overview:

                            Status: Not supported
                            Error: Simple check [net.tcp.service[tcp[222],10.0.2.1]] is not supported

                            hmm.. all i want is to monitor a custom port.. hopefully i can enter the information in a template, but my test here has been made simple.. so i have added the item to a host.. afterwards i will try with a template..

                            kind regards
                            Michael Holm

                            Comment

                            Working...