<?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: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352399#M42646</link>
    <description>&lt;P&gt;it reports only a invalid session id, but only if i try to access via splunk, via firefox it works.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2017 18:56:57 GMT</pubDate>
    <dc:creator>christianmuelle</dc:creator>
    <dc:date>2017-11-06T18:56:57Z</dc:date>
    <item>
      <title>API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352393#M42640</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;

&lt;P&gt;I tried to get Data from my router via it's API. Syslog is no option, since this is not available for this device.&lt;/P&gt;

&lt;P&gt;When I generate a session ID and use it in my browser ist works. &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/3807iA7B1C9C76CD1097B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;When I use the REST API Modular Input with the following settings:&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/3808i6CA93B530DE50F2D/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I get the following error:&lt;BR /&gt;
ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/rest_ta/bin/rest.py" HTTP Request error: 403 Client Error: Forbidden&lt;/P&gt;

&lt;P&gt;Could anyone give me an advice or an how to get an valid api call for a fritzbox?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 14:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352393#M42640</guid>
      <dc:creator>christianmuelle</dc:creator>
      <dc:date>2017-11-05T14:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352394#M42641</link>
      <description>&lt;P&gt;Hi @christianmueller,&lt;/P&gt;

&lt;P&gt;1) Does your router API does not require any userID or Password?&lt;BR /&gt;
2) Can you please try to change Authentication Type to HTTP Basic??&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 19:39:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352394#M42641</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-11-05T19:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352395#M42642</link>
      <description>&lt;P&gt;Thanks for your fast answer.&lt;/P&gt;

&lt;P&gt;An authentication is required and is maintained by an session id (SID). I used the one from the browser to double check.&lt;/P&gt;

&lt;P&gt;With basic authentication or sid I get the following error code:&lt;/P&gt;

&lt;P&gt;" ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/rest_ta/bin/rest.py" HTTP Request error: 403 Client Error: Forbidden"&lt;/P&gt;

&lt;P&gt;When I tried without sid and authentication I also get an Error 403, so it seams that the authentication is not working in general.&lt;/P&gt;

&lt;P&gt;Do you have any hint?&lt;/P&gt;

&lt;P&gt;Thx&lt;BR /&gt;
Christian&lt;/P&gt;

&lt;P&gt;Do you have any hint?&lt;/P&gt;

&lt;P&gt;Thx&lt;BR /&gt;
Christian&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2017 23:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352395#M42642</guid>
      <dc:creator>christianmuelle</dc:creator>
      <dc:date>2017-11-05T23:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352396#M42643</link>
      <description>&lt;P&gt;Well at in initial glance you are not declaring your url arguments correctly.&lt;/P&gt;

&lt;P&gt;You should use a &lt;STRONG&gt;comma&lt;/STRONG&gt; not an ampersand to delimit the key=value parameters , the setup page even shows the correct format for you right under the input field.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 00:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352396#M42643</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-06T00:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352397#M42644</link>
      <description>&lt;P&gt;I also tried with comma, still Error 403&lt;/P&gt;

&lt;P&gt;With basic authentication and without authentication with an external generate session id&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 06:38:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352397#M42644</guid>
      <dc:creator>christianmuelle</dc:creator>
      <dc:date>2017-11-06T06:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352398#M42645</link>
      <description>&lt;P&gt;Does your web server have logs to tell you the specific reason it is issuing a 403 response ?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 17:45:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352398#M42645</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-06T17:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352399#M42646</link>
      <description>&lt;P&gt;it reports only a invalid session id, but only if i try to access via splunk, via firefox it works.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 18:56:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352399#M42646</guid>
      <dc:creator>christianmuelle</dc:creator>
      <dc:date>2017-11-06T18:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352400#M42647</link>
      <description>&lt;P&gt;When I run the following script, I get a value back, API still not running:&lt;/P&gt;

&lt;P&gt;SERVER="192.168.178.1"&lt;BR /&gt;
PASSWORD="secret"&lt;/P&gt;

&lt;P&gt;challengeRsp=$(curl --header "Accept: application/xml" \&lt;BR /&gt;
    --header "Content-Type: text/plain"     \&lt;BR /&gt;
    "http://$SERVER/login_sid.lua" 2&amp;gt;/dev/null)&lt;/P&gt;

&lt;P&gt;challenge=$(echo $challengeRsp | sed "s/^.&lt;EM&gt;//" | sed "s/&amp;lt;\/Challenge&amp;gt;.&lt;/EM&gt;$//")&lt;/P&gt;

&lt;P&gt;if [[ -z $challenge ]]; then&lt;BR /&gt;
    echo "No challenge found"&lt;BR /&gt;
    exit 0&lt;BR /&gt;
fi&lt;/P&gt;

&lt;P&gt;challenge_bf="$challenge-$PASSWORD"&lt;BR /&gt;
challenge_bf=$(echo -n $challenge_bf | iconv -t UTF-16LE | md5sum - | cut -c 1-32)&lt;BR /&gt;
response_bf="$challenge-$challenge_bf"&lt;/P&gt;

&lt;P&gt;url="http://$SERVER/login_sid.lua"&lt;/P&gt;

&lt;P&gt;sidRsp=$(curl --header "Accept: text/html,application/xhtml+xml,application/xml" \&lt;BR /&gt;
    --header "Content-Type: application/x-www-form-urlencoded"      \&lt;BR /&gt;
    -d "response=$response_bf" \&lt;BR /&gt;
    $url 2&amp;gt;/dev/null)&lt;/P&gt;

&lt;P&gt;sid=$(echo $sidRsp | sed "s/^.&lt;EM&gt;//" | sed "s/&amp;lt;\/SID&amp;gt;.&lt;/EM&gt;$//")&lt;/P&gt;

&lt;P&gt;regex="^0+$"&lt;BR /&gt;
if [[ $sid =~ $regex ]]; then&lt;BR /&gt;
    echo "Invalid password"&lt;BR /&gt;
    exit 0&lt;BR /&gt;
fi&lt;/P&gt;

&lt;P&gt;IFS=' '&lt;BR /&gt;
stats=$(curl --header "Accept: application/xml" \&lt;BR /&gt;
    --header "Content-Type: text/plain"     \&lt;BR /&gt;
    "http://$SERVER/webservices/homeautoswitch.lua?ain=087610156436&amp;amp;switchcmd=getswitchpower&amp;amp;sid=$sid" 2&amp;gt;/dev/null)&lt;/P&gt;

&lt;P&gt;echo $stats&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352400#M42647</guid>
      <dc:creator>christianmuelle</dc:creator>
      <dc:date>2020-09-29T16:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352401#M42648</link>
      <description>&lt;P&gt;paste your actual stanza from inputs.conf&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 00:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352401#M42648</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-07T00:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352402#M42649</link>
      <description>&lt;P&gt;[default]&lt;BR /&gt;
index         = default&lt;BR /&gt;
_rcvbuf        = 1572864&lt;BR /&gt;
host = $decideOnStartup&lt;/P&gt;

&lt;P&gt;[blacklist:$SPLUNK_HOME/etc/auth]&lt;/P&gt;

&lt;P&gt;[monitor://$SPLUNK_HOME/var/log/splunk]&lt;BR /&gt;
index = _internal&lt;/P&gt;

&lt;P&gt;[monitor://$SPLUNK_HOME/var/log/splunk/license_usage_summary.log]&lt;BR /&gt;
index = _telemetry&lt;/P&gt;

&lt;P&gt;[monitor://$SPLUNK_HOME/etc/splunk.version]&lt;BR /&gt;
_TCP_ROUTING = *&lt;BR /&gt;
index = _internal&lt;BR /&gt;
sourcetype=splunk_version&lt;/P&gt;

&lt;P&gt;[batch://$SPLUNK_HOME/var/spool/splunk]&lt;BR /&gt;
move_policy = sinkhole&lt;BR /&gt;
crcSalt = &lt;/P&gt;

&lt;P&gt;[batch://$SPLUNK_HOME/var/spool/splunk/...stash_new]&lt;BR /&gt;
queue       = stashparsing&lt;BR /&gt;
sourcetype  = stash_new&lt;BR /&gt;
move_policy = sinkhole&lt;BR /&gt;
crcSalt     = &lt;/P&gt;

&lt;P&gt;[fschange:$SPLUNK_HOME/etc]&lt;/P&gt;

&lt;H1&gt;poll every 10 minutes&lt;/H1&gt;

&lt;P&gt;pollPeriod = 600&lt;/P&gt;

&lt;H1&gt;generate audit events into the audit index, instead of fschange events&lt;/H1&gt;

&lt;P&gt;signedaudit=true&lt;BR /&gt;
recurse=true&lt;BR /&gt;
followLinks=false&lt;BR /&gt;
hashMaxSize=-1&lt;BR /&gt;
fullEvent=false&lt;BR /&gt;
sendEventMaxSize=-1&lt;BR /&gt;
filesPerDelay = 10&lt;BR /&gt;
delayInMills = 100&lt;/P&gt;

&lt;P&gt;[udp]&lt;BR /&gt;
connection_host=ip&lt;/P&gt;

&lt;P&gt;[tcp]&lt;BR /&gt;
acceptFrom=*&lt;BR /&gt;
connection_host=dns&lt;/P&gt;

&lt;P&gt;[splunktcp]&lt;BR /&gt;
route=has_key:_replicationBucketUUID:replicationQueue;has_key:_dstrx:typingQueue;has_key:_linebreaker:indexQueue;absent_key:_linebreaker:parsingQueue&lt;BR /&gt;
acceptFrom=*&lt;BR /&gt;
connection_host=ip&lt;/P&gt;

&lt;P&gt;[script]&lt;BR /&gt;
interval = 60.0&lt;BR /&gt;
start_by_shell = true&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352402#M42649</guid>
      <dc:creator>christianmuelle</dc:creator>
      <dc:date>2020-09-29T16:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352403#M42650</link>
      <description>&lt;P&gt;I can not see your rest://xxxx  stanza there.&lt;/P&gt;

&lt;P&gt;Try looking under a local directory in another app context. Or searching for it at the command line with find / grep etc...&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 19:21:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352403#M42650</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2017-11-10T19:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: API Modular Input - Get Data from Fritzbox (Router) - HTTP Request error: 403 Client Error: Forbidden</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352404#M42651</link>
      <description>&lt;P&gt;You may achieve the same (retrieve fritzbox logs) using a script from here &lt;A href="https://github.com/mcktr/check_tr64_fritz/tree/master/devel" target="_blank"&gt;https://github.com/mcktr/check_tr64_fritz/tree/master/devel&lt;/A&gt; and running it like this: &lt;BR /&gt;
    sh fetch_tr64_data.sh -h FRITZBOX_IP -u dslf-config  -P "PASSWORD" -U deviceinfo -s DeviceInfo -a GetInfo&lt;BR /&gt;
It returns xml content with embedded log. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:18:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/API-Modular-Input-Get-Data-from-Fritzbox-Router-HTTP-Request/m-p/352404#M42651</guid>
      <dc:creator>tbaublys_splunk</dc:creator>
      <dc:date>2020-09-29T21:18:20Z</dc:date>
    </item>
  </channel>
</rss>

