12-06-2006 10:19 PM
Has anyone know how to forward syslog messages to another syslog catcher from CiscoWorks LMS2.5 installed on solaris?
05-20-2007 09:04 PM
What are the contents of outbox.bat? To run this script properly, you need to do:
perl.exe outbox.pl "
Where
05-20-2007 09:25 PM
Sorry, I think I misread your email. I read the perl.exe ... line as you running the script manually. This is actually the contents of your batch script. But as I pointed out, you need to specify the argument. That is:
@ECHO OFF
D:\progra~1\cscopx\bin\perl.exe d:\progra~1\CSCOpx\files\scripts\syslog\outofbox.pl "%~2"
12-07-2006 01:40 AM
how can I enable syslog analyzer debugger?
12-07-2006 06:36 AM
To enable debugs for Syslog Analyzer you go to RME -> Admin -> System Preferences -> loglevel settings.
In the Application drop down menu, please select SyslogAnalyzer.
For Syslog Analyzer set the log Level to debug and for Syslog Analyzer User Interface set the log level to debug
Click apply
05-14-2007 04:44 AM
I have created the following script
#!/opt/CSCOpx/bin/perl
use strict;
use Sys::Syslog qw(:DEFAULT setlogsock);
my $msg = $ARGV[0];
setlogsock('udp');
$Sys::Syslog::host = '172.16.10.105';
syslog(LOG_INFO|LOG_LOCAL7, $msg);
closelog;
That an automated action runs it
d:\progra~1\CSCOpx\bin\perl.exe d:\progra~1
\CSCOpx\files\scripts\syslog\outofbox.pl
and i getting the following erros
D:\PROGRA~1\CSCOpx\files\scripts\syslog>outbox.bat
D:\PROGRA~1\CSCOpx\files\scripts\syslog>d:\progra~1\CSCOpx\bin\perl.exe d:\progr
a~1\CSCOpx\files\scripts\syslog\outofbox.pl
Bareword "LOG_INFO" not allowed while "strict subs" in use at d:\progra~1\CSCOpx
\files\scripts\syslog\outofbox.pl line 9.
Bareword "LOG_LOCAL7" not allowed while "strict subs" in use at d:\progra~1\CSCO
px\files\scripts\syslog\outofbox.pl line 9.
Execution of d:\progra~1\CSCOpx\files\scripts\syslog\outofbox.pl aborted due to
compilation errors.
Any help is appreciated
TIA
Mario
05-14-2007 05:00 AM
you missed the single quotes around
LOG_INFO|LOG_LOCAL7
so it should be
syslog('LOG_INFO|LOG_LOCAL7', $msg);
instead of
syslog(LOG_INFO|LOG_LOCAL7, $msg);
05-14-2007 05:10 AM
Thank you, now i get the following
D:\PROGRA~1\CSCOpx\files\scripts\syslog>outbox.bat
D:\PROGRA~1\CSCOpx\files\scripts\syslog>d:\progra~1\CSCOpx\bin\perl.exe d:\progr
a~1\CSCOpx\files\scripts\syslog\outofbox.pl
Invalid argument passed to setlogsock; must be 'unix' or 'inet' at d:\progra~1\C
SCOpx\files\scripts\syslog\outofbox.pl line 7
D:\PROGRA~1\CSCOpx\files\scripts\syslog>
TIA
05-14-2007 05:25 AM
OK, did not read carefully..
you cannot port you script to windows and use SYS::Syslog as this perl module is an interface to the UNIX syslogd.
Concerning syslog (and others), LMS on windows is not the same as on UNIX. Currently I have no possibility to give you an alternative, sorry..
05-14-2007 05:29 AM
OK, did not read carefully..
you cannot port you script to windows and use SYS::Syslog as this perl module is an interface to the UNIX syslogd.
Concerning syslog (and others), LMS on windows is not the same as on UNIX. Currently I have no possibility to give you an alternative, sorry..
05-14-2007 05:31 AM
OK, did not read carefully..
you cannot port you script to windows and use SYS::Syslog as this perl module is an interface to the UNIX syslogd.
Concerning syslog (and others), LMS on windows is not the same as on UNIX. Currently I have no possibility to give you an alternative, sorry..
05-14-2007 07:33 AM
You need to use the script from my later post:
#!/opt/CSCOpx/bin/perl
use strict;
use Sys::Syslog qw(:DEFAULT setlogsock);
my $msg = $ARGV[0];
setlogsock('inet');
$Sys::Syslog::host = '10.1.1.1';
syslog('info|local7', $msg);
closelog;
The first post required a newer version of Perl. This script will work both on Windows and Solaris.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide