LMS 2.6 for windows - how to pass params to Syslog automated action program

Unanswered Question
Jul 29th, 2008
User Badges:

I wrote a program in and there are 2 dynamic variables need to be pass to the program where syslog generate


$D - device name and

$M - syslog message


Why the following does not work ? which sytax I should use ?

d:/PROGRA~1/CSCOpx/files/scripts/syslog/kentrap.bat $D $M





Attachment: 
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
frankzehrer Tue, 07/29/2008 - 23:30
User Badges:
  • Silver, 250 points or more

Hi friend,


i guess the spaces between the batch and the variables are the problem.

Try to set the whole string into quotas.

e.g. "d:/PROGRA~1/.... $D $M"


Or create another batchfile from where you execute the mentioned command and parameters.


Hope that helps a bit.


Best regards,

Frank


Joe Clarke Wed, 07/30/2008 - 06:58
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

This won't work. $D and $M are obsolete. You should just enter your script name in the dialog. Within the script, you can get the hostname by dereferencing %~1 and the syslog message by dereferencing %~2.

Actions

This Discussion