<?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 How to identify IIS Application Pool status changes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498555#M138906</link>
    <description>&lt;P&gt;I know similar questions have been asked a number of times but trying to follow the suggestions given I still cannot get it to work. Perhaps I need to modify the output of the powershell command to create a key/value pair for name+status?&lt;/P&gt;

&lt;P&gt;I want the search to show start/stop status changes which we'll use in an actionable alert. Output items should include host, apppool, time of last change, and current status.&lt;/P&gt;

&lt;P&gt;The &lt;STRONG&gt;Get-IISAppPool&lt;/STRONG&gt; output (ingested into Splunk) looks like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8303i0B2C855638772080/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 02:08:34 GMT</pubDate>
    <dc:creator>jsmithn</dc:creator>
    <dc:date>2020-01-31T02:08:34Z</dc:date>
    <item>
      <title>How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498555#M138906</link>
      <description>&lt;P&gt;I know similar questions have been asked a number of times but trying to follow the suggestions given I still cannot get it to work. Perhaps I need to modify the output of the powershell command to create a key/value pair for name+status?&lt;/P&gt;

&lt;P&gt;I want the search to show start/stop status changes which we'll use in an actionable alert. Output items should include host, apppool, time of last change, and current status.&lt;/P&gt;

&lt;P&gt;The &lt;STRONG&gt;Get-IISAppPool&lt;/STRONG&gt; output (ingested into Splunk) looks like this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8303i0B2C855638772080/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 02:08:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498555#M138906</guid>
      <dc:creator>jsmithn</dc:creator>
      <dc:date>2020-01-31T02:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498556#M138907</link>
      <description>&lt;P&gt;recommend:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| multikv forceheader=1
| table _time host Name  Status   CLR_ver  Pipeline_Mode  Start_Mode
| stats last(_time) as _time last(Status) as current_Status dc(Status) as Status_change by Name host
| where Status_change &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If all field is extracted, maybe works.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;previous answer:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="
Name                Status   CLR_ver  Pipeline_Mode  Start_Mode
----                ------   -------  -------------  ----------
DefaultAppPool      Started  V4.0     Integrated     OnDemand
.NET V4.5 Classic   Started  V4.0     Classic        OnDemand
.NET v4.5           Started  V4.0     Integrated     OnDemand
Monkey              Started  V4.0     Integrated     OnDemand"
`comment("this is your sample")`
`comment("from here, the logic")`
| multikv forceheader=1
| table Name                Status   CLR_ver  Pipeline_Mode  Start_Mode
| stats dc(Status) as Status_change by Name
| where Status_change &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, how about this?&lt;BR /&gt;
&lt;CODE&gt;Perhaps I need to modify the output of the powershell command to create a key/value pair for name+status?&lt;/CODE&gt;&lt;BR /&gt;
No, you should provide sample &lt;STRONG&gt;TEXT&lt;/STRONG&gt; log.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 04:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498556#M138907</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-01T04:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498557#M138908</link>
      <description>&lt;P&gt;Try adding &lt;CODE&gt;| ConvertTo-Json -Compress&lt;/CODE&gt; to your PowerShell command.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 17:53:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498557#M138908</guid>
      <dc:creator>spayneort</dc:creator>
      <dc:date>2020-02-01T17:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498558#M138909</link>
      <description>&lt;P&gt;Your solution does identify situations where dc(Status) &amp;gt; 1, so it correctly finds situations when the service state has changed over a given period. But how would I still display the host, time of last change, and current status?&lt;/P&gt;

&lt;P&gt;I can add "host" to my display parameter &lt;STRONG&gt;stats dc(Status) AS Status_change BY host,Name&lt;/STRONG&gt; but if I add the other columns the dc count becomes invalid.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 19:53:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498558#M138909</guid>
      <dc:creator>jsmithn</dc:creator>
      <dc:date>2020-02-04T19:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498559#M138910</link>
      <description>&lt;P&gt;&lt;CODE&gt;how would I still display the host, time of last change, and current status?&lt;/CODE&gt;&lt;BR /&gt;
There is no sample text log.&lt;BR /&gt;
host? time? I can't see them.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 21:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498559#M138910</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-04T21:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498560#M138911</link>
      <description>&lt;P&gt;Aren't host and _time native parameters splunk includes as part of every event ingested? There is no logfile; the powershell script calls the Get-IISAppPool object and the output of that is directly ingested, which is the output I originally included.&lt;/P&gt;

&lt;P&gt;I've modified your suggestion like this but it's kludgy:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;host=xyz sourcetype=IISAppPool earliest=-5m | multikv forceheader=1&lt;BR /&gt;
| table host _time Name Status&lt;BR /&gt;
| append&lt;BR /&gt;
[ search host=xyz sourcetype=IISAppPool earliest=1h| multikv forceheader=1&lt;BR /&gt;
| stats dc(Status) AS SC BY host,Name&lt;BR /&gt;
| where SC &amp;gt; 1 ]&lt;BR /&gt;
| table host _time Name Status&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;It shows all the AppPools on a given host when I really only want to display the status of the AppPools where SC &amp;gt; 1. Ideally instead of showing the impacted AppPool twice, it would just show once, and include the time of the last change and the current status.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 21:34:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498560#M138911</guid>
      <dc:creator>jsmithn</dc:creator>
      <dc:date>2020-02-04T21:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498561#M138912</link>
      <description>&lt;P&gt;my latest answer is checked?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 09:03:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498561#M138912</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-05T09:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498562#M138913</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;, thanks for the answer. I modified it slightly just for formatting purposes and to grab the "latest" instead of "last" event. Final query follows:&lt;BR /&gt;
&lt;EM&gt;my_search&lt;BR /&gt;
| multikv forceheader=1&lt;BR /&gt;
| table _time host Name Status&lt;BR /&gt;
| stats latest(_time) as _time latest(Status) as Status dc(Status) as SC by host Name&lt;BR /&gt;
| where SC &amp;gt; 1&lt;BR /&gt;
| table _time host Name Status&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498562#M138913</guid>
      <dc:creator>jsmithn</dc:creator>
      <dc:date>2020-09-30T04:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498563#M138914</link>
      <description>&lt;P&gt;I see, happy splunking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 21:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/498563#M138914</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-05T21:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify IIS Application Pool status changes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/579757#M202007</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/208242"&gt;@jsmithn&lt;/a&gt;&amp;nbsp; I have the same requirement at work, could you please post a walkthrough how you were able to get the fields such as status etc. The logs does not show these fields. Any help will be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 03:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-identify-IIS-Application-Pool-status-changes/m-p/579757#M202007</guid>
      <dc:creator>alexlexxy</dc:creator>
      <dc:date>2022-01-03T03:50:38Z</dc:date>
    </item>
  </channel>
</rss>

