Hello everyone.
I am beginner with Graylog/mongodb/Elasticsearch and Rsyslog.
But I try by myself to do good things.
Let me explain my context,
I have 4 Virtual Machine :
Graylog : 192.168.159.163
MongoDB :192.168.159.165
Elasticsearch : 192.168.159.159
Rsyslog : 192.168.159.166
First , I configured my servers to send Logs too Rsyslog :
[root@graylogv2 ~]# vi /etc/rsyslog.conf
*.* @@192.168.159.166:514
Then, the server Rsyslog
[root@rsyslog remotehosts]# vi /etc/rsyslog.conf
# Provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514
$template RemoteLogsTesting,"/var/log/remotehosts/%HOSTNAME%/%$now%.log"
if $fromhost-ip != '127.0.0.1' then -?RemoteLogsTesting
& stop
And that works good :
[root@rsyslog remotehosts]# tree
.
├── elastic
│ ├── 2018-10-01.log
│ ├── 2018-10-02.log
│ └── 2018-10-03.log
├── graylogv2
│ ├── 2018-10-01.log
│ ├── 2018-10-02.log
│ └── 2018-10-03.log
└── mongov2
├── 2018-10-01.log
├── 2018-10-02.log
└── 2018-10-03.log
But now, I want to join Graylog and rsyslog.
This URL works : http://192.168.159.163:9000
I add an imput :
Test_Graylog_1 syslog TCP “Running” on port 1025
But I have an error:
On Rsyslog server I added :
. @@192.168.159.163:1025 on rsyslog.conf
And on Graylog I have :
[root@graylogv2 ~]# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1176/master
tcp 0 0 0.0.0.0:1025 0.0.0.0:* LISTEN 1013/java
tcp 0 0 192.168.159.163:9000 0.0.0.0:* LISTEN 1013/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1008/sshd
I suppose I forget an important thing,
If any one can help me, that can be nice!
Thank you for reading.