<?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: How to build an alert that will trigger any server issue and do an automatic restart of the server through splunk alert without human intervention? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412044#M7223</link>
    <description>&lt;P&gt;You can look at creating an alert action script, as documented at &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/AdvancedDev/ModAlertsIntro"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/AdvancedDev/ModAlertsIntro&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You will need to write a Splunk query that identifies the hosts which are not responsive. At the end of the search, you want a list of servers. Save this search as an alert, then assign an alert action to it.&lt;/P&gt;

&lt;P&gt;Your alert action script will need to read a CSV file which contains your servers, then decide what you want to do with them. I suggest using something like ssh with pre-shared certificates, then doing &lt;CODE&gt;ssh root@remote-server.com /sbin/reboot&lt;/CODE&gt; . Just do that for each host that is listed in the CSV.&lt;/P&gt;

&lt;P&gt;Splunk also supported very basic alert action scripts, which I summarised at &lt;A href="https://simonduff.net/splunk_alert_script/"&gt;https://simonduff.net/splunk_alert_script/&lt;/A&gt; . This has been deprecated, but still works.&lt;/P&gt;

&lt;P&gt;Alternatively, you can also look at Splunk Phantom. That has many more features, running advanced playbooks, etc... which is probably overkill for what you require.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2019 22:29:58 GMT</pubDate>
    <dc:creator>sduff_splunk</dc:creator>
    <dc:date>2019-04-19T22:29:58Z</dc:date>
    <item>
      <title>How to build an alert that will trigger any server issue and do an automatic restart of the server through splunk alert without human intervention?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412043#M7222</link>
      <description>&lt;P&gt;Hi , I am looking for to automate jobs for splunk , i want to build an alert that will trigger if any server has issue as well as do a automatic restart of the server through the splunk alert without human intervention , How can i do it ?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 21:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412043#M7222</guid>
      <dc:creator>Prakash493</dc:creator>
      <dc:date>2019-04-19T21:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to build an alert that will trigger any server issue and do an automatic restart of the server through splunk alert without human intervention?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412044#M7223</link>
      <description>&lt;P&gt;You can look at creating an alert action script, as documented at &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/AdvancedDev/ModAlertsIntro"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/AdvancedDev/ModAlertsIntro&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You will need to write a Splunk query that identifies the hosts which are not responsive. At the end of the search, you want a list of servers. Save this search as an alert, then assign an alert action to it.&lt;/P&gt;

&lt;P&gt;Your alert action script will need to read a CSV file which contains your servers, then decide what you want to do with them. I suggest using something like ssh with pre-shared certificates, then doing &lt;CODE&gt;ssh root@remote-server.com /sbin/reboot&lt;/CODE&gt; . Just do that for each host that is listed in the CSV.&lt;/P&gt;

&lt;P&gt;Splunk also supported very basic alert action scripts, which I summarised at &lt;A href="https://simonduff.net/splunk_alert_script/"&gt;https://simonduff.net/splunk_alert_script/&lt;/A&gt; . This has been deprecated, but still works.&lt;/P&gt;

&lt;P&gt;Alternatively, you can also look at Splunk Phantom. That has many more features, running advanced playbooks, etc... which is probably overkill for what you require.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2019 22:29:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412044#M7223</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2019-04-19T22:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to build an alert that will trigger any server issue and do an automatic restart of the server through splunk alert without human intervention?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412045#M7224</link>
      <description>&lt;P&gt;Splunk recently bought Phantom so if you are looking for an add-on solution, I would start there because it will obviously be heavily supported and probably fully integrated at some point.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 01:39:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-build-an-alert-that-will-trigger-any-server-issue-and-do/m-p/412045#M7224</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-24T01:39:22Z</dc:date>
    </item>
  </channel>
</rss>

