<?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 Re: Why is my &amp;quot;/usr/bin/last&amp;quot; script not working? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338882#M62547</link>
    <description>&lt;P&gt;Have you checked splunkd.log for any hints as to what may be going wrong?&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2017 16:56:47 GMT</pubDate>
    <dc:creator>s2_splunk</dc:creator>
    <dc:date>2017-07-31T16:56:47Z</dc:date>
    <item>
      <title>Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338881#M62546</link>
      <description>&lt;P&gt;i have problem with my basic script.&lt;/P&gt;

&lt;P&gt;ist connnten only&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh

/usr/bin/last
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i updated also my default/inputs.conf below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script://./bin/who.sh]
interval = */1 * * * *
index = main
sourcetype = who
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but i can not find the out put of it.&lt;/P&gt;

&lt;P&gt;when i delete the  /usr/bin/last line and add such echo "test"; it works!! &lt;/P&gt;

&lt;P&gt;how can i fix this problem? i know that my script works, but Splunk can not parse it.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338881#M62546</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-07-31T16:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338882#M62547</link>
      <description>&lt;P&gt;Have you checked splunkd.log for any hints as to what may be going wrong?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 16:56:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338882#M62547</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2017-07-31T16:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338883#M62548</link>
      <description>&lt;P&gt;i checked the splunkd.logs but i can do it again.&lt;BR /&gt;
on the log i can see only that the script is executed&lt;/P&gt;

&lt;P&gt;when i change the script content like below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/usr/bin/last  | awk  -F: '{ print $1 }'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i can find it at the splunk server site. i think something wrong with parsing. &lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 17:28:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338883#M62548</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-07-31T17:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338884#M62549</link>
      <description>&lt;P&gt;how can i debug such a problem. when i change the content of the script splunk index it.&lt;/P&gt;

&lt;P&gt;but i can not index the output of /usr/bin/last&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 07:24:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338884#M62549</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-03T07:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338885#M62550</link>
      <description>&lt;P&gt;Try to run the script from the command line as the user under wich Splunk is running, Splunk should index what you see as output there.  Output which is written to standard error goes to the splunkd.log.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 07:43:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338885#M62550</guid>
      <dc:creator>FritzWittwer_ol</dc:creator>
      <dc:date>2017-08-03T07:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338886#M62551</link>
      <description>&lt;P&gt;i dont know how.  but after i extract a couple of field of log. splunk begin to recognise the logs&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 12:42:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338886#M62551</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-03T12:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338887#M62552</link>
      <description>&lt;P&gt;when i change the scipt following its work again&lt;/P&gt;

&lt;P&gt;so there is something wrong with the time &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/usr/bin/last   | sed  's/:/./g'

root     tty1                          Mon Apr 25 13.24 - 13.26  (00.01)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Aug 2017 15:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338887#M62552</guid>
      <dc:creator>karakutu</dc:creator>
      <dc:date>2017-08-09T15:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my "/usr/bin/last" script not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338888#M62553</link>
      <description>&lt;P&gt;So the script works, but timestamp and event breaking fails. As long as you don't remove the colons Splunk will use the default settings and  recognise this timestamps and brake the events there. &lt;BR /&gt;
There are various ways to fix it, but the laziest one would be to look at the &lt;A href="https://splunkbase.splunk.com/app/833/#/overview"&gt;Splunk Add-on for Unix&lt;/A&gt;, or at least the definition of the scripted input and the lastlog stanza from the props.conf.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2017 21:47:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-my-quot-usr-bin-last-quot-script-not-working/m-p/338888#M62553</guid>
      <dc:creator>FritzWittwer_ol</dc:creator>
      <dc:date>2017-08-09T21:47:57Z</dc:date>
    </item>
  </channel>
</rss>

