Giter VIP home page Giter VIP logo

zabbix-module-sockets's People

Contributors

cavaliercoder avatar jangaraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zabbix-module-sockets's Issues

Bad performance under load

Hello. We started to use zabbix-module-sockets-1.1.0-1.x86_64.rpm and hit following problem. When OS has a lot of sockets, /proc/net/tcp read becomes too slow. zabbix-agents use 100% cpu and become unreachable. Thus we get holes in all graphs from high loaded host instead of stats while we get load spike.
screenshot 2018-06-12 17 15 49

What do you think about some internal caching implementation of /proc/net/ files inside zabbix-module-sockets ?

I get errors with zabbix-3.4.4

make all-recursive
make[1]: Entering directory /usr/local/src/download/zabbix-module-sockets-1.1.0' Making all in src/modules/sockets make[2]: Entering directory /usr/local/src/download/zabbix-module-sockets-1.1.0/src/modules/sockets'
/bin/sh ../../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I/usr/local/src/download/zabbix-3.4.4/include -g -O2 -MT libzbxsockets_la-tcp.lo -MD -MP -MF .deps/libzbxsockets_la-tcp.Tpo -c -o libzbxsockets_la-tcp.lo test -f 'tcp.c' || echo './'tcp.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I/usr/local/src/download/zabbix-3.4.4/include -g -O2 -MT libzbxsockets_la-tcp.lo -MD -MP -MF .deps/libzbxsockets_la-tcp.Tpo -c tcp.c -fPIC -DPIC -o .libs/libzbxsockets_la-tcp.o
In file included from libzbxsockets.h:13:0,
from tcp.c:1:
tcp.c: In function 'tcp_stat':
tcp.c:124:63: error: expected ')' before 'path'
SET_MSG_RESULT(result, zbx_dsprintf("Error reading %s: %s", path, zbx_strerror(errno)));
^
/usr/local/src/download/zabbix-3.4.4/include/module.h:141:24: note: in definition of macro 'SET_MSG_RESULT'
(res)->msg = (char *)(val)
^
/usr/local/src/download/zabbix-3.4.4/include/common.h:1044:64: note: in expansion of macro 'ZBX_CONST_STRING'

define zbx_dsprintf(dest, fmt, ...) __zbx_zbx_dsprintf(dest, ZBX_CONST_STRING(fmt), ##VA_ARGS)

                                                            ^

tcp.c:124:26: note: in expansion of macro 'zbx_dsprintf'
SET_MSG_RESULT(result, zbx_dsprintf("Error reading %s: %s", path, zbx_strerror(errno)));
^
make[2]: *** [libzbxsockets_la-tcp.lo] Error 1
make[2]: Leaving directory /usr/local/src/download/zabbix-module-sockets-1.1.0/src/modules/sockets' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /usr/local/src/download/zabbix-module-sockets-1.1.0'
make: *** [all] Error 2

Seems like m4 dir is missed

+ autoreconf -fisv
autoreconf-default: Entering directory `.'
autoreconf-default: configure.ac: not using Gettext
autoreconf-default: running: aclocal --force -Im4
aclocal-default: warning: couldn't open directory 'm4': No such file or directory
autoreconf-default: configure.ac: tracing

and result:

checking for x86_64-alt-linux-gcc option to accept ISO Standard C... (cached) none needed
checking for ANSI C header files... (cached) yes
./configure: line 12692: AX_CHECK_ZABBIX: command not found
configure: error: Zabbix headers not found
error: Bad exit status from /usr/src/tmp/rpm-tmp.95698 (%build)


RPM build errors:
    Bad exit status from /usr/src/tmp/rpm-tmp.95698 (%build)
Command exited with non-zero status 1

module.h does not exist

Hello,
I want to test this module on my Zabbix server installed with apt on a Ubuntu machine (zabbix_server (Zabbix) 3.2.7).
I can see a *.rpm package for yum and a *.tar.gz archive on the code page. I have downloaded the tar.gz on Zabbix server and unpacked it. When running ./configure command i am getting configure: error: /etc/zabbix//include/module.h does not exist.
Please, let me know how do I handle this.

Data not match with netstat

In netstat
netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:27017 0.0.0.0:* LISTEN 2045/mongod
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 8789/mongosqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1513/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1726/master
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 43154/zabbix_agentd

while in ss
ss -tl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:27017 :
LISTEN 0 8192 *:mysql :
LISTEN 0 128 *:ssh :
LISTEN 0 100 127.0.0.1:smtp :
LISTEN 0 128 *:10050 :

In in zabbix value is diff.
Screenshot 2020-08-06 at 7 06 40 PM

Support for 4.x version

Hi,

Please let us know if you have any plans to provide support for zabbix_server (Zabbix) 4.0.0rc3 version. Current import does not work for me :(

Thanks

Compilation broken

make[2]: Entering directory `/usr/src/RPM/BUILD/zabbix-module-sockets-1.1.0/src/modules/sockets'
/bin/sh ../../../libtool  --tag=CC   --mode=compile x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../..     -I/usr/include/zabbix -pipe -Wall -g -O2 -c -o libzbxsockets_la-libzbxsockets.lo `test -f 'libzbxsockets.c' || echo './'`libzbxsockets.c
/bin/sh ../../../libtool  --tag=CC   --mode=compile x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../..     -I/usr/include/zabbix -pipe -Wall -g -O2 -c -o libzbxsockets_la-tcp.lo `test -f 'tcp.c' || echo './'`tcp.c
/bin/sh ../../../libtool  --tag=CC   --mode=compile x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../..     -I/usr/include/zabbix -pipe -Wall -g -O2 -c -o libzbxsockets_la-unix.lo `test -f 'unix.c' || echo './'`unix.c
libtool: compile:  x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/zabbix -pipe -Wall -g -O2 -c unix.c  -fPIC -DPIC -o .libs/libzbxsockets_la-unix.o
libtool: compile:  x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/zabbix -pipe -Wall -g -O2 -c tcp.c  -fPIC -DPIC -o .libs/libzbxsockets_la-tcp.o
libtool: compile:  x86_64-alt-linux-gcc -DHAVE_CONFIG_H -I. -I../../.. -I/usr/include/zabbix -pipe -Wall -g -O2 -c libzbxsockets.c  -fPIC -DPIC -o .libs/libzbxsockets_la-libzbxsockets.o
In file included from libzbxsockets.h:13:0,
                 from tcp.c:1:
tcp.c: In function 'tcp_stat':
tcp.c:124:63: error: expected ')' before 'path'
   SET_MSG_RESULT(result, zbx_dsprintf("Error reading %s: %s", path, zbx_strerror(errno)));

Can't compile from src: tcp.c:124: error: expected ')' before 'path'

make  all-recursive
make[1]: Entering directory `/home/zabbix/zabbix-module-sockets-1.1.0'
Making all in src/modules/sockets
make[2]: Entering directory `/home/zabbix/zabbix-module-sockets-1.1.0/src/modules/sockets'
/bin/sh ../../../libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../..     -I/home/zabbix/zabbix-3.2.5/include -g -O2 -MT libzbxsockets_la-tcp.lo -MD -MP -MF .deps/libzbxsockets_la-tcp.Tpo -c -o libzbxsockets_la-tcp.lo `test -f 'tcp.c' || echo './'`tcp.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. -I/home/zabbix/zabbix-3.2.5/include -g -O2 -MT libzbxsockets_la-tcp.lo -MD -MP -MF .deps/libzbxsockets_la-tcp.Tpo -c tcp.c  -fPIC -DPIC -o .libs/libzbxsockets_la-tcp.o
tcp.c: In function 'tcp_stat':
tcp.c:124: error: expected ')' before 'path'
make[2]: *** [libzbxsockets_la-tcp.lo] Error 1
make[2]: Leaving directory `/home/zabbix/zabbix-module-sockets-1.1.0/src/modules/sockets'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zabbix/zabbix-module-sockets-1.1.0'
make: *** [all] Error 2
gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) 

....
sorry, too slow.
using master branch all work as is. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.