Ad Widget

Collapse

How check custom port ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sauron
    Senior Member
    • Jan 2005
    • 215

    #1

    How check custom port ?

    When i'm add
    Code:
    tcp,,4000
    but it's not work 'i'm try add
    Code:
    tcp,4000
    and this not work. I'm got in log:
    Simple check [net.tcp.service[tcp,,4000,tp.core]] is not supported
    How check custom port ?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    net.tcp.port[ip,port]
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • sauron
      Senior Member
      • Jan 2005
      • 215

      #3
      Hah... common.c contain not correct params order. Fix in attach. tcp,4000 working.
      Attached Files
      Last edited by sauron; 27-02-2006, 14:50. Reason: Wrong patch

      Comment

      • sauron
        Senior Member
        • Jan 2005
        • 215

        #4
        Originally posted by Alexei
        net.tcp.port[ip,port]
        Not working. As simple check i'm got in log:

        Code:
        Simple check [net.tcp.service[net.tcp.port[,4000],tp.core]] is not supported

        Comment

        • Dave Miller
          Junior Member
          • Feb 2006
          • 10

          #5
          tcp_port_check.path

          Would it be possible to get a quick HOW TO posted on the installation of the tcp_port_check.path? That is, unless someone has come up with a better way to make tcp,”port number” work with simple checks.

          Comment

          • sauron
            Senior Member
            • Jan 2005
            • 215

            #6
            put patch in zabbix directory. Then run command:
            Code:
            patch -p1 < file_with.patch

            Comment

            • Dave Miller
              Junior Member
              • Feb 2006
              • 10

              #7
              Thanks for the patch and info

              I changed the zabbix path in the patch to make it correct, for my install.
              Then ran: patch -p1 < file_with.patch
              ./configure --parms.....
              make
              make install

              and it worked great.

              The only thing is that simple check keys pop, http, and smtp now return a zero, when they are accepting connections.

              Thats OK, because tcp,110 tcp,80 and tcp,25 work just fine now...

              Thanks again...

              Comment

              • sauron
                Senior Member
                • Jan 2005
                • 215

                #8
                Hmm... strange. I'm use ssh key and it's work.

                Comment

                • ruckus37
                  Member
                  • Oct 2004
                  • 57

                  #9
                  Does this work for 1.1beta8

                  Comment

                  • sauron
                    Senior Member
                    • Jan 2005
                    • 215

                    #10
                    Yes. It's shuld work.

                    Comment

                    • globe
                      Member
                      • Apr 2006
                      • 40

                      #11
                      unfortunatelly not!

                      Comment

                      • Smokezz
                        Junior Member
                        • Apr 2006
                        • 3

                        #12
                        tcp,port seems to be still broken in beta9 too. Any plans for this to be fixed in the final 1.1? (Hoping so). The attached patch doesn't work in 1.1b9.


                        Eric

                        Comment

                        • globe
                          Member
                          • Apr 2006
                          • 40

                          #13
                          same at my side, in beta9 it isn't working

                          Comment

                          • koko
                            Junior Member
                            • Apr 2006
                            • 3

                            #14
                            Workaround

                            Hi,

                            we've the same Problem with custom tcp ports. After a while we found two sections of port-checks in the common.c-file (to find it, search for "http"). One section checks the port, the other section does the performance-ceck

                            Both sections look like this:

                            .
                            .
                            else if(strcmp(service,"http") == 0)
                            {
                            if(port == 0) port=80;
                            ret=tcp_expect(ip,port,NULL,NULL,"",&value_int);
                            }
                            .
                            .

                            To create your own port service, duplicate the section, change "http" to a key, what do want, change port to the port you want to check!

                            Do this for both sections!

                            Now it should look like this:

                            .
                            .
                            else if(strcmp(service,"http") == 0)
                            {
                            if(port == 0) port=80;
                            ret=tcp_expect(ip,port,NULL,NULL,"",&value_int);
                            }
                            else if(strcmp(service,"mssql") == 0)
                            {
                            if(port == 0) port=1433;
                            ret=tcp_expect(ip,port,NULL,NULL,"",&value_int);
                            }
                            .
                            .

                            We used it to create sections for:
                            - Microsoft SQL Server
                            - Microsoft RDP Service
                            - Pervasive SQL Server

                            The Port-Check works well. We don't test the performance-check.
                            If anyone needs the section we used, we can post it here!

                            Bye

                            Koko

                            Comment

                            • cybaspace
                              Member
                              • Jul 2005
                              • 43

                              #15
                              Simple TCP Check doesn't work ...

                              we run zabbix version 1.1b9 and it still doesn't do simple tcp checks (even after the patch)

                              Any idea when it's fixed? Would be verry handy you know ...

                              Comment

                              Working...