This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Log variable

FormerMember
FormerMember

Hello, I am trying to log the value of the variable Global01. I have tried different ways - however without success.

I have written a Script which sets VarGlobal01 according to certain text components of a snmp message. The following Action "Run external Programm" calls a Batch file an passes the variable. Everything fine so far.

Now I want to log the value of the variable in seperate log file. I tried a separate Batch file: >> path\logfiletxt echo %1

I works well when the Batch file is executed directly and also when clicking the test button in the syslog Server console. However, no log file is created during the regular logggin. All Actions are beeing excecuted - so the filter can't be the reason.

Any ideas how to log the variable every time the script runs?

THANKS

  • I'm not sure how the second batch file is running... is that another action item in the rule?  In the script that is setting VarGlobal01 you can add the  function Fields.ActionLog to file.  In the help search for 'script functions'.  Using that you can specify the log file name and the data to log.  Since this would all happen in the same rule you could use VarCustom01 instead of VarGlobal01.  Doesn't make a functional difference in this case but allows the Globals to stay free until you need them to pass data between rules.