Problem about function string() on Ubuntu 16.04 LTS

Tags:

#1 Little_Rock

hi,

I am tesing nxlog on Ubuntu 16.04 LTS with the configuration


<Extension fileop>
        Module xm_fileop
</Extension>

<Input udpin>
        Module im_udp
        Host 127.0.0.1
        Port 1514
        Exec $HOSTIP = string(host_ip());
        Exec file_write("/tmp/debug.txt", "HostIP:" + $HOSTIP);
</Input>

<Output udpfile>
        Module om_file
        File "/var/log/udp.log"
</Output>

<Route udp>
    Path udpin => udpfile
</Route>

and  I generated log using linux command nc -u 127.0.0.1 1514 and can not get IP in /tmp/debug.txt.

1. I have reinstall the Ubuntu 16.04 LTS purely and install the deb file from nxlog.co, and it still does not get the IP address 

2. I install the nxlog from source code, and it still does not get the IP address

3. I test the same configuration on CentOS7, CentOS6, Ubuntu 14.04 LTS. It works correctly.

so, is there someting that does not compatible with the Ubuntu 16.04 LTS?

#2 b0ti Nxlog ✓
#1 Little_Rock
hi, I am tesing nxlog on Ubuntu 16.04 LTS with the configuration <Extension fileop>         Module xm_fileop </Extension> <Input udpin>         Module im_udp         Host 127.0.0.1         Port 1514         Exec $HOSTIP = string(host_ip());         Exec file_write("/tmp/debug.txt", "HostIP:" + $HOSTIP); </Input> <Output udpfile>         Module om_file         File "/var/log/udp.log" </Output> <Route udp>     Path udpin => udpfile </Route> and  I generated log using linux command nc -u 127.0.0.1 1514 and can not get IP in /tmp/debug.txt. 1. I have reinstall the Ubuntu 16.04 LTS purely and install the deb file from nxlog.co, and it still does not get the IP address  2. I install the nxlog from source code, and it still does not get the IP address 3. I test the same configuration on CentOS7, CentOS6, Ubuntu 14.04 LTS. It works correctly. so, is there someting that does not compatible with the Ubuntu 16.04 LTS?

Check your DNS and the output of following command:

host `hostname`