cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
472
Views
0
Helpful
0
Replies
Highlighted
Beginner

Syslog messages transfer from LMS

Hi All.

I have an LMS 4.2.3 and Cisco Have supplied me the following perl script for transfering syslog messages to external server:

Batch to run the perl script:

------------

# batch file to run the PL file

#-------------------------------

@ECHO OFF

D:\PROGRA~2\CSCOpx\bin\perl.exe D:\PROGRA~2\CSCOpx\files\scripts\syslog\syslog-forward.pl "%~2"

Perl script intself:

# Perl script for forward syslog message

#----------------------------------------

#!/opt/CSCOpx/bin/perl

use strict;

use Sys::Syslog qw(:DEFAULT setlogsock);

my $msg = $ARGV[0];

setlogsock('inet');

$Sys::Syslog::host = 'X.X.X.X';

syslog('info|local7', $msg);

closelog;

The problem is all syslog messages are showing LMS server`s IP address instead the IP address of the equipment (switch or routere) which generated

the original syslog message.

Anyone has an idea?

0 REPLIES 0
Content for Community-Ad