<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic EEM SYSLOG Environment variable missing - IOS 12.4(24)T5 in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671942#M938809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Additional findings I wanted to share just to complete the picture of what we are trying / finding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on event manager debug information, it appears that _syslog_msg is comprised of all 3 lines of information. &lt;/P&gt;&lt;P&gt;My questions boil down to this - Does _syslog_msg variable that I am trying to use in the applet;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- contain only the original message that caused the applet to fire?&lt;/P&gt;&lt;P&gt;- generate 2 lines of output when using the "action 1.0 syslog" directive; 1 for the Prefix string and a 2nd with syslog message that fired the applet (if yes, is there any way within the applet to make that all come out as a single line?)?&lt;/P&gt;&lt;P&gt;- do the contents of _syslog_msg variable get accumulated from the original syslog message, plus the string prefix, plus a rewrite of the original syslog message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm unable to find supporting documentation that fully explains how the _syslog_msg is used and output within the applet example I am trying to use.&amp;nbsp; My end state goal is to be able to have 2 lines in SYSLOG&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; the original syslog message as it would normally show up without EEM or ESM &lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; an ADDITIONAL syslog message on a single line, from my EEM Applet (would like to avoid ESM / TCL) which pre-ends the original syslog messaged with a string prefix I use in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt; Debug output &amp;lt;&amp;gt;&amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_event_type value:41&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_event_type_string value:syslog&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_event_severity value:severity-warning&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_syslog_msg_count value:2&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_syslog_priority value:warnings&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000; "&gt;&lt;SPAN style="color: #ff0000;"&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_syslog_msg value:&lt;BR /&gt;&lt;/SPAN&gt;*Jun 29 21:21:06 edt: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: stamandk] [Source: 0.0.0.0] [localport: 0] [Reason: Login Authentication Failed] at 21:21:06 edt Wed Jun 29 2011&lt;BR /&gt;*Jun 29 21:21:06 edt: %HA_EM-6-LOG: Quiet-Mode-Console: CIPD: &lt;BR /&gt;*Jun 29 21:21:06 edt: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: stamandk] [Source: 0.0.0.0] [localport: 0] [Reason: Login Authentication Failed] at 21:21:06 edt Wed Jun 29 2011&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: fh_server: fh_io_msg: received msg FH_MSG_CALLBACK_DONE from client 12 pclient 1&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: fh_io_msg: EEM callback policy Quiet-Mode-Console has ended with normal exit status of 0x0&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM fms_remote_chkpt_add_event_hist(), data_len = 2980, buf_size = 2992&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: server decrements in use thread: jobid=11 rule id=2 in use thread=0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jun 2011 14:08:08 GMT</pubDate>
    <dc:creator>kstamandk</dc:creator>
    <dc:date>2011-06-30T14:08:08Z</dc:date>
    <item>
      <title>EEM SYSLOG Environment variable missing - IOS 12.4(24)T5</title>
      <link>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671940#M938807</link>
      <description>&lt;P&gt;New to EEM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking to create a simple applet to rewrite certain SYSLOG messages with a Prefix Appended.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I attempt the applet(shown below), the applet;&lt;/P&gt;&lt;P&gt;1) does run as expected &lt;/P&gt;&lt;P&gt;2) does write a syslog message&lt;/P&gt;&lt;P&gt;3)&amp;nbsp; but it does not include the original syslog message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading the documentation, I'm understanding that $_syslog_msg is a built-in variable that would hold that syslog message that fired the applet - but ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doing a show event manager environment all - comes up empty, but I believe that would be expected because I have no user definet variables - true?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;P&gt;Is the built-in environment variable not available for use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;event manager applet Quiet-Mode-Console&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;event syslog occurs 1 pattern "LOGIN-3-TOOMANY_AUTHFAILS"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;action 1.0 syslog msg "CIPD-CL - Console Login Failures: $_syslog_msg"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Any help??&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 12:22:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671940#M938807</guid>
      <dc:creator>kstamandk</dc:creator>
      <dc:date>2020-02-21T12:22:59Z</dc:date>
    </item>
    <item>
      <title>EEM SYSLOG Environment variable missing - IOS 12.4(24)T5</title>
      <link>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671941#M938808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; OK - no replies or suggestions yet, but thought I'd share findings so far.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changed the pattern string to match a different error, so I can get more hits for testing, but other than that - same applet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;event manager applet Quiet-Mode-Console&lt;/P&gt;&lt;P&gt; event syslog occurs 1 pattern "%SEC_LOGIN-4-LOGIN_FAILED"&lt;/P&gt;&lt;P&gt; action 1.0 syslog msg "x $_syslog_msg"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's what I find in SYSLOG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp; - *Jun 29 21:11:53 edt: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: stamandk] [Source: 0.0.0.0] [localport: 0] [Reason: Login Authentication Failed] at 21:11:5&lt;/P&gt;&lt;P&gt;3 edt Wed Jun 29 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp; - *Jun 29 21:11:53 edt: %HA_EM-6-LOG: Quiet-Mode-Console: CIPD:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp; - *Jun 29 21:11:53 edt: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: stamandk] [Source: 0.0.0.0] [localport: 0] [Reason: Login Authentication Failed] at 21:11:53 edt Wed Jun 29 2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I believe I am seeing is, using the numbers 1, 2, and 3 as reference for each line output in SYSLOG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - Is the original syslog message&lt;/P&gt;&lt;P&gt;2 - Is the result of the EEM Applet, but $_syslog_msg was not replaced by the original message from number 1&lt;/P&gt;&lt;P&gt;3 - Is the original message again, which I'm interpreting as a result of my script somehow having $_syslog_msg being output as a new line instead of the same lines as the Prefix I was hoping to just add to the original syslog message and come out all in 1 line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions I'm hoping someone could help with are;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- is this the expected behavior (having a new line character somehow generated)?&lt;/P&gt;&lt;P&gt;- is there a way to have the applet syslog message come out as one line, without having to resort to doing this in TCL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 00:55:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671941#M938808</guid>
      <dc:creator>kstamandk</dc:creator>
      <dc:date>2011-06-30T00:55:44Z</dc:date>
    </item>
    <item>
      <title>EEM SYSLOG Environment variable missing - IOS 12.4(24)T5</title>
      <link>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671942#M938809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Additional findings I wanted to share just to complete the picture of what we are trying / finding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on event manager debug information, it appears that _syslog_msg is comprised of all 3 lines of information. &lt;/P&gt;&lt;P&gt;My questions boil down to this - Does _syslog_msg variable that I am trying to use in the applet;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- contain only the original message that caused the applet to fire?&lt;/P&gt;&lt;P&gt;- generate 2 lines of output when using the "action 1.0 syslog" directive; 1 for the Prefix string and a 2nd with syslog message that fired the applet (if yes, is there any way within the applet to make that all come out as a single line?)?&lt;/P&gt;&lt;P&gt;- do the contents of _syslog_msg variable get accumulated from the original syslog message, plus the string prefix, plus a rewrite of the original syslog message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm unable to find supporting documentation that fully explains how the _syslog_msg is used and output within the applet example I am trying to use.&amp;nbsp; My end state goal is to be able to have 2 lines in SYSLOG&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; the original syslog message as it would normally show up without EEM or ESM &lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; an ADDITIONAL syslog message on a single line, from my EEM Applet (would like to avoid ESM / TCL) which pre-ends the original syslog messaged with a string prefix I use in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;&amp;lt;&amp;gt; Debug output &amp;lt;&amp;gt;&amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_event_type value:41&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_event_type_string value:syslog&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_event_severity value:severity-warning&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_syslog_msg_count value:2&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_syslog_priority value:warnings&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #000000; "&gt;&lt;SPAN style="color: #ff0000;"&gt;*Jun 29 21:21:06 edt: EEM: policy_dir xml builtin: name:_syslog_msg value:&lt;BR /&gt;&lt;/SPAN&gt;*Jun 29 21:21:06 edt: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: stamandk] [Source: 0.0.0.0] [localport: 0] [Reason: Login Authentication Failed] at 21:21:06 edt Wed Jun 29 2011&lt;BR /&gt;*Jun 29 21:21:06 edt: %HA_EM-6-LOG: Quiet-Mode-Console: CIPD: &lt;BR /&gt;*Jun 29 21:21:06 edt: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: stamandk] [Source: 0.0.0.0] [localport: 0] [Reason: Login Authentication Failed] at 21:21:06 edt Wed Jun 29 2011&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: fh_server: fh_io_msg: received msg FH_MSG_CALLBACK_DONE from client 12 pclient 1&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: fh_io_msg: EEM callback policy Quiet-Mode-Console has ended with normal exit status of 0x0&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM fms_remote_chkpt_add_event_hist(), data_len = 2980, buf_size = 2992&lt;/P&gt;&lt;P&gt;*Jun 29 21:21:06 edt: EEM: server decrements in use thread: jobid=11 rule id=2 in use thread=0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2011 14:08:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/eem-syslog-environment-variable-missing-ios-12-4-24-t5/m-p/1671942#M938809</guid>
      <dc:creator>kstamandk</dc:creator>
      <dc:date>2011-06-30T14:08:08Z</dc:date>
    </item>
  </channel>
</rss>

