Ubuntu rsyslog custom file log monitoring
I have issue with instead of system Hostname showing network gateway, when adding ubuntu rsyslog custom log file monitoring.( log file created manually ,that content forwared to ubuntu syslog file and taken in graylog.
would you please be so kind and add some more words what you try todo. What your current state is, what you had already tried and what your desired outcome is.
I guess that your question might also be answered already and please you to use the sarch function in this community.
this script run in cronjob and out put write to /var/log/custom.log file. then i make changes in rsyslog configration.
add one conf file custom.conf in /etc/rsyslog.d/
(this for screen lock logs write to syslog)
custom.conf --> file content
vi /etc/rsyslog.d/app.conf
$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
$InputFileName /var/log/custom.log
$InputFileTag test
$InputFileStateFile Stat-test
$InputFileSeverity test
$InputFileFacility local7
$InputRunFileMonitor
$InputFilePersistStateInterval 1000
restart the rsyslog service
After this i got ubuntu screen locks in graylog console but issue have graylog source field shows network gateway ip instead of ubuntu client hostname.
It seems your logs d’ont respect the syslog format, so Graylog Syslog Input does not manage to read the right source field.
Can you provide a log sample ?
Which type of Input do you use in Graylog ? Syslog ? Raw ?