Ad Widget

Collapse

Active connections

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Barzdukas
    Junior Member
    • Nov 2009
    • 4

    #1

    Active connections

    Good day,

    I am trying to set zabbix monitor to look at active connections made on specific port.
    Linux deb command netstat -nat | grep :21 | grep ESTABLISHED | wc -l
    I have activated external scripts in server configuration file (*netstat21).
    Made script file (gave permissions and etc.)
    Made item with external check netstat21[]
    So now i can see graph of connections on 21 port on zabbix localhost server, but i need also to check connections on another servers, where zabbix agents is running.

    I have done some searching and found

    This patch should do the thing like i want it, but i dont know how to apply patch or maybe i missed something ?
  • MrKen
    Senior Member
    • Oct 2008
    • 652

    #2
    man patch
    Disclaimer: All of the above is pure speculation.

    Comment

    • Barzdukas
      Junior Member
      • Nov 2009
      • 4

      #3
      Originally posted by MrKen
      man patch
      Thank you for replay, as i understand i have to look to manual? But i have checked it (manual version 1.6 same as zabbix 1.6.4) i only see some info about mysql patch.sql...

      Comment

      • zabbix_zen
        Senior Member
        • Jul 2009
        • 426

        #4
        MrKen was really saying to insert 'man patch' on your unix console.
        Nothing to do with zabbix Manual.

        Comment

        • MrKen
          Senior Member
          • Oct 2008
          • 652

          #5
          Thanks zabbix_zen, that is what I meant.

          'patch' is a linux command.

          http://linux.die.net/man/1/patch or just Google it.

          MrKen
          Disclaimer: All of the above is pure speculation.

          Comment

          • Barzdukas
            Junior Member
            • Nov 2009
            • 4

            #6
            Originally posted by MrKen
            Thanks zabbix_zen, that is what I meant.

            'patch' is a linux command.

            http://linux.die.net/man/1/patch or just Google it.

            MrKen
            su i have to just run "patch zabbix-tcp_connected.patch" and thats all ?
            I also have found inside *.patch file these lines

            " #if defined(_WINDOWS)
            int USER_PERFCOUNTER(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result);
            --- /tmp/zabbix-1.4.4/create/data/data.sql 2008-03-01 21:19:38.000000000 +0100
            +++ create/data/data.sql 2008-03-01 22:39:58.000000000 +0100"

            shoud i change /tmp/zabbix-1.4.4/create/data/data.sql to 1.6 version location of zabbix?

            Comment

            • MrKen
              Senior Member
              • Oct 2008
              • 652

              #7
              Personally, I would have some reservations about applying a patch for 1.4.4 on my 1.6.x zabbix server. Check the files that are referred to in the patch, check the line numbers and see if the code is the same, otherwise you may end up with something other than what you were expecting.

              Make backups of the relevant files, then proceed at your own risk!

              MrKen
              Disclaimer: All of the above is pure speculation.

              Comment

              • Barzdukas
                Junior Member
                • Nov 2009
                • 4

                #8
                I see... Maybe any reader of this thread can help on this problem ? How do you monitor your active connections on specific port ? Maybe someone can share the experience ?

                Comment

                • MrKen
                  Senior Member
                  • Oct 2008
                  • 652

                  #9
                  Originally posted by Barzdukas
                  i need also to check connections on another servers, where zabbix agents is running.
                  What about UserParameters in the agentds' conf files, like your example above: netstat -nat | grep :21 | grep ESTABLISHED | wc -l

                  MrKen
                  Disclaimer: All of the above is pure speculation.

                  Comment

                  • mucknet
                    Member
                    • Dec 2004
                    • 59

                    #10
                    Originally posted by MrKen
                    What about UserParameters in the agentds' conf files, like your example above: netstat -nat | grep :21 | grep ESTABLISHED | wc -l

                    MrKen
                    That is the method I use.
                    UserParameter=established_conns[*], netstat -an | grep :$1 | grep ESTABLISHED |wc -l

                    Then your key would be established_conns[21]

                    Comment

                    Working...