<?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: Alert Manager: How to resolve multiple errors received such as &amp;quot;Error in 'sendalert' command: Alert script returned error code 1&amp;quot;? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212512#M22816</link>
    <description>&lt;P&gt;thanks for the reply, I think I use the default setting , index="alerts" , which I confirmed in the App General Settings. &lt;/P&gt;

&lt;P&gt;And I cannot find any useful documents on website to guide me how to setup Alert Manager ~~~ &lt;/P&gt;

&lt;P&gt;PS:  I run this alert manager on my testing standalone splunk. thus no need to worry about indexer, search head, master communication and sync issue. &lt;/P&gt;</description>
    <pubDate>Sat, 05 Nov 2016 13:07:21 GMT</pubDate>
    <dc:creator>wangsimingxaxis</dc:creator>
    <dc:date>2016-11-05T13:07:21Z</dc:date>
    <item>
      <title>Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212510#M22814</link>
      <description>&lt;P&gt;Hi I am trying to use Alert Manager in Splunk. Once the alert is triggered and alert manager will do something, it always gets below error. Then there is nothing generated for alert manager data. &lt;/P&gt;

&lt;P&gt;Does anyone have any idea ? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -  Traceback (most recent call last):
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/etc/apps/alert_manager/bin/alert_manager.py", line 427, in 
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -      createIncidentChangeEvent(event, metadata['job_id'], settings.get('index'))
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/etc/apps/alert_manager/bin/alert_manager.py", line 157, in createIncidentChangeEvent
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -      input.submit(event, hostname = socket.gethostname(), sourcetype = 'incident_change', source = 'alert_handler.py', index=index)
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/lib/python2.7/site-packages/splunk/input.py", line 180, in submit
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -      raise splunk.RESTException, (serverResponse.status, msg_text)
11-04-2016 20:51:01.519 +0000 ERROR sendmodalert - action=alert_manager STDERR -  splunk.RESTException: [HTTP 400] ["message type=WARN code=None text=supplied index 'alerts' missing;"]
11-04-2016 20:51:01.531 +0000 INFO  sendmodalert - action=alert_manager - Alert action script completed in duration=312 ms with exit code=1
11-04-2016 20:51:01.532 +0000 WARN  sendmodalert - action=alert_manager - Alert action script returned error code=1
11-04-2016 20:51:01.532 +0000 ERROR sendmodalert - Error in 'sendalert' command: Alert script returned error code 1.
11-04-2016 20:51:01.532 +0000 ERROR SearchScheduler - Error in 'sendalert' command: Alert script returned error code 1., search='sendalert alert_manager results_file="/opt/splunk/var/run/splunk/dispatch/scheduler__admin__launcher__test_at_1478292660_48/results.csv.gz" results_link="http://tbsplunkpeer4.qa1.iad2.xaxis.net:8000/app/launcher/@go?sid=scheduler__admin__launcher__test_at_1478292660_48"'
"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 20:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212510#M22814</guid>
      <dc:creator>wangsimingxaxis</dc:creator>
      <dc:date>2016-11-04T20:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212511#M22815</link>
      <description>&lt;P&gt;Did you configure an index? By default, the Alert Manager uses "alerts". If you wish to use another one, please configure it in the App General settings.&lt;BR /&gt;
Note: The index definition also has to exist on the searchead as the Splunk REST API isn't aware of indexes only existing on indexers&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 22:13:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212511#M22815</guid>
      <dc:creator>Simon</dc:creator>
      <dc:date>2016-11-04T22:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212512#M22816</link>
      <description>&lt;P&gt;thanks for the reply, I think I use the default setting , index="alerts" , which I confirmed in the App General Settings. &lt;/P&gt;

&lt;P&gt;And I cannot find any useful documents on website to guide me how to setup Alert Manager ~~~ &lt;/P&gt;

&lt;P&gt;PS:  I run this alert manager on my testing standalone splunk. thus no need to worry about indexer, search head, master communication and sync issue. &lt;/P&gt;</description>
      <pubDate>Sat, 05 Nov 2016 13:07:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212512#M22816</guid>
      <dc:creator>wangsimingxaxis</dc:creator>
      <dc:date>2016-11-05T13:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212513#M22817</link>
      <description>&lt;P&gt;Did you configure the index in Splunk as well? Go to "Settings" -&amp;gt; "Indexes".&lt;/P&gt;

&lt;P&gt;By the way, we have a new docs page here: &lt;A href="http://docs.alertmanager.info"&gt;http://docs.alertmanager.info&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 21:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212513#M22817</guid>
      <dc:creator>Simon</dc:creator>
      <dc:date>2016-11-07T21:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212514#M22818</link>
      <description>&lt;P&gt;Thats helped much better ~~~ thx the issue is resolved &lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 21:29:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212514#M22818</guid>
      <dc:creator>wangsimingxaxis</dc:creator>
      <dc:date>2016-11-07T21:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212515#M22819</link>
      <description>&lt;P&gt;Hi Alert Manager Support, &lt;BR /&gt;
Sorry to bothering you again. &lt;/P&gt;

&lt;P&gt;I tested it successfully in our Dev env, but when I move on to QA env. I got below errors which I never see before .  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;11-09-2016 20:18:25.385 +0000 INFO  sendmodalert - Invoking modular alert action=alert_manager for search="testtesttesttest" sid="scheduler__admin__xaxis__testtesttesttest_at_1478722680_16" in app="xaxis" owner="admin" type="saved"
11-09-2016 20:18:25.537 +0000 ERROR sendmodalert - action=alert_manager STDERR -  Traceback (most recent call last):
11-09-2016 20:18:25.537 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/etc/apps/alert_manager/bin/alert_manager.py", line 363, in 
11-09-2016 20:18:25.537 +0000 ERROR sendmodalert - action=alert_manager STDERR -      savedSearch = getSavedSearch(payload.get('app'), search_name, sessionKey)
11-09-2016 20:18:25.537 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/etc/apps/alert_manager/bin/alert_manager.py", line 288, in getSavedSearch
11-09-2016 20:18:25.537 +0000 ERROR sendmodalert - action=alert_manager STDERR -      savedSearch = getRestData(uri, sessionKey)
11-09-2016 20:18:25.537 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/etc/apps/alert_manager/bin/alert_manager.py", line 263, in getRestData
11-09-2016 20:18:25.538 +0000 ERROR sendmodalert - action=alert_manager STDERR -      serverResponse, serverContent = rest.simpleRequest(uri, sessionKey=sessionKey, getargs={'output_mode': 'json'})
11-09-2016 20:18:25.538 +0000 ERROR sendmodalert - action=alert_manager STDERR -    File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/__init__.py", line 534, in simpleRequest
11-09-2016 20:18:25.538 +0000 ERROR sendmodalert - action=alert_manager STDERR -      raise splunk.ResourceNotFound, uri
11-09-2016 20:18:25.538 +0000 ERROR sendmodalert - action=alert_manager STDERR -  splunk.ResourceNotFound: [HTTP 404] https://127.0.0.1:8089/servicesNS/nobody/xaxis/admin/savedsearch/testtesttesttest?output_mode=json
11-09-2016 20:18:25.548 +0000 INFO  sendmodalert - action=alert_manager - Alert action script completed in duration=162 ms with exit code=1
11-09-2016 20:18:25.548 +0000 WARN  sendmodalert - action=alert_manager - Alert action script returned error code=1
11-09-2016 20:18:25.548 +0000 ERROR sendmodalert - Error in 'sendalert' command: Alert script returned error code 1.
11-09-2016 20:18:25.549 +0000 ERROR SearchScheduler - Error in 'sendalert' command: Alert script returned error code 1., search='sendalert alert_manager results_file="/opt/splunk/var/run/splunk/dispatch/scheduler__admin__xaxis__testtesttesttest_at_1478722680_16/results.csv.gz" results_link="http://tbsplunksearch1.qa1.iad2.xaxis.net:8000/app/xaxis/@go?sid=scheduler__admin__xaxis__testtesttesttest_at_1478722680_16"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any suggestions? appreciate it &lt;/P&gt;

&lt;P&gt;PS: my working steps:&lt;BR /&gt;
on Search head :&lt;BR /&gt;
1, install alert-manager_214.tgz&lt;BR /&gt;
2, install TA-alert_manager.tar.gz&lt;BR /&gt;
3, create index=alerts&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212515#M22819</guid>
      <dc:creator>wangsimingxaxis</dc:creator>
      <dc:date>2020-09-29T11:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Alert Manager: How to resolve multiple errors received such as "Error in 'sendalert' command: Alert script returned error code 1"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212516#M22820</link>
      <description>&lt;P&gt;Check the permissions of your saved search. They must be shared on app level at least. It looks like your search is private.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Nov 2016 20:42:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Alert-Manager-How-to-resolve-multiple-errors-received-such-as/m-p/212516#M22820</guid>
      <dc:creator>Simon</dc:creator>
      <dc:date>2016-11-09T20:42:47Z</dc:date>
    </item>
  </channel>
</rss>

