[ZBX-25398] "log" key don't works on solaris 11 sparca agent Created: 2024 Oct 15  Updated: 2024 Oct 17  Resolved: 2024 Oct 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 7.0.3
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Pierluigi Assignee: Zabbix Support Team
Resolution: False Positive Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2024-10-15-12-13-11-926.png     File zabbix_agentd.log.debug.gz    

 Description   

Steps to reproduce:

  1. Create an item of type log, as active check towards a solaris agent ( release 11 on sparc at least ) 
  2. write some lines to to log file ( echo "test" >> /tmp/test.log )
  3. wait for results 

Result:

Nothing is returned

Nothing is in the log file ( eventually some config error ), either on server than on agent.
This item works perfectly on a Linux machine.
Also at Debug 4 can't get any info.

Expected:

To get lines written to the file reported to the history of  the item .

 



 Comments   
Comment by Edgar Akhmetshin [ 2024 Oct 16 ]

Provide to the bug report:

  • agent log with DebugLevel=5
  • output from: zabbix_agentd -V
  • exact solaris solaris 11.x

Also check that Active checks are working.

Comment by Alexey Pustovalov [ 2024 Oct 16 ]

Please share Zabbix agent log with DebugLevel = 5.

Comment by Pierluigi [ 2024 Oct 16 ]

Hello, 

solaris version is 11.4.54 ):

root@srvtest19c:~# pkg info entire | grep Version
          Version: 11.4 (Oracle Solaris 11.4.54.138.1)
 
but it also happens on other versions.
root@srvtest19c:~# /opt/zabbix-agent/sbin/zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 7.0.3
Revision d93ce022627 19 August 2024, compilation time: Aug 26 2024 11:30:45
Copyright (C) 2024 Zabbix SIA
License AGPLv3: GNU Affero General Public License version 3 <https://www.gnu.org/licenses/>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 3.0.14 4 Jun 2024
Running with OpenSSL 3.0.14 4 Jun 2024
Attached a debug log lvl5 with restart of agent and during the capture time I've created a new log item and after a while I've deleted it.

Not sure what you mean with "Also check that Active checks are working."

In case, on other platform ( Linux ) they are working ATM.

zabbix_agentd.log.debug.gz

Comment by Pierluigi [ 2024 Oct 16 ]

Just to let you know, I've compiled the 7.0.4 version of agent unser solaris 11 sparc and it seems to work.

I've the created the same exact item on my previous host ( where it was not working ) and with the exact same item it does not works.
Only difference I can see, on thi s newly compiled agent and newly machine there are no passice check, only this log item.

 

Comment by Pierluigi [ 2024 Oct 16 ]

Another note: the agent I have compiled has different linked library:

root@srvtstzbx:~# ldd /usr/local/zabbix/sbin/zabbix_agentd
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libkvm.so.1 =>   /usr/lib/64/libkvm.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libpcre.so.0 =>  /usr/lib/64/libpcre.so.0
        libc.so.1 =>     /lib/64/libc.so.1
        libelf.so.1 =>   /lib/64/libelf.so.1
        libucrypto.so.1 =>       /lib/64/libucrypto.so.1
        libz.so.1 =>     /lib/64/libz.so.1
        libcryptoutil.so.1 =>    /lib/64/libcryptoutil.so.1
        libbsm.so.1 =>   /lib/64/libbsm.so.1
        libtsol.so.2 =>  /lib/64/libtsol.so.2
        libinetutil.so.1 =>      /lib/64/libinetutil.so.1

In this one there is the pcre ( that seems to be quite important in log item IMHO ).

The one d/loaded from zabbix site as p5p has this libraries linked:

root@srvtest19c:~# ldd /opt/zabbix-agent/sbin/zabbix_agentd
        libsocket.so.1 =>        /lib/64/libsocket.so.1
        libnsl.so.1 =>   /lib/64/libnsl.so.1
        libdl.so.1 =>    /lib/64/libdl.so.1
        librt.so.1 =>    /lib/64/librt.so.1
        libpthread.so.1 =>       /lib/64/libpthread.so.1
        libkvm.so.1 =>   /usr/lib/64/libkvm.so.1
        libm.so.2 =>     /lib/64/libm.so.2
        libkstat.so.1 =>         /lib/64/libkstat.so.1
        libresolv.so.2 =>        /lib/64/libresolv.so.2
        libc.so.1 =>     /lib/64/libc.so.1
        libelf.so.1 =>   /lib/64/libelf.so.1
        libucrypto.so.1 =>       /lib/64/libucrypto.so.1
        libz.so.1 =>     /lib/64/libz.so.1
        libcryptoutil.so.1 =>    /lib/64/libcryptoutil.so.1
        libbsm.so.1 =>   /lib/64/libbsm.so.1
        libtsol.so.2 =>  /lib/64/libtsol.so.2
        libinetutil.so.1 =>      /lib/64/libinetutil.so.1

And there is not a pcre linked in.

Could be this the problem ?

In case is needed, here is the configure I've used:

 

./configure \
--prefix=/usr/local/zabbix \
--enable-agent  \
--disable-server \
--disable-proxy \
--with-libpcre-include=/usr/include/pcre/ 

using the pcre from:

 

root@srvtstzbx:~/zabbix-7.0.4# pkg info pcre
          Name: library/pcre
       Summary: Perl-Compatible Regular Expressions
   Description: The PCRE library is a set of functions that implement regular
                expression pattern matching using almost the same syntax and
                semantics as Perl
      Category: Development/C
         State: Installed
     Publisher: solaris
       Version: 8.41
        Branch: 11.4.0.0.1.14.0
Packaging Date: Tue Aug 14 16:49:35 2018
          Size: 2.92 MB
          FMRI: pkg://solaris/library/[email protected]:20180814T164935Z
   Project URL: http://pcre.org/
    Source URL: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.gz
 

The compiler is gcc from:

root@srvtstzbx:~/zabbix-7.0.4# pkg info gcc
             Name: developer/gcc
          Summary: GCC
         Category: Development/C (org.opensolaris.category.2008) Development/C++
                   (org.opensolaris.category.2008) Development/Fortran
                   (org.opensolaris.category.2008) Development/GNU
                   (org.opensolaris.category.2008) Development/Objective C
                   (org.opensolaris.category.2008)
            State: Installed
        Publisher: solaris
          Version: 7.3.0
           Branch: 11.4.0.0.1.14.0
   Packaging Date: Tue Aug 14 16:23:01 2018
Last Install Time: Wed Oct 16 08:40:38 2024
             Size: 2.52 kB
             FMRI: pkg://solaris/developer/[email protected]:20180814T162301Z
      Project URL: [https://gcc.gnu.org/]
       Source URL: [https://ftp.gnu.org/gnu/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz]

all other libraries ( as this BTW ) are from a standard Solaris installation.

Comment by Pierluigi [ 2024 Oct 16 ]

I think I' ve found.

Probably ( need more testing ) the problem is in my configuration: I have 2 host configured for the same IP, but the hostname in the response packet has only the name of one of them, while I had the log item configured on the other one.

I'll keep you informed.

 

Comment by Edgar Akhmetshin [ 2024 Oct 17 ]

I think I' ve found.

Probably ( need more testing ) the problem is in my configuration: I have 2 host configured for the same IP, but the hostname in the response packet has only the name of one of them, while I had the log item configured on the other one.

I'll keep you informed.

Thank you for the details and update.

Comment by Pierluigi [ 2024 Oct 17 ]

It seems to be working whenthe hostname in the agent conf matches the hostname in the server.

Sorry for the noise. 
It can be closed.

 

Thanks for the attention.

 

Pigi_102

Generated at Fri Apr 04 17:44:58 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.