Ad Widget

Collapse

Check to make TCP-connection to Port an localhost

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • csf
    Senior Member
    • Nov 2007
    • 154

    #1

    Check to make TCP-connection to Port an localhost

    Hello All,

    I need you to control a service on the clientside of Zabbix (port 9027).
    The service is started on 127.0.0.1 listens port only to localhost and does not communicate to the network device.
    Which means it can only be tested on clientside and not from serverside on Zabbix-server.
    Can somebody inform me about the configuration both from clientside, and from serverside?

    Many Thanks.

    Leonid.
  • jroberson
    Senior Member
    • May 2008
    • 124

    #2
    Define a "UserParameter" that calls a command or script to check that service in the zabbix_agentd.conf file ("client" side). Set it to return a 1 for up & 0 for down (or whatever you want) and then call that as an item in Zabbix. Page 119 in the Zabbix manual, or all over the forums.

    Comment

    • csf
      Senior Member
      • Nov 2007
      • 154

      #3
      Originally posted by jroberson
      Define a "UserParameter" that calls a command or script to check that service in the zabbix_agentd.conf file ("client" side). Set it to return a 1 for up & 0 for down (or whatever you want) and then call that as an item in Zabbix. Page 119 in the Zabbix manual, or all over the forums.


      Thanks for the answer.

      UserParameter=Mongrel_test,telnet 127.0.0.1 9070

      But as to me then to break off the telnet-connection ?

      Comment

      • jroberson
        Senior Member
        • May 2008
        • 124

        #4
        Not sure about that. You might have to make a small shell script and monitor the return code of the telnet command. There also might be a better command to try than using telnet, but I can't think of one at the moment. Anybody else have a better solution?

        Comment

        • alixen
          Senior Member
          • Apr 2006
          • 474

          #5
          Zabbix agent can check if a TCP port is open.

          On client side:
          no special configuration

          On server side:
          create an Item of type "Zabbix Agent" and Key "net.tcp.port[,9070]"
          (it is described in Zabbix manual v1.6 p. 103)

          Hope this helps
          Alixen
          http://www.alixen.fr/zabbix.html

          Comment

          • csf
            Senior Member
            • Nov 2007
            • 154

            #6
            Originally posted by alixen
            Zabbix agent can check if a TCP port is open.

            On client side:
            no special configuration

            On server side:
            create an Item of type "Zabbix Agent" and Key "net.tcp.port[,9070]"
            (it is described in Zabbix manual v1.6 p. 103)

            Hope this helps
            Alixen
            Opsss !!! It is exactly what I needed !

            Many thanks.

            Comment

            Working...