AIX Open Source

 View Only
Expand all | Collapse all

Filebeat on AIX 7.2

  • 1.  Filebeat on AIX 7.2

    Posted Thu July 09, 2020 10:37 PM
    I downloaded the filebeat 7.5.2-1 rpm today and installed it on an LPAR running 7200-04-01-1939.

    I am trying to start it and could not get it to start

    $ ./filebeat
    Illegal instruction(coredump)

    $ ./filebeat start
    Illegal instruction(coredump)

    $ ./filebeat -e

    I can see two filbeat files, /opt/freeware/bin/filebeat which is a shell script & the other is /opt/freeware/share/filebeat/bin/filebeat

    Also, when I had installed the older version of filebeat (filebeat-5.5.1-1.aix7.2.ppc.rpm) it had prompted me to install libgcc and libgo as dependencies, but this version did not have a dependency on either libgo or libgcc

    I also installed libgo-8.3.0-2.aix7.2.ppc.rpm & libgcc-8.3.0-2.aix7.2.ppc.rpm, but looks like they are not required or not used

    Can one of you tell me the correct way to start it.

    ------------------------------
    Anand. S
    ------------------------------


  • 2.  RE: Filebeat on AIX 7.2

    Posted Fri July 10, 2020 01:55 AM
    Which version of power processor you are running ?
    /opt/freeware/bin/filebeat shell scripts which executes the binary /opt/freeware/share/filebeat/bin/filebeat with some default settings.
    7.5.2 doesn't have any dependency on libgcc or libgo and we don't have older version-5.5.1 in our AIX Toolbox.

    # rpm -qR filebeat
    /usr/bin/env
    config(filebeat) = 7.5.2-1
    libc.a(shr_64.o)
    libperfstat.a(shr_64.o)
    libpthreads.a(shr_xpg5_64.o)
    rpmlib(CompressedFileNames) <= 3.0.4-1
    rpmlib(PayloadFilesHavePrefix) <= 4.0-1


    ------------------------------
    SANGAMESH
    ------------------------------



  • 3.  RE: Filebeat on AIX 7.2

    Posted Fri July 10, 2020 02:15 AM
    Good catch @SANGAMESH MALLAYYA. Thank you

    This LPAR was running on a Power 7 Frame and was recently LPM'd to Power 8. But the profile was still set to Power 7 instead of default. Looks like that was the problem​. I modified the profile and booted it up and it now works.. Thank you

    ------------------------------
    Anand Sivasubramanian
    ------------------------------



  • 4.  RE: Filebeat on AIX 7.2

    Posted Fri July 10, 2020 02:41 AM
    Just curious, can you say why we don't need the libgo rpm for filebeat anylonger

    ------------------------------
    Anand Sivasubramanian
    ------------------------------



  • 5.  RE: Filebeat on AIX 7.2

    Posted Fri July 10, 2020 02:50 AM
    The new beats software in AIX Toolbox is built using golang where there is no dynamic linking . So no need for any libraries. 
    The older filebeat rpm ( actually part of kubernetes bundle ) is built using gcc-go where it is dynamically linked to gcc libgo shared library.

    ------------------------------
    Ayappan P
    ------------------------------



  • 6.  RE: Filebeat on AIX 7.2

    Posted Fri July 10, 2020 12:54 PM
    Edited by Anand Sivasubramanian Fri July 10, 2020 12:54 PM
    Makes sense.. Thank you

    ------------------------------
    Anand Sivasubramanian
    ------------------------------



  • 7.  RE: Filebeat on AIX 7.2

    Posted Sun July 19, 2020 12:24 PM
    Is filebeat 7.5.2 from AIX linux toobox supported on AIX 7.2 POWER7 systems?

    ------------------------------
    Suresh Velupula
    ------------------------------



  • 8.  RE: Filebeat on AIX 7.2

    Posted Sun July 19, 2020 12:34 PM
    Hi Suresh,

    filebeat 7.5.2 on AIX linux toolbox is built using golang on AIX. 
    golang on AIX is supported only on AIX 7.2 and Power8 or higher processor.
    Hence filebeat 7.5.2 from AIX linux toolbox will not work on Power7 or older hardware.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 9.  RE: Filebeat on AIX 7.2

    Posted Wed March 31, 2021 12:34 PM
    Hello,

    The filebeat-7.5.2-1.aix7.2.ppc.rpm works fine on our AIX 7.2-TL3-SP2 systems but we stil have several hundreds of AIX 7.1 VM and the Linux Toolbox for AIX does not contain the AIX 7.1 filebeat RPM.

    In despite I installed the RPM filebeat-7.5.2-1.aix7.2.ppc.rpm on an AIX 7.1-TL5-SP3 (on Power8) with the --ignoreos option. 
    When I launch the binary I see a SIGSEGV signal (see below).

    Any solution or any plans to provide filebeat in version AIX 7.1 ?

    Thanks
    Pierre

    fatal error: unexpected signal during runtime execution
    [signal SIGSEGV: segmentation violation code=0x33 addr=0x100000019 pc=0x10006873c]
     
    runtime stack:
    runtime.throw(0x101119445, 0x2a)
            /opt/freeware/lib/golang/src/runtime/panic.go:774 +0x68
    runtime.sigpanic()
            /opt/freeware/lib/golang/src/runtime/signal_unix.go:378 +0x498
    asmsyscall6(0xa00000001122228, 0xa0001000016d9c8, 0x100039810, 0x4c0, 0xa00010000000180, 0xa00010000000180, 0x100065684, 0x0, 0x100067d50, 0x0, ...)
            /opt/freeware/lib/golang/src/runtime/sys_aix_ppc64.s:57 +0x3c
    runtime.asmcgocall(0xbadc0ffee0ddf00d, 0x111353db0)
            /opt/freeware/lib/golang/src/runtime/asm_ppc64x.s:633 +0x88
     
    goroutine 1 [syscall, locked to thread]:
    runtime.syscall_syscall6(0x11134b4c0, 0x3, 0x1, 0x5401, 0xa0001000016dc90, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
            /opt/freeware/lib/golang/src/runtime/syscall_aix.go:91 +0x4c fp=0xa0001000016dbc8 sp=0xa0001000016db60 pc=0x10005651c
    github.com/elastic/beats/vendor/golang.org/x/sys/unix.callioctl(...)
           /opt/freeware/src/packages/BUILD/beats-7.5.2/src/github.com/elastic/beats/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go:420
    github.com/elastic/beats/vendor/golang.org/x/sys/unix.ioctl(0x1, 0x5401, 0xa0001000016dc90, 0x1110f1f40, 0x1010d9034)
            /opt/freeware/src/packages/BUILD/beats-7.5.2/src/github.com/elastic/beats/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go:96 +0x64 fp=0xa0001000016dc48 sp=0xa0001000016dbc8 pc=0x100232dc4
    github.com/elastic/beats/vendor/golang.org/x/sys/unix.IoctlGetTermios(...)
            /opt/freeware/src/packages/BUILD/beats-7.5.2/src/github.com/elastic/beats/vendor/golang.org/x/sys/unix/syscall_aix.go:392
    github.com/elastic/beats/vendor/github.com/mattn/go-isatty.IsTerminal(0x1, 0x1)
            /opt/freeware/src/packages/BUILD/beats-7.5.2/src/github.com/elastic/beats/vendor/github.com/mattn/go-isatty/isatty_tcgets.go:11 +0x4c fp=0xa0001000016dcb0 sp=0xa0001000016dc48 pc=0x10043374c
    github.com/elastic/beats/vendor/github.com/fatih/color.init()
            /opt/freeware/src/packages/BUILD/beats-7.5.2/src/github.com/elastic/beats/vendor/github.com/fatih/color/color.go:21 +0x134 fp=0xa0001000016dcf0 sp=0xa0001000016dcb0 pc=0x1004353d4
    runtime.doInit(0x1110f2a80)
            /opt/freeware/lib/golang/src/runtime/proc.go:5222 +0xc4 fp=0xa0001000016dd38 sp=0xa0001000016dcf0 pc=0x1000448c4
    runtime.doInit(0x1110f1d60)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016dd80 sp=0xa0001000016dd38 pc=0x10004486c
    runtime.doInit(0x1110f7880)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016ddc8 sp=0xa0001000016dd80 pc=0x10004486c
    runtime.doInit(0x1110fb960)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016de10 sp=0xa0001000016ddc8 pc=0x10004486c
    runtime.doInit(0x111105da0)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016de58 sp=0xa0001000016de10 pc=0x10004486c
    runtime.doInit(0x1110fb300)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016dea0 sp=0xa0001000016de58 pc=0x10004486c
    runtime.doInit(0x1110fb240)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016dee8 sp=0xa0001000016dea0 pc=0x10004486c
    runtime.doInit(0x1110eae80)
            /opt/freeware/lib/golang/src/runtime/proc.go:5217 +0x6c fp=0xa0001000016df30 sp=0xa0001000016dee8 pc=0x10004486c
    runtime.main()
            /opt/freeware/lib/golang/src/runtime/proc.go:190 +0x240 fp=0xa0001000016dfc0 sp=0xa0001000016df30 pc=0x1000365d0
    runtime.goexit()
            /opt/freeware/lib/golang/src/runtime/asm_ppc64x.s:884 +0x4 fp=0xa0001000016dfc0 sp=0xa0001000016dfc0 pc=0x100067ff4






    ------------------------------
    Pierre BERNHARD
    ------------------------------



  • 10.  RE: Filebeat on AIX 7.2

    Posted Thu April 01, 2021 09:50 AM
    Hi Pierre,

    Filebeat is a software written in go and we have golang compiler only available for AIX 7.2

    golang needs some features those were not available on AIX 7.1 and AIX 6.1 and hence we could not port golang for AIX 7.1/6.1

    Now when we compile any pakcage on AIX 7.2 (as golang is only available on AIX 7.2) it can not work on older release of AIX.

    Hence AIX 7.2 filebeat does not work on AIX 7.1

    As golang is not available on AIX7.1 we can not port/compile filebeat for AIX 7.1.



    ------------------------------
    SANKET RATHI
    ------------------------------



  • 11.  RE: Filebeat on AIX 7.2

    Posted Thu November 04, 2021 04:27 PM
    Can u tell me how to stop filebeat in aix 7.2 ?

    ------------------------------
    SUDIP ADHIKARI
    ------------------------------



  • 12.  RE: Filebeat on AIX 7.2

    IBM Champion
    Posted Fri November 05, 2021 04:12 AM
    Edited by Joerg Kauke Fri November 05, 2021 04:16 AM

    Hi,

    if filebeat running as system process, just kill the process.
    For us I wrote following very simple start-stop script and linked it to /etc/rc.d/rc2.d to start and stop it automatically on all our systems.

    #!/usr/bin/ksh

    NAME="filebeat"
    FILEBEAT_HOME="/opt/freeware"
    PID_DIR="/var/run/filebeat"
    PIDFILE="$PID_DIR/$NAME.pid"

    function filebeat_pid {
        cat $PIDFILE 2> /dev/null
    }

    function p_start {
      # Start filebeat
      echo "\nStarting Filebeat\n"
      [ -d $PID_DIR ] || mkdir -p "$PID_DIR"
      cd $FILEBEAT_HOME/bin && $FILEBEAT_HOME/bin/filebeat run > /dev/null 2>&1 &
      echo $! > $PIDFILE
      return 0
    }

    function p_stop {
      pid=$(filebeat_pid)
      echo "\nShutting down Filebeat\n"
      kill -9 $pid
      rm -f $PIDFILE
      return 0
    }

    case $1 in
        start)
            p_start
            ;;
        stop)
            p_stop
            ;;
        restart)
            p_stop
            p_start
            ;;
        status)
           pid=$(filebeat_pid)
            if [ -n "$pid" ]
            then
               echo "\nMetricbeat is running with pid: $pid\n"
            else
               echo "\nMetricbeat is not running\n"
            fi
            ;;
        *)
            echo "\nUsage: $NAME {start|stop|restart|status}\n"
    esac

    exit 0

    It is not the best solution, but it works...

    If anyone has a different solution, I would like to hear about it...


    ------------------------------
    Joerg Kauke
    Unix Administrator
    COOP Switzerland
    ------------------------------



  • 13.  RE: Filebeat on AIX 7.2

    Posted Fri November 05, 2021 04:33 PM
    Thanks

    ------------------------------
    SUDIP ADHIKARI
    ------------------------------



  • 14.  RE: Filebeat on AIX 7.2

    Posted Thu December 09, 2021 07:32 AM
    hi , 

    i am trying to install the AIX toolbox filebeat-7.5.2-1.aix7.2.ppc.rpm into AIX 7.2 TL5 SP2.
    when start filebeat, i am hitting coredump. i am able to run filebeat-5.5.1-1.aix7.2.ppc.rpm.with-deps without issue starting.
    Is there anything that i miss out? thank you very much in advance.   


    $ /opt/freeware/share/filebeat/bin/filebeat

    Segmentation fault(coredump)


    try to read the core with dbx. 

    $ dbx /opt/freeware/share/filebeat/bin/filebeat core
    Type 'help' for help.
    [using memory image in core]
    reading symbolic information ...
    warning: Undefined attribute 0x2905

    Segmentation fault(coredump)

    ------------------------------
    ck bok
    ------------------------------



  • 15.  RE: Filebeat on AIX 7.2

    Posted Thu December 09, 2021 07:58 AM

    Is the machine is running in POWER 8 mode ?

    filebeat 7.5.2 on AIX linux toolbox is built using golang on AIX. 
    golang on AIX is supported only on AIX 7.2 and Power8 or higher processor.
    Hence filebeat 7.5.2 from AIX linux toolbox will not work on Power7 or older hardware.



    ------------------------------
    Ayappan P
    ------------------------------



  • 16.  RE: Filebeat on AIX 7.2

    Posted Thu December 09, 2021 08:08 PM
    hi ayappan,

    thanks for your reply. the machine is running on power 9 with AIX 7.2. 

    ------------------------------
    ck bok
    ------------------------------



  • 17.  RE: Filebeat on AIX 7.2

    Posted Fri December 10, 2021 02:34 AM
    Please share the prtconf output.

    ------------------------------
    Ayappan P
    ------------------------------



  • 18.  RE: Filebeat on AIX 7.2

    Posted Fri December 10, 2021 03:04 AM
    Edited by ck bok Fri December 10, 2021 03:06 AM
    hi ayappan,

    output as below. thanks for your kind assistant. 

    $ prtconf
    System Model: IBM,9009-22G
    Machine Serial Number: 78DD5B0
    Processor Type: PowerPC_POWER9
    Processor Implementation Mode: POWER 9
    Processor Version: PV_9_Compat
    Number Of Processors: 1
    Processor Clock Speed: 3000 MHz
    CPU Type: 64-bit
    Kernel Type: 64-bit
    LPAR Info: 4 DEV WMB
    Memory Size: 40960 MB
    Good Memory Size: 40960 MB
    Platform Firmware level: VL950_087
    Firmware Version: IBM,FW950.20 (VL950_087)
    Console Login: enable
    Auto Restart: true
    Full Core: false
    NX Crypto Acceleration: Capable and Enabled
    In-Core Crypto Acceleration: Capable, but not Enabled

    Paging Space Information
    Total Paging Space: 32768MB
    Percent Used: 0%

    Volume Groups Information
    ==============================================================================
    Active VGs
    ==============================================================================
    datavg:
    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk2 active 2599 518 00..00..00..00..518
    ==============================================================================

    rootvg:
    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk0 active 528 204 13..00..00..85..106
    hdisk1 active 528 180 05..00..00..69..106
    ==============================================================================

    INSTALLED RESOURCE LIST

    The following resources are installed on the machine.
    +/- = Added or deleted from Resource List.
    * = Diagnostic support not available.

    Model Architecture: chrp
    Model Implementation: Multiple Processor, PCI bus

    + sys0 System Object
    + sysplanar0 System Planar
    * vio0 Virtual I/O Bus
    * vsa0 U9009.22G.78DD5B0-V4-C0 LPAR Virtual Serial Adapter
    * vty0 U9009.22G.78DD5B0-V4-C0-L0 Asynchronous Terminal
    * pci3 U78CD.001.FZHBT13-P1 PCI Express Bus
    + fcs0 U78CD.001.FZHBT13-P1-C6-T1 PCIe3 2-Port 16Gb FC Adapter (df1000e21410f103)
    * fscsi0 U78CD.001.FZHBT13-P1-C6-T1 FC SCSI I/O Controller Protocol Device
    * hdisk2 U78CD.001.FZHBT13-P1-C6-T1-W20110002AC00B4BC-L0 MPIO Other FC SCSI Disk Drive
    * sfwcomm0 U78CD.001.FZHBT13-P1-C6-T1-W0-L0 Fibre Channel Storage Framework Comm
    + fcs1 U78CD.001.FZHBT13-P1-C6-T2 PCIe3 2-Port 16Gb FC Adapter (df1000e21410f103)
    * fscsi1 U78CD.001.FZHBT13-P1-C6-T2 FC SCSI I/O Controller Protocol Device
    * sfwcomm1 U78CD.001.FZHBT13-P1-C6-T2-W0-L0 Fibre Channel Storage Framework Comm
    * pci2 U78D3.001.WZS0G3S-P1 PCI Express Bus
    + ent0 U78D3.001.WZS0G3S-P1-C7-T1 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
    + ent1 U78D3.001.WZS0G3S-P1-C7-T2 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
    + ent2 U78D3.001.WZS0G3S-P1-C7-T3 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
    + ent3 U78D3.001.WZS0G3S-P1-C7-T4 4-Port Gigabit Ethernet PCI-Express Adapter (e414571614102004)
    * pci0 U78D3.001.WZS0G3S-P1 PCI Express Bus
    + sissas0 U78D3.001.WZS0G3S-P1-C50 PCIe3 x8 SAS RAID Internal Adapter 6Gb
    * sas0 U78D3.001.WZS0G3S-P1-C50 Controller SAS Protocol
    * sfwcomm2 SAS Storage Framework Comm
    + ses0 U78D3.001.WZS0G3S-P2-Y1 SAS Enclosure Services Device
    + pdisk0 U78D3.001.WZS0G3S-P2-D4 Physical SAS Disk Drive
    + pdisk1 U78D3.001.WZS0G3S-P2-D5 Physical SAS Disk Drive
    * hdisk0 U78D3.001.WZS0G3S-P1-C50-L807996E600-L0 SAS RAID 0 Disk Array
    * hdisk1 U78D3.001.WZS0G3S-P1-C50-L607996E600-L0 SAS RAID 0 Disk Array
    * sata0 U78D3.001.WZS0G3S-P1-C50 Controller SATA Protocol
    + L2cache0 L2 Cache
    + mem0 Memory
    + proc0 Processor

    ------------------------------
    ck bok
    ------------------------------



  • 19.  RE: Filebeat on AIX 7.2

    Posted Fri December 10, 2021 03:56 AM

    I just tried in a AIX 7.2 TL 5 SP2 machine running in Power 9 Mode. And don't see any issue. 

    Can you try invoking "/opt/freeware/bin/filebeat -e" ? It's just a script which in turn invokes the real filebeat binary with some options.

    Also share your filebeat.yml file.

    # cat /opt/freeware/bin/filebeat
    #!/usr/bin/env bash

    # Script to run Filebeat in foreground with the same path settings that
    # the init script / systemd unit file would do.

    exec /opt/freeware/share/filebeat/bin/filebeat \
    -path.home /opt/freeware/share/filebeat \
    -path.config /opt/freeware/etc/filebeat \
    -path.data /opt/freeware/var/lib/filebeat \
    -path.logs /opt/freeware/var/log/filebeat \
    "$@"



    ------------------------------
    Ayappan P
    ------------------------------



  • 20.  RE: Filebeat on AIX 7.2

    Posted Fri December 10, 2021 04:43 AM
    hi,
    looks like no luck. does it mean that bash is not installed in my machine? 

    $ /opt/freeware/bin/filebeat -e
    bash: A file or directory in the path name does not exist.

    $ sh -x /opt/freeware/bin/filebeat
    + exec /opt/freeware/share/filebeat/bin/filebeat -path.home /opt/freeware/share/filebeat -path.config /opt/freew/etc/filebeat -path.data /opt/freeware/var/lib/filebeat -path.logs /opt/freeware/var/log/filebeat

    Segmentation fault(coredump)

    $ /usr/bin/env bash
    bash: A file or directory in the path name does not exist.

    ------------------------------
    ck bok
    ------------------------------



  • 21.  RE: Filebeat on AIX 7.2

    Posted Fri December 10, 2021 05:13 AM

    Provide the below outputs.

    sum /opt/freeware/share/filebeat/bin/filebeat

    oslevel -s

    rpm -qa



    ------------------------------
    Ayappan P
    ------------------------------



  • 22.  RE: Filebeat on AIX 7.2

    Posted Fri December 10, 2021 07:24 AM
    hi,

    please find below. thanks a lot. 

    $ sum /opt/freeware/share/filebeat/bin/filebeat
    46489 138900 /opt/freeware/share/filebeat/bin/filebeat

    $ oslevel -s
    7200-05-02-2114

    $ rpm -qa
    expect-5.42.1-3.ppc
    tk-8.4.7-3.ppc
    libgcc10-10.3.0-6.ppc
    libgcc-10-1.ppc
    libgo8-8.3.0-6.ppc
    df1000e21410f103-00012000040025700030-1.noarch
    AIX-rpm-7.2.5.1-5.ppc
    tcl-8.4.7-3.ppc
    libgo10-10.3.0-6.ppc
    libgo-10-1.ppc
    libgcc8-8.3.0-6.ppc
    pci.1014034a.51-19512b00-1.noarch
    filebeat-7.5.2-1.ppc

    ------------------------------
    ck bok
    ------------------------------



  • 23.  RE: Filebeat on AIX 7.2

    Posted Mon December 13, 2021 08:13 PM
    paste my filebeat.yml file as below.  thanks.

    filebeat.prospectors:
    - type: log
    paths:
    - /IIBHA/brklogs/BRK01/DCP/DCP_FE-BR.log
    fields:
    app.log.origin: dcp_fe-br
    app.log.host: IIB
    fields_under_root: true
    output.logstash:
    hosts: ["10.188.136.26:5044"]

    ------------------------------
    ck bok
    ------------------------------