Not able to monitor custom log file via Nagios Log Server
Posted: Thu Sep 03, 2015 8:51 am
I have done the following configuration in the nxlog.conf file
<Input internal>
Module im_internal
</Input>
# Watch your own files
<Input file1>
Module im_file
File '%ROOT%\data\nxlog.log'
SavePos TRUE
</Input>
# Windows Event Log
<Input eventlog>
# Uncomment im_msvistalog for Windows Vista/2008 and later
Module im_msvistalog
# Uncomment im_mseventlog for Windows XP/2000/2003
# Module im_mseventlog
</Input>
<Input arerror>
Module im_file
File 'D:\Program Files\XYZ Software\System\server\Db\arerror.log'
SavePos TRUE
Exec $Message = $raw_event;
</Input>
<Output out>
Module om_tcp
Host 172.17.98.157
Port 3515
Exec $tmpmessage = $Message; delete($Message); rename_field("tmpmessage","message");
Exec $raw_event = to_json();
# Uncomment for debug output
# Exec file_write('%ROOT%\data\nxlog_output.log', $raw_event + "\n");
</Output>
<Route 1>
Path internal, file1, eventlog, arerror => out
</Route>
On the Home Page, Nagios Log Server is showing "Only receiving logs from 1 host." & the Dashboard page does not show any entries in the graph. Log file also do not have any errors. Attaching relevant files.
any help is appreciated.
<Input internal>
Module im_internal
</Input>
# Watch your own files
<Input file1>
Module im_file
File '%ROOT%\data\nxlog.log'
SavePos TRUE
</Input>
# Windows Event Log
<Input eventlog>
# Uncomment im_msvistalog for Windows Vista/2008 and later
Module im_msvistalog
# Uncomment im_mseventlog for Windows XP/2000/2003
# Module im_mseventlog
</Input>
<Input arerror>
Module im_file
File 'D:\Program Files\XYZ Software\System\server\Db\arerror.log'
SavePos TRUE
Exec $Message = $raw_event;
</Input>
<Output out>
Module om_tcp
Host 172.17.98.157
Port 3515
Exec $tmpmessage = $Message; delete($Message); rename_field("tmpmessage","message");
Exec $raw_event = to_json();
# Uncomment for debug output
# Exec file_write('%ROOT%\data\nxlog_output.log', $raw_event + "\n");
</Output>
<Route 1>
Path internal, file1, eventlog, arerror => out
</Route>
On the Home Page, Nagios Log Server is showing "Only receiving logs from 1 host." & the Dashboard page does not show any entries in the graph. Log file also do not have any errors. Attaching relevant files.
any help is appreciated.