cacti / spine Goto Github PK
View Code? Open in Web Editor NEWSpine C Based Poller for Cacti
License: GNU Lesser General Public License v2.1
Spine C Based Poller for Cacti
License: GNU Lesser General Public License v2.1
2018/04/19 14:04:18 - SPINE: Poller[Main Poller] ERROR: SQL Failed! Error:'1064', Message:'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Desk' WHERE id='5'' at line 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='1', status_fail_date='2018-04-19 14:04', status_rec_date='2017-11-10 10:10:03', status_last_error='Device responded to SNMP, ICMP: Ping timed out', min_time='1.406910', max_time='1010.053520', cur_time='2.527950', avg_time='4.846900', total_polls='335362', failed_polls='33', availability='99.9902', snmp_sysDescr='1920-24G Switch Software Version 5.20.99, Release 1115
Copyright(c)2010-2016 Hewlett Packard Enterprise Development LP', snmp_sysObjectID='iso.3.6.1.4.1.25506.11.1.166', snmp_sysUpTimeInstance='302722807', snmp_sysContact='Gould Hall Computer Services Ltd', snmp_sysName='gh-sw-mjv', snmp_sysLocation='Mark's Desk' WHERE id='5''
The error comes about because I have used an apostrophe in my sysLocation.
snmp_sysLocation
= Mark's Desk
On fresh git clone
./configure --with-mysql --with-snmp
checking whether we are using Linux Capabilities... no
configure: error: Cannot find SNMP header files under yes
| #define HAVE_STRTOLL 1
| /* end confdefs.h. */
| #include <sys/capability.h>
configure:13072: result: no
configure:13072: checking for sys/capability.h
configure:13072: result: no
configure:13082: checking whether we are using Linux Capabilities
configure:13151: result: no
configure:13270: error: Cannot find SNMP header files under yes
debian 9 (stretch)
dpkg -L libsnmp-dev | grep net-snmp-config.h
/usr/include/net-snmp/net-snmp-config.h
I'm not sure if Spine already does or not, but it should report to the cacti.log file if there is an attempt to ping a device using ICMP without root privileges. ICMP requires socket privileges which are normally only available to root.
I used CACTI 1.1.17 with latest spine, ubuntu 16.04.3 xenial, php 7, and set the hosts down/up alerts for Ping only.
And I found out that worked on Ping for ICMP, but did not work on TCP and UDP Ping.
I found again and again from cacti logs, and I got a conclusion for this issue.
If I set the "Ping Timout Interval" less then 1000 ms, the TCP and UDP Ping seemed to be worked (but it caused up and down frequently), and if more than 1000 ms, the spine log said the process was timeout (in about 60 secs).
The spine setting I used at 0.8.8a cacti before, and it was ok at that time.
How can I solve this problem?
2018.02.13 10:32:05 - SPINE: Poller[1] ERROR: SQL Failed! Error:'1064', Message:'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Ethernet0/7' interface' WHERE host_id='7' AND data_query_id='1' AND arg1='.1.3.6' at line 1', SQL Fragment:'UPDATE poller_reindex SET assert_value='Adaptive Security Appliance 'Ethernet0/7' interface' WHERE host_id='7' AND data_query_id='1' AND arg1='.1.3.6.1.2.1.2.2.1.2.10''
I'm use Cacti 1.1.33 and spine-1.1.35
CentOS 7.3
mariadb-server 10.2.7
Package MariaDB-client-10.2.7-1.el7.centos.x86_64 already installed and latest version
spine 1.1.6
[root@localhost ]# cd spineobsolete.m4'
[root@localhost spine]# ls -lh
total 976K
-rw-rw-r--. 1 1000 1000 43K Jul 30 10:00 aclocal.m4
drwxr-xr-x. 2 1000 1000 118 Jul 30 10:00 autom4te.cache
-rwxrwxr-x. 1 1000 1000 2.6K Jul 30 10:00 bootstrap
-rw-rw-r--. 1 1000 1000 19K Jul 30 10:00 ChangeLog
-rw-rw-r--. 1 1000 1000 4.3K Jul 30 10:00 common.h
drwxr-xr-x. 2 1000 1000 143 Jul 30 10:00 config
-rwxrwxr-x. 1 1000 1000 459K Jul 30 10:00 configure
-rw-rw-r--. 1 1000 1000 12K Jul 30 10:00 configure.ac
-rw-rw-r--. 1 1000 1000 4.9K Jul 30 10:00 error.c
-rw-rw-r--. 1 1000 1000 2.4K Jul 30 10:00 error.h
-rw-rw-r--. 1 1000 1000 16K Jul 30 10:00 INSTALL
-rw-rw-r--. 1 1000 1000 6.9K Jul 30 10:00 keywords.c
-rw-rw-r--. 1 1000 1000 2.6K Jul 30 10:00 keywords.h
-rw-rw-r--. 1 1000 1000 26K Jul 30 10:00 LICENSE
-rw-rw-r--. 1 1000 1000 6.9K Jul 30 10:00 locks.c
-rw-rw-r--. 1 1000 1000 2.5K Jul 30 10:00 locks.h
drwxrwxr-x. 2 1000 1000 104 Jul 30 10:00 m4
-rw-rw-r--. 1 1000 1000 438 Jul 30 10:00 Makefile.am
-rw-rw-r--. 1 1000 1000 31K Jul 30 10:01 Makefile.in
-rw-rw-r--. 1 1000 1000 11K Jul 30 10:00 nft_popen.c
-rw-rw-r--. 1 1000 1000 2.5K Jul 30 10:00 nft_popen.h
-rw-rw-r--. 1 1000 1000 17K Jul 30 10:00 php.c
-rw-rw-r--. 1 1000 1000 2.5K Jul 30 10:00 php.h
-rw-rw-r--. 1 1000 1000 40K Jul 30 10:00 ping.c
-rw-rw-r--. 1 1000 1000 5.3K Jul 30 10:00 ping.h
-rw-rw-r--. 1 1000 1000 79K Jul 30 10:00 poller.c
-rw-rw-r--. 1 1000 1000 2.7K Jul 30 10:00 poller.h
-rw-rw-r--. 1 1000 1000 4.0K Jul 30 10:00 README.md
-rw-rw-r--. 1 1000 1000 24K Jul 30 10:00 snmp.c
-rw-rw-r--. 1 1000 1000 3.1K Jul 30 10:00 snmp.h
-rw-rw-r--. 1 1000 1000 28K Jul 30 10:00 spine.c
-rw-rw-r--. 1 1000 1000 3.3K Jul 30 10:00 spine.conf.dist
-rw-rw-r--. 1 1000 1000 16K Jul 30 10:00 spine.h
-rw-rw-r--. 1 1000 1000 12K Jul 30 10:00 sql.c
-rw-rw-r--. 1 1000 1000 2.7K Jul 30 10:00 sql.h
-rw-rw-r--. 1 1000 1000 37K Jul 30 10:00 util.c
-rw-rw-r--. 1 1000 1000 4.0K Jul 30 10:00 util.h
[root@localhost spine]# sh bootstrap
INFO: Starting Spine build process
INFO: Removing cache directories
INFO: Running auto-tools to verify buildability
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, config'. libtoolize: copying file
config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. libtoolize: copying file
m4/libtool.m4'
libtoolize: copying file m4/ltoptions.m4' libtoolize: copying file
m4/ltsugar.m4'
libtoolize: copying file m4/ltversion.m4' libtoolize: copying file
m4/lt
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
INFO: Spine bootstrap process completed
These instructions assume the default install location for spine
of /usr/local/spine. If you choose to use another prefix, make
sure you update the commands as required for that new path.
To compile and install Spine using MySQL versions 5.5 or higher
please do the following:
./configure
make
make install
chown root:root /usr/local/spine/bin/spine
chmod +s /usr/local/spine/bin/spine
To compile and install Spine using MySQL versions previous to 5.5
please do the following:
./configure --with-reentrant
make
make install
chown root:root /usr/local/spine/bin/spine
chmod +s /usr/local/spine/bin/spine
[root@localhost spine]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to enable -Wall... no
checking for help2man... /usr/bin/help2man
checking for help2man... /usr/bin/help2man
checking for threadsafe gethostbyname()... no
checking for gethostbyname_r in -lnls... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... yes
checking for deflate in -lz... yes
checking for kstat_close in -lkstat... no
checking for CRYPTO_realloc in -lcrypto... yes
checking for ANSI C header files... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for signal.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking for netinet/ip_icmp.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for malloc... yes
checking for calloc... yes
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking priv.h usability... no
checking priv.h presence... no
checking for priv.h... no
checking whether we are using Solaris privileges... no
checking sys/capability.h usability... no
checking sys/capability.h presence... no
checking for sys/capability.h... no
checking whether we are using Linux Capabilities... no
checking if Net-SNMP needs crypto support... no
checking for snmp_timeout in -lnetsnmp... no
checking for the spine results buffer size... 1024 bytes
checking for the maximum simultaneous spine scripts... 20
checking for the maximum MySQL buffer size... 65536
checking whether we are using traditional popen... no
checking whether to verify net-snmp library vs header versions... no
checking for glibc gethostbyname_r... no
checking for Solaris/Irix gethostbyname_r... no
checking for HP-UX gethostbyname_r... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
[root@localhost spine]# make
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
mv -f .deps/spine.Tpo .deps/spine.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT snmp.o -MD -MP -MF .deps/snmp.Tpo -c -o snmp.o snmp.c
mv -f .deps/snmp.Tpo .deps/snmp.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT locks.o -MD -MP -MF .deps/locks.Tpo -c -o locks.o locks.c
mv -f .deps/locks.Tpo .deps/locks.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT poller.o -MD -MP -MF .deps/poller.Tpo -c -o poller.o poller.c
mv -f .deps/poller.Tpo .deps/poller.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT nft_popen.o -MD -MP -MF .deps/nft_popen.Tpo -c -o nft_popen.o nft_popen.c
mv -f .deps/nft_popen.Tpo .deps/nft_popen.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT php.o -MD -MP -MF .deps/php.Tpo -c -o php.o php.c
mv -f .deps/php.Tpo .deps/php.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT ping.o -MD -MP -MF .deps/ping.Tpo -c -o ping.o ping.c
mv -f .deps/ping.Tpo .deps/ping.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT keywords.o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o keywords.c
mv -f .deps/keywords.Tpo .deps/keywords.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/usr/lib64 -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lmysqlclient -lcrypto -lz -lpthread -lm
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -L/usr/lib64 -lssl -lmysqlclient -lcrypto -lz -lpthread -lm
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make: *** [spine] Error 1
[root@localhost spine]#
[root@backup spine-release-1.1.16]# ./configure
-bash: ./configure: No such file or directory
The code to parse --mode
only checks for "online" and "offline", everything else sets it to recovery mode, even if you run it with something stupid
$ spine --mode=aakjndaiusdh19hd3
or less stupid, because someone made a typo:
$ spine --mode=oneline
How about this patch?
--- a/spine.c 2017-02-14 23:52:04.870894363 +0100
+++ b/spine.c 2017-02-14 23:56:45.406365574 +0100
@@ -345,9 +345,13 @@
set.mode = REMOTE_OFFLINE;
}
- else {
+ else if (STRIMATCH(getarg(opt, &argv), "recovery")) {
set.mode = REMOTE_RECOVERY;
}
+
+ else {
+ die("ERROR: invalid polling mode '%s' specified", opt);
+ }
}
else if (STRMATCH(arg, "-H") ||
In case exit is not desired, even when non-supported mode is given, then the fallback should be to online
, because that's what the manual says is the default.
Platform: Windows (Cygwin)
Version: 1.0.4
Description:
When sh.exe is missing from PATH / inaccessible, spine silently fails external program calls.
I just noticed there have been a few spine changes that I wasn't really aware of, eager to get the new version up and running! A couple suggestions ...
Perhaps when Release notices are sent to cacti-announce about new Cacti versions (including the recent changelog) spine could be included in this e-mail notification as well?
Also, the changelog on the web (https://cacti.net/spine_changelog.php) is missing a few entries from the changelog that I see in github.
Either one of these would help me (and maybe others) stay informed and up to date on spine. Thanks!
The problem is completely described here: Cacti/cacti#1127
Brief description of the problem:
The table poller_output_boost
is constantly populated and is not cleaned when the boot is off and not previously uncheck Enable direct population of poller_output_boost table
on config section Cacti.
With the last version (1.1.38) of Cacti and Spine:
It's not possible to add anymore udp6: in front of hostname/address as workaround in Cacti because it result of:
"Session SNMP error - SNMP::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known"
It's critical to have Spine able to poll IPv6 only host.
If there are debug devices defined, and is_debug_device() is called when the device ID passed to it is not the first one in the debug_devices array, it will go into an infinite loop. This will manifest as spine timing out when polling (right after the child thread is spawned) and eating up 100% of a cpu.
The issue can be fixed by changing line 224 in util.c as follows:
From:
while(i < 100) {
To:
while(i++ < 100) {
Hello,
/cygdrive/c/wamp/www/cacti/spine
$ ./bootstrap
INFO: Starting Spine build process
INFO: Removing cache directories
INFO: Running auto-tools to verify buildability
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf-2.69: failed to run aclocal: No such file or directory
ERROR: 'autoreconf' exited with errors
In C:\cygwin\usr\share folder, aclocal is here:
aclocal-1.15
aclocal
can you help me for build?
Cheers
configure:13082: checking whether we are using Linux Capabilities
configure:13151: result: no
configure:13285: checking if Net-SNMP needs crypto support
configure:13298: gcc -c -I/usr/include/net-snmp// -I/usr/include/net-snmp///.. -I/usr/include/mysql -g -O2 conftest.c >&5
conftest.c: In function 'main':
conftest.c:60:1: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
exit(NETSNMP_USE_OPENSSL != 1);
^~~~
conftest.c:60:1: warning: incompatible implicit declaration of built-in function 'exit'
conftest.c:60:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
`# rpmbuild -ba cacti-spine.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.WQZBLD
config'. libtoolize: linking file
config/ltmain.sh'm4'. libtoolize: linking file
m4/libtool.m4'm4/ltoptions.m4' libtoolize: linking file
m4/ltsugar.m4'm4/ltversion.m4' libtoolize: linking file
m4/lt~obsolete.m4'config/config.guess' configure.ac:7: installing
config/config.sub'config/install-sh' configure.ac:12: installing
config/missing'my_interval_timer': (.text+0x12): undefined reference to
clock_gettime'my_hrtime': (.text+0x3f): undefined reference to
clock_gettime'my_getcputime': (.text+0x92): undefined reference to
clock_gettime'RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.lf9ejg (%build)
`
`
MariaDB-compat-10.0.30-1.el6.x86_64
MariaDB-client-10.0.30-1.el6.x86_64
MariaDB-common-10.0.30-1.el6.x86_64
MariaDB-server-10.0.30-1.el6.x86_64
MariaDB-devel-10.0.30-1.el6.x86_64
`
# 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-17) (GCC)
Running MariaDB 10.2.9 from the MariaDB repo.
OS is Centos 7 with all latest patches.
Running Cacti 1.1.24 from EPEL repo
./configure runs well, no problems.
When I go to make I get this error....
[root@localhost cacti-spine-1.1.24]# make
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
mv -f .deps/spine.Tpo .deps/spine.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT snmp.o -MD -MP -MF .deps/snmp.Tpo -c -o snmp.o snmp.c
mv -f .deps/snmp.Tpo .deps/snmp.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT locks.o -MD -MP -MF .deps/locks.Tpo -c -o locks.o locks.c
mv -f .deps/locks.Tpo .deps/locks.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT poller.o -MD -MP -MF .deps/poller.Tpo -c -o poller.o poller.c
mv -f .deps/poller.Tpo .deps/poller.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT nft_popen.o -MD -MP -MF .deps/nft_popen.Tpo -c -o nft_popen.o nft_popen.c
mv -f .deps/nft_popen.Tpo .deps/nft_popen.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT php.o -MD -MP -MF .deps/php.Tpo -c -o php.o php.c
mv -f .deps/php.Tpo .deps/php.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT ping.o -MD -MP -MF .deps/ping.Tpo -c -o ping.o ping.c
mv -f .deps/ping.Tpo .deps/ping.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT keywords.o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o keywords.c
mv -f .deps/keywords.Tpo .deps/keywords.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/usr/lib64 -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lmysqlclient -lcrypto -lz -lpthread -lm
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -L/usr/lib64 -lssl -lmysqlclient -lcrypto -lz -lpthread -lm
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
I saw a similar problems saying this was a MariaDB issue and should have been fixed? Did they break it again in 10.2.9?
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305792), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305536), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305536), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305280), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305280), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/7, OLT-1 - Traffic - GPON 0/0/7] DS[7499]
2017-11-27 16:45:03 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/7, OLT-1 - Traffic - GPON 0/0/7] DS[7499]
2017-11-27 16:45:03 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/6, OLT-1 - Traffic - GPON 0/0/6] DS[7498]
2017-11-27 16:45:03 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/6, OLT-1 - Traffic - GPON 0/0/6] DS[7498]
2017-11-27 16:45:03 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/5, OLT-1 - Traffic - GPON 0/0/5] DS[7497]
2017-11-27 16:45:03 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/5, OLT-1 - Traffic - GPON 0/0/5] DS[7497]
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305024), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305792), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305024), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305792), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305536), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304768), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:03 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305536), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304768), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305280), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304512), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305280), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304512), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/4, OLT-1 - Traffic - GPON 0/0/4] DS[7496]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/4, OLT-1 - Traffic - GPON 0/0/4] DS[7496]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/3, OLT-1 - Traffic - GPON 0/0/3] DS[7495]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/3, OLT-1 - Traffic - GPON 0/0/3] DS[7495]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/2, OLT-1 - Traffic - GPON 0/0/2] DS[7494]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/2, OLT-1 - Traffic - GPON 0/0/2] DS[7494]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/1, OLT-1 - Traffic - GPON 0/0/1] DS[7493]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/1, OLT-1 - Traffic - GPON 0/0/1] DS[7493]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/0, OLT-1 - Traffic - GPON 0/0/0] DS[7492]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-1] Graphs[OLT-1 - Traffic - GPON 0/0/0, OLT-1 - Traffic - GPON 0/0/0] DS[7492]
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304256), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194305024), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304256), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304000), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194305024), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/0, OLT-2 - Traffic - GPON 0/0/0] DS[8779]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/13, OLT-2 - Traffic - GPON 0/0/13] DS[8792]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/13, OLT-2 - Traffic - GPON 0/0/13] DS[8792]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/14, OLT-2 - Traffic - GPON 0/0/14] DS[8793]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/14, OLT-2 - Traffic - GPON 0/0/14] DS[8793]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/15, OLT-2 - Traffic - GPON 0/0/15] DS[8794]
2017-11-27 16:45:02 - SPINE: Poller[1] WARNING: Invalid Response, Device[OLT-2] Graphs[OLT-2 - Traffic - GPON 0/0/15, OLT-2 - Traffic - GPON 0/0/15] DS[8794]
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304768), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304000), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304768), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194307328), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304512), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194307328), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304512), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194307584), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304256), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194307584), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304256), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194307840), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194304000), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-1] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.10.4194304000), Set MAX_OIDS to 1 for this host to isolate bad OID
2017-11-27 16:45:02 - SPINE: Poller[1] Device[OLT-2] ERROR: Problems parsing Multi SNMP OID! (oid: .1.3.6.1.2.1.2.2.1.16.4194307840), Set MAX_OIDS to 1 for this host to isolate bad OID
SNMP on this hosts set to V2
Maximum OIDs Per Get Request set to 1
# dpkg -l "*snmp*"
||/ Nazwa Wersja Architektura Opis
+++-========================================-=========================-=========================-======================================================================================
ii libsnmp-base 5.7.3+dfsg-1.7 all SNMP configuration script, MIBs and documentation
un libsnmp-dev <brak> <brak> (brak dostępnego opisu)
un libsnmp15 <brak> <brak> (brak dostępnego opisu)
ii libsnmp30:amd64 5.7.3+dfsg-1.7 amd64 SNMP (Simple Network Management Protocol) library
un libsnmp9-dev <brak> <brak> (brak dostępnego opisu)
ii php5-snmp 5.6.30+dfsg-0+deb8u1 amd64 SNMP module for php5
ii snmp 5.7.3+dfsg-1.7 amd64 SNMP (Simple Network Management Protocol) applications
ii snmp-mibs-downloader 1.1+nmu1 all Install and manage Management Information Base (MIB) files
ii snmpd 5.7.3+dfsg-1.7 amd64 SNMP (Simple Network Management Protocol) agents
un snmptrapd <brak> <brak> (brak dostępnego opisu)
How to debug that?
When logging with spine_log() the cacti.log file becomes inconsistent in its date/time formatting. The reason is that the spine_log() function currently formats the date/time using a hard coded hyphen (-) separator rather than using the format selected within cacti's settings.
This should be changed to obey the same rules of formatting that the cacti_log() function by creating a spine version of cacti's date_time_format() in lib/functions.php which is defined by the settings table.
I am experiencing an issue with spine cutting off the output from a script being used by a data input method.
The best way to begin illustrating this issue is with a code snippet:
if ($query=="current") {
$return_arr = cacti_snmp_walk($hostname, $snmp_community,
$oids["PhaseStatusCurrent"], $snmp_version, $snmp_auth_username,
$snmp_auth_password, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol,
$snmp_context, $snmp_port, $snmp_timeout, $snmp_retries, $max_oids, SNMP_POLLER);
for ($i=0;($i<sizeof($return_arr));$i++) {
$index = $i+1;
print "current$index:" . chop($return_arr[$i]["value"]);
if ($i < (sizeof($return_arr)-1)) {
print " ";
}
}
}
This should produce the following output:
current1:186 current2:162 current3:178 current4:167 current5:204 current6:160 current7:153 current8:193 current9:163
When I use spine, I'm getting very inconsistent results, example:
2017-04-23 21:08:47 - SPINE: Poller[1] Device[1] TH[1] DS[2] SCRIPT: php -q /cacti/scripts/query_device.php current '192.168.1.3' 'public' '2' '161' '500' "''" "''" "''" "''" "''", output: current1:185 current2:162 current3:178
Switching to cmd.php resolves the problem.
Now, I tried a slightly different approach, see this code snippet:
if ($query=="current") {
$output = '';
$return_arr = cacti_snmp_walk($hostname, $snmp_community,
$oids["PhaseStatusCurrent"], $snmp_version, $snmp_auth_username,
$snmp_auth_password, $snmp_auth_protocol, $snmp_priv_passphrase, $snmp_priv_protocol,
$snmp_context, $snmp_port, $snmp_timeout, $snmp_retries, $max_oids, SNMP_POLLER);
for ($i=0;($i<sizeof($return_arr));$i++) {
$index = $i+1;
$output .= "current$index:" . chop($return_arr[$i]["value"]);
if ($i < (sizeof($return_arr)-1)) {
$output .= " ";
}
}
print $output;
}
By storing the complete command output and printing it just once, instead of through a for loop spine now consistently captures the full command output. My spine command timeout is 25 seconds. I'm running spine 1.1.0.
There are literally just microseconds between each value being returned from this script when being run through a for() loop ... I'm only looping through an array and doing very little processing in the interim. But it seems like this extremely small difference is enough to trip up spine. I can't tell you just how crazy this made me today ... !
I have useed Mariadb 10.2.7 and have installed yum install mariadb-devel
I have run command line for install Spine 1.1.13:
./configure them make error
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/usr/lib64 -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lmysqlclient -lcrypto -lz -lpthread -lm
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -L/usr/lib64 -lssl -lmysqlclient -lcrypto -lz -lpthread -lm
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make: *** [spine] Error 1
Please help me?
I am having spine poller problems that I don't understand, and am seeking assistance.
I have about 15 hosts that I am testing Cacti 1.0.3 on. Host types are MS Windows, Linux, Cisco ASAs, Cisco Small Business 300 switches (like the old Linksys SRW series), and Netgear switches.
These hosts are all working with the PHP poller. However, I am doing 1-minute graphing and two of these systems at remote sites are taking up to 45 seconds to finish their polls, so I want to reduce that time as much as possible. These two hosts are at remote sites with 50ms of latency in between, but I noticed that a lot of the latency time was in the php poller itself.
My primary problem is that I am seeing chronic intermittent "SNMP timeout" failures with spine. I am not seeing any such errors with the PHP poller.
The default SNMP timeout is 500ms, from which I started. I started getting SNMP timeout errors, so I figured I might need to raise this setting. I had never seen SNMP timeouts with the PHP poller before.
So I started raising this number slowly, but to no effect: 900ms, then 1500ms, then 3000ms.
And then I got tired of jerking around and set it to 30000.
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[728] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[729] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[730] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[731] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[732] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[733] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[734] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15458]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[11] TH[1] DS[735] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:07 test7 Cacti[15466]: 2017-03-02 20:26:07 - SPINE: Poller[1] Device[12] TH[1] DS[1228] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw3'
Mar 02 20:26:08 test7 Cacti[15458]: 2017-03-02 20:26:08 - SPINE: Poller[1] Device[11] TH[1] DS[736] WARNING: SNMP timeout detected [30000 ms], ignoring host 'sw2'
Mar 02 20:26:10 test7 Cacti[15402]: SYSTEM: STATS: Time:8.5303 Method:spine Processes:64 Threads:1 Hosts:20 HostsPerProcess:1 DataSources:9398 RRDsProcessed:1920
Cron runs at the 00-second mark. You can see from these double-timestamped syslog messages that we are only seven seconds into the minute and the poller has already timed out what should have been 30 seconds.
This setting isn't doing anything as far as I can tell. It doesn't matter what I set it to; the poller gives up after just a few seconds seconds every time, with no difference in how long it takes to time out. It's always timing out at the 6-8 second mark.
One difference between the PHP poller and spine is the "The Maximum SNMP OIDs Per SNMP Get Request" setting. SNMP defaults to 10, which is probably what the PHP poller users, and cacti/spine is configured for 30 by default. I have snmpbulkwalked all of my hosts and they support -Cr 30 or even 60 just fine. I tried setting this down to 10 anyway but it had no effect. Please correct me if this is wrong.
There is a notable pattern to this problem. The hosts which spine says are timing out are always the four Cisco SB 300 series switches, but it's not always the same four every time. Spine likes to pick one or two out of the four to fail on. Two will work fine, and then two will repeatedly alternate between failing and not failing, and I get massive amounts of holes in the graphs for those devices. There really isn't any patten to which devices it will pick to fail on: they are all 1-switch away on the same LAN, are the same model, and have the same number of graphs/DSs.
However, the type should have nothing to do with that timeout feature. There might be something going on where these switches are not behaving correctly, but spine isn't respecting that SNMP timeout setting one way or another. Or, it might just because they have the largest amount of DSs by far.
Ideas?
I wouldn't have filed this as a bug if it were not for the SNMP timeout thing. One way or another, something is broken there. If there is an internal hard limit, that needs to be reflected in the log messages. If the log says the timeout is 30 seconds, it needs to be 30 seconds.
when set SPINE working threads over 1, all poller CPU usage will be 100% except main poller
gcc -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include -g -O2 -L/usr/lib -L/usr/lib -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lnetsnmp -lmysqlclient_r -lcrypto -lz -lpthread -lm
/usr/lib/libmysqlclient_r.a(my_getsystime.c.o): In function `my_getsystime':
(.text+0x29): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
make: *** [spine] Ошибка 1
./spine/config.status @643 :
S["CFLAGS"]="-I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include -g -O2"
may be
S["CFLAGS"]="-lrt -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include -g -O2"
Compile fails with --enable-lcap
option:
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -L/usr/lib64/mysql -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lnetsnmp -lmysqlclient
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -L/usr/lib64/mysql -lpthread -lssl -lm -lnetsnmp -lmysqlclient
spine.o: In function `drop_root':
/root/inst/spine/spine.c:137: undefined reference to `cap_from_text'
/root/inst/spine/spine.c:143: undefined reference to `cap_set_proc'
/root/inst/spine/spine.c:149: undefined reference to `cap_free'
util.o: In function `hasCaps':
/root/inst/spine/util.c:1329: undefined reference to `cap_get_proc'
/root/inst/spine/util.c:1336: undefined reference to `cap_get_flag'
/root/inst/spine/util.c:1347: undefined reference to `cap_free'
collect2: error: ld returned 1 exit status
Should add -lcap
to LDFLAGS
, then it compiles fine.
Device: D-Link DGS-3100-24,
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Entering SNMP Ping
--
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: ICMP Device Alive, Try Count:2, Time:1003.0229 ms
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:05 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:04 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:04 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:04 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:04 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
2018/01/05 11:55:04 - SPINE: Poller[1] Device[SL45] DEBUG: Received EINTR
This occurs only for this one specified device.
2017/11/26 20:30:00 - SYSTEM STATS: Time:298.9212 Method:spine Processes:1 Threads:20 Hosts:455 HostsPerProcess:455 DataSources:6619 RRDsProcessed:1329
--
2017/11/26 20:30:00 - POLLER: Poller[1] Maximum runtime of 298 seconds exceeded. Exiting.
2017-11-26 20:25:25 - SPINE: Poller[1] FATAL: MySQL Error:'2006', Message:'MySQL server has gone away' [110, Connection timed out] (Spine thread)
2017-11-26 20:25:25 - SPINE: Poller[1] ERROR: SQL Failed! Error:'2013', Message:'Lost connection to MySQL server during query', SQL Fragment:'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (2454,'ping','2017-11-26 20:25:13','13.7') ON DUPLICATE KEY UPDATE output=VALUES(output)'
$ ps aux | grep mysqld
mysql 25283 0.0 24.8 2465200 1040744 ? Ssl paź14 1667:01 /usr/sbin/mysqld
These day ,I try to debug the issue. I add one mutex before mysql_init and mysql_real_connect . It work better than before. I think the issue cause by mutli thread operation of mysql.
change mysql setting max_connection to 3000, but it didn't worked.
Any idea?
ENV: centos6.9 nginx 1.12.1 + PHP 1.1 +mysql 5.7.17 + spine 1.1.28
OS : freebsd v11
net-snmpd v5.7.3
Problem during make command:
_# make
cc -DHAVE_CONFIG_H -I. -I./config -I/usr/local/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
In file included from sql.c:34:
./common.h:134:10: fatal error: 'net-snmp/net-snmp-config.h' file not found
#include <net-snmp/net-snmp-config.h>
^
1 error generated.
*** Error code 1
Stop.
make: stopped in /usr/home/amin/cacti-spine-1.1.2_
I am so sorry for closed the issue , and reopen one.
when set SPINE working threads over 1, all poller CPU usage will be 100% except main poller
I have test setuid , it is runing 100% also, main poller operating system is centos 6.8 and the another two poller is centos 6.8 64 bit. one poller is REDHat 5.4 64 bitone processes ,
one threads It work well. If threads more than one ,CPU's usage will be 100%.
It's basically the same as v2c except that a context can be specified.
Please look in this console output there are errors during compilation.
make
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
spine.c: In function ‘main’:
spine.c:484:23: warning: assignment makes integer from pointer without a cast
debug_devices[i+1] = NULL;
^
spine.c:489:20: warning: comparison between pointer and integer
debug_devices[0] == NULL;
^
mv -f .deps/spine.Tpo .deps/spine.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
util.c: In function ‘is_debug_device’:
util.c:225:24: warning: comparison between pointer and integer
if (debug_devices[i] == NULL) break;
^
util.c: In function ‘is_numeric’:
util.c:900:23: warning: passing argument 1 of ‘trim’ discards ‘const’ qualifier from pointer target type
length = strlen(trim(string));
^
In file included from spine.h:511:0,
from util.c:35:
util.h:64:14: note: expected ‘char *’ but argument is of type ‘const char *’
extern char *trim(char *str);
^
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT snmp.o -MD -MP -MF .deps/snmp.Tpo -c -o snmp.o snmp.c
mv -f .deps/snmp.Tpo .deps/snmp.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT locks.o -MD -MP -MF .deps/locks.Tpo -c -o locks.o locks.c
mv -f .deps/locks.Tpo .deps/locks.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT poller.o -MD -MP -MF .deps/poller.Tpo -c -o poller.o poller.c
poller.c: In function ‘child’:
poller.c:77:78: warning: passing argument 6 of ‘poll_host’ makes pointer from integer without a cast
poll_host(host_id, host_thread, last_host_thread, host_data_ids, host_time, host_errors, host_time_double);
^
In file included from spine.h:504:0,
from poller.c:35:
poller.h:35:13: note: expected ‘int ’ but argument is of type ‘int’
extern void poll_host(int host_id, int host_thread, int last_host_thread, int host_data_ids, char host_time, int* host_errors, double host_time_double);
^
mv -f .deps/poller.Tpo .deps/poller.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT nft_popen.o -MD -MP -MF .deps/nft_popen.Tpo -c -o nft_popen.o nft_popen.c
mv -f .deps/nft_popen.Tpo .deps/nft_popen.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT php.o -MD -MP -MF .deps/php.Tpo -c -o php.o php.c
mv -f .deps/php.Tpo .deps/php.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT ping.o -MD -MP -MF .deps/ping.Tpo -c -o ping.o ping.c
mv -f .deps/ping.Tpo .deps/ping.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT keywords.o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o keywords.c
mv -f .deps/keywords.Tpo .deps/keywords.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
/bin/bash ./libtool --tag=CC --mode=link gcc -I/usr/include/mysql -g -O2 -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lnetsnmp -lmysqlclient
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lpthread -lssl -lm -lnetsnmp -lmysqlclient
Will Spine work properly after compiling with those errors?
Regards.
JK
Log:
/bin/bash ./libtool --tag=CC --mode=link gcc -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -L -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lnetsnmp -lmysqlclient -lcrypto -lz -lpthread -lm
libtool: error: require no space between '-L' and '-lpthread'
Makefile:466: recipe for target 'spine' failed
make: *** [spine] Error 1
It seemes like LDFLAGS var contains empty path for -L flag. All previous versions of spine on the same sys config ran without this issue.
It appears RDB variables in spine.conf is not being sent to spine correctly. The username/password and db name are not correct. Unless this is by design where the master database and remote poller database needs to live on the same host using the same database credentials.
An outline of the issue can be viewed at http://forums.cacti.net/viewtopic.php?f=2&t=56978 - is this a bug or by design?
When the uptime is very large, in my case uptime = 2560814903, spine returns snmp_sysUpTimeInstance with minus, of course it is not inserted into the database, and Cacti is not shown uptime.
Log from DEBUG:
2017-01-25 23:48:00 - SPINE: Poller[1] ERROR: SQL Failed! Error:'1264', Message:'Out of range value for column 'snmp_sysUpTimeInstance' at row 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='0', status_fail_date='2017-01-12 03:07:00', status_rec_date='2017-01-12 03:16:00', status_last_error='Host did not respond to SNMP, ICMP: Ping timed out', min_time='0.203380', max_time='5658.534530', cur_time='0.413535', avg_time='1.905199', total_polls='2105441', failed_polls='2658', availability='99.8738', snmp_sysDescr='FreeBSD gate2.isp.kh.ua 10.3-PRERELEASE FreeBSD 10.3-PRERELEASE #1 r297151: Mon Mar 21 22:13:50 EET 2016 [email protected]:/usr/obj/usr/src/sys/GATE2 amd64', snmp_sysObjectID='NET-SNMP-MIB::netSnmpAgentOIDs.8', snmp_sysUpTimeInstance='-1733702469', snmp_sysContact='NOC, +38 (057) 7076704, <[email protected]>', snmp_sysName='gate2.isp.kh.ua', snmp_sysLocation='AC \\\"CIT Kharkiv Online\\\", apt 102, Kharkiv, Ukraine, 61002' WHERE id='20'' 2017-01-25 23:48:00 - SPINE: Poller[1] Device[20] TH[1] Recache DataQuery[1] OID: .1.3.6.1.2.1.1.3.0, output: 2561264827 2017-01-25 23:48:00 - SPINE: Poller[1] Device[20] TH[1] Recache DataQuery[8] OID: .1.3.6.1.2.1.1.3.0, output: 2561264827 2017-01-25 23:48:00 - SPINE: Poller[1] Device[20] TH[1] Recache DataQuery[9] OID: .1.3.6.1.2.1.1.3.0, output: 2561264827 2017-01-25 23:48:00 - SPINE: Poller[1] Device[20] TH[1] Recache DataQuery[19] OID: .1.3.6.1.2.1.1.3.0, output: 2561264827 2017-01-25 23:48:00 - SPINE: Poller[1] Device[20] TH[1] Recache DataQuery[20] OID: .1.3.6.1.2.1.1.3.0, output: 2561264827
poller_c.zip
I fix this:
`--- spine-develop/poller.c 2017-01-03 04:07:39.000000000 +0200
+++ spine-src-pautina/poller.c 2017-01-26 00:13:45.360251000 +0200
@@ -558,7 +558,7 @@
" status_rec_date='%s', status_last_error='%s', min_time='%f',"
" max_time='%f', cur_time='%f', avg_time='%f', total_polls='%i',"
" failed_polls='%i', availability='%.4f', snmp_sysDescr='%s', "
" snmp_sysObjectID='%s', snmp_sysUpTimeInstance='%i', "
" snmp_sysObjectID='%s', snmp_sysUpTimeInstance='%li', "
" snmp_sysContact='%s', snmp_sysName='%s', snmp_sysLocation='%s' "
"WHERE id='%i'",
host->status,
`
Hi,
I just installed cacti-spine 1.0.4 from source, and I found that the version is still 1.0.3. Here is the result when I tried to ru spine -v:
SPINE 1.0.3 Copyright 2004-2017 by The Cacti Group
Thank you
I make it through a ./configure OK but during compile:
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c In file included from sql.c:34:0: common.h:134:38: fatal error: net-snmp/net-snmp-config.h: No such file or directory #include ^ compilation terminated.
# apt-get install libsnmp-dev The following NEW packages will be installed: libpci-dev libsensors4-dev libsnmp-dev libudev-dev libwrap0-dev
Then make gets a bit further.
2017-12-04 15:45:17 - SPINE: Poller[1] Device[DGS-1248] SNMP Ping Error: Unknown error: 2.
How to debug that?
If I change poller to PHP everything is allright.
It seems that there is a problem when the snmp_sysLocation of an host contains a single quote.
This morning an host that have this kind of configuration went down and now I continue to see this kind of error in the cacti.log:
2017-05-22 14:55:05 - SPINE: Poller[1] ERROR: SQL Failed! Error:'1064', Message:'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'text with a single quote inside' WHERE id='406'' at line 1', SQL Fragment:'UPDATE host SET status='3', status_event_count='1', status_fail_date='2017-05-22 14:55', status_rec_date='2017-05-19 01:19:00', status_last_error='Device did not respond to SNMP', min_time='3.924130', max_time='1506.493090', cur_time='9.284020', avg_time='6.096100', total_polls='985151', failed_polls='2891', availability='99.7065', snmp_sysDescr='sysdescr', snmp_sysObjectID='SNMPv2-SMI::enterprises.14988.1', snmp_sysUpTimeInstance='3507705100', snmp_sysContact='contact', snmp_sysName='sysname', snmp_sysLocation='text with a single quote inside' WHERE id='406''
Cacti version: 1.1.7
Spine stopped working after updating to latest version:
[cacti@cacti ~]$ /opt/cacti-spine/bin/spine -C /opt/cacti-spine/etc/spine.conf --poller 1 --hostlist=11 --mibs -V 5
SPINE: Using spine config file [/opt/cacti-spine/etc/spine.conf]
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The path_php_server variable is /opt/cacti/script_server.php
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The path_cactilog variable is /opt/cacti/log/cacti.log
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The log_destination variable is 1 (FILE)
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The path_php variable is /bin/php
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The availability_method variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The ping_recovery_count variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The ping_failure_count variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The ping_method variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The ping_retries variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The ping_timeout variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The snmp_retries variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The log_perror variable is 1
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The log_pwarn variable is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The boost_redirect variable is 1
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The log_pstats variable is 1
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The threads variable is 20
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The polling interval is 300 seconds
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The number of concurrent processes is 1
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The script timeout is 25
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The selective_device_debug variable is 175
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The spine_log_level variable is 1
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The number of php script servers to run is 10
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: Device List to be polled='11', TotalPHPScripts='0'
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The PHP Script Server is Not Required
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The Maximum SNMP OID Get Size is 10
2017-03-28 20:54:55 - SPINE: Poller[1] Selective Debug Devices 175
2017-03-28 20:54:55 - SPINE: Poller[1] Version 1.1.1 starting
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: MySQL is Thread Safe!
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: Capability CAP_NET_RAW is set.
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: Spine has cap_net_raw capability.
2017-03-28 20:54:55 - SPINE: Poller[1] SPINE: Initializing Net-SNMP API
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: Issues with SNMP Header Version information, assuming old version of Net-SNMP.
2017-03-28 20:54:55 - SPINE: Poller[1] SPINE: Initializing PHP Script Server(s)
2017-03-28 20:54:55 - SPINE: Poller[1] NOTE: Spine will support multithread device polling.
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: Initial Value of Active Threads is 0
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: Valid Thread to be Created
2017-03-28 20:54:55 - SPINE: Poller[1] DEBUG: The Value of Active Threads is 1
And just hangs on that before the 5 minutes timeout.
gdb backtrace on hanging process:
(gdb) bt
#0 0x00007facf40ae9b1 in do_futex_wait () from /lib64/libpthread.so.0
#1 0x00007facf40aea77 in __new_sem_wait_slow () from /lib64/libpthread.so.0
#2 0x00007facf40aeb15 in sem_timedwait () from /lib64/libpthread.so.0
#3 0x000000000040406e in main (argc=<optimized out>, argv=0x7fff1cd3c790) at spine.c:764
After Spine updated 1.1.30 - 1.1.31
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 2 in file: /var/www/html/cacti/scripts/Cisco_WLC_Power_Level.php on line: 16
19-Jan-2018 08:29:26 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Power_Level.php: 15 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 1 in file: /var/www/html/cacti/scripts/Cisco_WLC_Power_Level.php on line: 15
19-Jan-2018 08:29:26 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Power_Level.php: 16 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 2 in file: /var/www/html/cacti/scripts/Cisco_WLC_Power_Level.php on line: 16
19-Jan-2018 08:29:26 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Power_Level.php: 15 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 1 in file: /var/www/html/cacti/scripts/Cisco_WLC_Power_Level.php on line: 15
19-Jan-2018 08:29:26 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Station_Policy.php: 18 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 3 in file: /var/www/html/cacti/scripts/Cisco_WLC_Station_Policy.php on line: 18
19-Jan-2018 08:29:26 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Station_Policy.php: 17 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 2 in file: /var/www/html/cacti/scripts/Cisco_WLC_Station_Policy.php on line: 17
19-Jan-2018 08:29:26 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Station_Policy.php: 16 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 08:29:26 - ERROR PHP NOTICE: Undefined offset: 1 in file: /var/www/html/cacti/scripts/Cisco_WLC_Station_Policy.php on line: 16
19-Jan-2018 09:31:03 - ERROR PHP NOTICE: Undefined offset: 3 in file: /var/www/html/cacti/scripts/Cisco_WLC_Station_Policy.php on line: 18
19-Jan-2018 09:31:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Station_Policy.php: 17 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 09:31:03 - ERROR PHP NOTICE: Undefined offset: 2 in file: /var/www/html/cacti/scripts/Cisco_WLC_Station_Policy.php on line: 17
19-Jan-2018 09:31:03 - CMDPHP PHP ERROR NOTICE Backtrace: (/scripts/Cisco_WLC_Station_Policy.php: 16 CactiErrorHandler)(/lib/functions.php: 4480 cacti_debug_backtrace)
19-Jan-2018 09:31:03 - ERROR PHP NOTICE: Undefined offset: 1 in file: /var/www/html/cacti/scripts/Cisco_WLC_Station_Policy.php on line: 16
19-Jan-2018 09:31:03 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler)(/lib/functions.php: 4518 cacti_debug_backtrace)
thrown in file: /var/www/html/cacti/scripts/ss_net_snmp_disk_bytes.php on line: 23
#1 {main}
#0 /var/www/html/cacti/script_server.php(221): ss_net_snmp_disk_bytes()
Stack trace:
19-Jan-2018 09:31:03 - ERROR PHP ERROR: Uncaught ArgumentCountError: Too few arguments to function ss_net_snmp_disk_bytes(), 0 passed in /var/www/html/cacti/script_server.php on line 221 and exactly 1 expected in /var/www/html/cacti/scripts/ss_net_snmp_disk_bytes.php:23
2017-12-03 12:40:12 - SPINE: Poller[1] WARNING: Invalid Response, Device[402] TH[1] DS[4759] SCRIPT: perl /var/www/html/cacti/scripts/ping.pl '172.20.200.8', output: U
2017-12-03 12:40:16 - SPINE: Poller[1] WARNING: Invalid Response, Device[453] TH[1] DS[5121] SCRIPT: perl /var/www/html/cacti/scripts/ping.pl '10.10.20.6', output: U
Does Spine know how to deal with "U" ?
I've done some testing with cacti/spine 1.1.16 and it looks like Cacti no longer uses the "udp6:" (or other) prefix for IPv6 addresses (either when using the IP in [] or a hostname that will only resolve to a AAAA record). However, spine seems to require it.
This leads to confusion in the "Management" - "Devices" entries because any entry with "udp6:" as a prefix will generate an SNMP Error under device information. But, if I don't include the udp6: and use Spine as a poller, no data is collected.
If I change the poller to cmd.php and exclude the udp6: prefix, Cacti collects data and behaves as expected.
discussion on the cacti forum - http://forums.cacti.net/viewtopic.php?f=2&t=57563
libtool: link: gcc -I/usr/include/mysql -g -O2 -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -L/usr/lib64 -lssl -lmysqlclient -lcrypto -lz -lpthread -lm
/usr/bin/ld: cannot find -lmysqlclient
but, all dependenses has been installed:
Cacti 1.1.9
Spine 1.1.8
CentOS 7
net-snmp
mariadb-libs-5.5.52-1.el7.x86_64 is obsoleted by MariaDB-compat-10.2.6-1.el7.centos.x86_64 which is already installed
MariaDB-common-10.2.6-1.el7.centos.x86_64
MariaDB-client-10.2.6-1.el7.centos.x86_64
MariaDB-shared-10.2.6-1.el7.centos.x86_64
MariaDB-server-10.2.6-1.el7.centos.x86_64
MariaDB-compat-10.2.6-1.el7.centos.x86_64
MariaDB-devel-10.2.6-1.el7.centos.x86_64
If the SQL-machine is running remotely spine uses TCP, but if it runs locally cacti uses socket-connection.
I need for our setup to be able to run spine against a local TCP-port for sql, and not try to connect to the unix_socket.
Could you please add this as an option to spine.conf?
Trying to compile cacti-spine-1.1.16:
cd /tmp
tar xvzf cacti-spine-1.1.16.tar.gz
cd cacti-spine-1.1.16
CFLAGS="-I/usr/include/mariadb -I/usr/include/net-snmp" ./configure
Makefile
LIBS = -lmysqlclient -lcrypto -lz -lpthread -lm
with LIBS = -lmariadbclient -lcrypto -lz -lpthread -lm
CFLAGS = -I/usr/include/mysql -I/usr/include/mariadb -I/usr/include/net-snmp -g -O2
with CFLAGS = -I/usr/include/mariadb -I/usr/include/net-snmp -g -O2
make
failes with tons of messages like this snmp.c:(.text+0x1c): undefined reference to 'netsnmp_ds_set_boolean'
Output of ./configure
:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking whether ln -s works... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to enable -Wall... no
checking for help2man... false // No help2man //
checking for help2man... false // No help2man //
./configure: line 12242: test: too many arguments
checking for threadsafe gethostbyname()... no
checking for gethostbyname_r in -lnls... no
checking for socket in -lsocket... no
checking for floor in -lm... yes
checking for pthread_exit in -lpthread... yes
checking for deflate in -lz... yes
checking for kstat_close in -lkstat... no
checking for CRYPTO_realloc in -lcrypto... yes
checking for ANSI C header files... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for signal.h... (cached) yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking for netinet/ip_icmp.h... yes
checking for unsigned long long... yes
checking for long long... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for malloc... yes
checking for calloc... yes
checking for gettimeofday... yes
checking for strerror... yes
checking for strtoll... yes
checking priv.h usability... no
checking priv.h presence... no
checking for priv.h... no
checking whether we are using Solaris privileges... no
checking sys/capability.h usability... no
checking sys/capability.h presence... no
checking for sys/capability.h... no
checking whether we are using Linux Capabilities... no
checking if Net-SNMP needs crypto support... yes
checking for snmp_timeout in -lnetsnmp... no
checking for the spine results buffer size... 1024 bytes
checking for the maximum simultaneous spine scripts... 20
checking for the maximum MySQL buffer size... 65536
checking whether we are using traditional popen... no
checking whether to verify net-snmp library vs header versions... no
checking for glibc gethostbyname_r... no
checking for Solaris/Irix gethostbyname_r... no
checking for HP-UX gethostbyname_r... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
Output of make
:
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
mv -f .deps/spine.Tpo .deps/spine.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT snmp.o -MD -MP -MF .deps/snmp.Tpo -c -o snmp.o snmp.c
mv -f .deps/snmp.Tpo .deps/snmp.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT locks.o -MD -MP -MF .deps/locks.Tpo -c -o locks.o locks.c
mv -f .deps/locks.Tpo .deps/locks.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT poller.o -MD -MP -MF .deps/poller.Tpo -c -o poller.o poller.c
mv -f .deps/poller.Tpo .deps/poller.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT nft_popen.o -MD -MP -MF .deps/nft_popen.Tpo -c -o nft_popen.o nft_popen.c
mv -f .deps/nft_popen.Tpo .deps/nft_popen.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT php.o -MD -MP -MF .deps/php.Tpo -c -o php.o php.c
mv -f .deps/php.Tpo .deps/php.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT ping.o -MD -MP -MF .deps/ping.Tpo -c -o ping.o ping.c
mv -f .deps/ping.Tpo .deps/ping.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT keywords.o -MD -MP -MF .deps/keywords.Tpo -c -o keywords.o keywords.c
mv -f .deps/keywords.Tpo .deps/keywords.Po
gcc -DHAVE_CONFIG_H -I. -I./config -I/usr/include/mariadb -I/usr/include/net-snmp -MT error.o -MD -MP -MF .deps/error.Tpo -c -o error.o error.c
mv -f .deps/error.Tpo .deps/error.Po
/bin/sh ./libtool --tag=CC --mode=link gcc -I/usr/include/mariadb -I/usr/include/net-snmp -lpthread -lssl -lm -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lmariadbclient -lcrypto -lz -lpthread -lm
libtool: link: gcc -I/usr/include/mariadb -I/usr/include/net-snmp -o spine sql.o spine.o util.o snmp.o locks.o poller.o nft_popen.o php.o ping.o keywords.o error.o -lssl -lmariadbclient -lcrypto -lz -lpthread -lm
snmp.o: In function `snmp_spine_init':
snmp.c:(.text+0x1c): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x2d): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x3e): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x4f): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x60): undefined reference to `netsnmp_ds_set_boolean'
snmp.o:snmp.c:(.text+0x71): more undefined references to `netsnmp_ds_set_boolean' follow
snmp.o: In function `snmp_spine_init':
snmp.c:(.text+0xcb): undefined reference to `init_snmp'
snmp.o: In function `snmp_spine_close':
snmp.c:(.text+0xf6): undefined reference to `snmp_shutdown'
snmp.o: In function `snmp_host_init':
snmp.c:(.text+0x12b): undefined reference to `snmp_sess_init'
snmp.c:(.text+0x16d): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x17e): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x18f): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x1a0): undefined reference to `netsnmp_ds_set_boolean'
snmp.c:(.text+0x1b1): undefined reference to `netsnmp_ds_set_boolean'
snmp.o:snmp.c:(.text+0x1c2): more undefined references to `netsnmp_ds_set_boolean' follow
snmp.o: In function `snmp_host_init':
snmp.c:(.text+0x3de): undefined reference to `usmHMACMD5AuthProtocol'
snmp.c:(.text+0x3e4): undefined reference to `snmp_duplicate_objid'
snmp.c:(.text+0x404): undefined reference to `usmHMACSHA1AuthProtocol'
snmp.c:(.text+0x40a): undefined reference to `snmp_duplicate_objid'
snmp.c:(.text+0x461): undefined reference to `generate_Ku'
snmp.c:(.text+0x4a8): undefined reference to `usmNoPrivProtocol'
snmp.c:(.text+0x4ae): undefined reference to `snmp_duplicate_objid'
snmp.c:(.text+0x4f2): undefined reference to `usmDESPrivProtocol'
snmp.c:(.text+0x4f8): undefined reference to `snmp_duplicate_objid'
snmp.c:(.text+0x520): undefined reference to `usmAESPrivProtocol'
snmp.c:(.text+0x526): undefined reference to `snmp_duplicate_objid'
snmp.c:(.text+0x585): undefined reference to `generate_Ku'
snmp.c:(.text+0x5ba): undefined reference to `snmp_sess_open'
snmp.o: In function `snmp_host_cleanup':
snmp.c:(.text+0x653): undefined reference to `snmp_sess_close'
snmp.o: In function `snmp_get':
snmp.c:(.text+0x6e7): undefined reference to `snmp_pdu_create'
snmp.c:(.text+0x703): undefined reference to `snmp_parse_oid'
snmp.c:(.text+0x752): undefined reference to `snmp_add_null_var'
snmp.c:(.text+0x76e): undefined reference to `snmp_sess_synch_response'
snmp.c:(.text+0x833): undefined reference to `snmp_free_pdu'
snmp.o: In function `snmp_getnext':
snmp.c:(.text+0x8fb): undefined reference to `snmp_pdu_create'
snmp.c:(.text+0x917): undefined reference to `snmp_parse_oid'
snmp.c:(.text+0x966): undefined reference to `snmp_add_null_var'
snmp.c:(.text+0x982): undefined reference to `snmp_sess_synch_response'
snmp.c:(.text+0xa78): undefined reference to `snmp_free_pdu'
snmp.o: In function `snmp_count':
snmp.c:(.text+0xb8c): undefined reference to `snmp_parse_oid'
snmp.c:(.text+0xbf2): undefined reference to `snmp_pdu_create'
snmp.c:(.text+0xc0d): undefined reference to `snmp_add_null_var'
snmp.c:(.text+0xc29): undefined reference to `snmp_sess_synch_response'
snmp.c:(.text+0xcec): undefined reference to `snmp_oid_compare'
snmp.c:(.text+0xdcf): undefined reference to `snmp_free_pdu'
snmp.o: In function `snmp_snprint_value':
snmp.c:(.text+0xe64): undefined reference to `sprint_realloc_by_type'
snmp.o: In function `snmp_get_multi':
snmp.c:(.text+0xf0d): undefined reference to `snmp_pdu_create'
snmp.c:(.text+0xf54): undefined reference to `snmp_parse_oid'
snmp.c:(.text+0xfca): undefined reference to `snmp_add_null_var'
snmp.c:(.text+0x1004): undefined reference to `snmp_sess_synch_response'
snmp.c:(.text+0x11e1): undefined reference to `snmp_fix_pdu'
snmp.c:(.text+0x11f3): undefined reference to `snmp_free_pdu'
snmp.c:(.text+0x1274): undefined reference to `snmp_free_pdu'
ping.o: In function `ping_snmp':
ping.c:(.text+0x55a): undefined reference to `snmp_api_errstring'
ping.c:(.text+0x59d): undefined reference to `snmp_api_errstring'
collect2: error: ld returned 1 exit status
Makefile:465: recipe for target 'spine' failed
make: *** [spine] Error 1
Versions
net-snmp
ii libsnmp-dev 5.7.3+dfsg-1.7 i386 SNMP (Simple Network Management Protocol) development files
Files present in /etc/include/net-snmp
:
ls -l /usr/include/net-snmp/
total 192
drwxr-xr-x 3 root root 12288 Mar 5 14:57 agent
-rw-r--r-- 1 root root 4043 Jan 24 2017 config_api.h
-rw-r--r-- 1 root root 947 Jan 24 2017 definitions.h
drwxr-xr-x 2 root root 12288 Mar 5 14:57 library
drwxr-xr-x 2 root root 4096 Mar 5 14:57 machine
-rw-r--r-- 1 root root 3476 Jan 24 2017 mib_api.h
-rw-r--r-- 1 root root 76978 Jan 24 2017 net-snmp-config.h
-rw-r--r-- 1 root root 927 Jan 24 2017 net-snmp-features.h
-rw-r--r-- 1 root root 1575 Jan 24 2017 net-snmp-includes.h
-rw-r--r-- 1 root root 5539 Jan 24 2017 output_api.h
-rw-r--r-- 1 root root 1280 Jan 24 2017 pdu_api.h
-rw-r--r-- 1 root root 11204 Jan 24 2017 session_api.h
-rw-r--r-- 1 root root 1178 Jan 24 2017 snmpv3_api.h
drwxr-xr-x 2 root root 4096 Mar 5 14:57 system
-rw-r--r-- 1 root root 12342 Jan 24 2017 types.h
-rw-r--r-- 1 root root 3318 Dec 8 2014 util_funcs.h
-rw-r--r-- 1 root root 2036 Jan 24 2017 utilities.h
-rw-r--r-- 1 root root 4159 Jan 24 2017 varbind_api.h
-rw-r--r-- 1 root root 329 Jan 24 2017 version.h
I was compiling a pre 1.0 version without issue but just tried to compile 1.0.4 and it exited status 1 with the error "No help2man." I installed help2man from Yum and compiling worked again.
Should the help2man requirement be documented somewhere? There are a number of threads where people are seeing the same issue, yet the install page says nothing about it.
This behavior is different from cmd.php and spine 0.8.x. and also not logical.
Background: the Device SNMP information are set because they are correct for this device, but at the moment SNMP and PING is blocked by an other device in the network path and only HTTP access is possible, which is queried via PHP Script Server.
Proposed solution to restore previous behavior:
poller.c (Version 1.1.34) Line 544: if (host->availability_method != AVAIL_PING) {
needs to be changed to:
if ((host->availability_method != AVAIL_PING) && (host->availability_method != AVAIL_NONE)) {
so that get_system_information is not called, which is setting ignore_host to TRUE (in snmp.c line: 379) if the device does not respond to SNMP requests.
Remark: this issue is moved from the cacti repo to the spine repo: Cacti/cacti#1324
Best regards,
Franz
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.