<?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 Qualys TA: WARNING: Failed to parse API Output...XML or text declaration not at start of entity in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/633455#M108445</link>
    <description>&lt;DIV class=""&gt;&lt;SPAN class=""&gt;My Qualys VM detection pull stopped working. I found a new warning log.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;TA-QualysCloudPlatform&lt;/SPAN&gt; (&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;host_detection&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2023-03-06&lt;/SPAN&gt; &lt;SPAN class=""&gt;08:54:15&lt;/SPAN&gt; &lt;SPAN class=""&gt;PID=30479&lt;/SPAN&gt; [&lt;SPAN class=""&gt;Thread-3&lt;/SPAN&gt;] &lt;SPAN class=""&gt;WARNING:&lt;/SPAN&gt; &lt;SPAN class=""&gt;Failed&lt;/SPAN&gt; &lt;SPAN class=""&gt;to&lt;/SPAN&gt; &lt;SPAN class=""&gt;parse&lt;/SPAN&gt; &lt;SPAN class=""&gt;API&lt;/SPAN&gt; &lt;SPAN class=""&gt;Output&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;endpoint&lt;/SPAN&gt; &lt;SPAN class=""&gt;/api/2.0/fo/asset/host/vm/detection/.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Message:&lt;/SPAN&gt; &lt;SPAN class=""&gt;XML&lt;/SPAN&gt; &lt;SPAN class=""&gt;or&lt;/SPAN&gt; &lt;SPAN class=""&gt;text&lt;/SPAN&gt; &lt;SPAN class=""&gt;declaration&lt;/SPAN&gt; &lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN class=""&gt;at&lt;/SPAN&gt; &lt;SPAN class=""&gt;start&lt;/SPAN&gt; &lt;SPAN class=""&gt;of&lt;/SPAN&gt; &lt;SPAN class=""&gt;entity:&lt;/SPAN&gt; &lt;SPAN class=""&gt;line&lt;/SPAN&gt; &lt;SPAN class=""&gt;7&lt;/SPAN&gt;, &lt;SPAN class=""&gt;column&lt;/SPAN&gt; 0&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Has anyone come across this? I have no idea where to start when it comes to troubleshooting.&lt;/DIV&gt;</description>
    <pubDate>Mon, 06 Mar 2023 17:01:21 GMT</pubDate>
    <dc:creator>ejwade</dc:creator>
    <dc:date>2023-03-06T17:01:21Z</dc:date>
    <item>
      <title>Qualys TA: WARNING: Failed to parse API Output...XML or text declaration not at start of entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/633455#M108445</link>
      <description>&lt;DIV class=""&gt;&lt;SPAN class=""&gt;My Qualys VM detection pull stopped working. I found a new warning log.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;TA-QualysCloudPlatform&lt;/SPAN&gt; (&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;host_detection&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2023-03-06&lt;/SPAN&gt; &lt;SPAN class=""&gt;08:54:15&lt;/SPAN&gt; &lt;SPAN class=""&gt;PID=30479&lt;/SPAN&gt; [&lt;SPAN class=""&gt;Thread-3&lt;/SPAN&gt;] &lt;SPAN class=""&gt;WARNING:&lt;/SPAN&gt; &lt;SPAN class=""&gt;Failed&lt;/SPAN&gt; &lt;SPAN class=""&gt;to&lt;/SPAN&gt; &lt;SPAN class=""&gt;parse&lt;/SPAN&gt; &lt;SPAN class=""&gt;API&lt;/SPAN&gt; &lt;SPAN class=""&gt;Output&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;endpoint&lt;/SPAN&gt; &lt;SPAN class=""&gt;/api/2.0/fo/asset/host/vm/detection/.&lt;/SPAN&gt; &lt;SPAN class=""&gt;Message:&lt;/SPAN&gt; &lt;SPAN class=""&gt;XML&lt;/SPAN&gt; &lt;SPAN class=""&gt;or&lt;/SPAN&gt; &lt;SPAN class=""&gt;text&lt;/SPAN&gt; &lt;SPAN class=""&gt;declaration&lt;/SPAN&gt; &lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN class=""&gt;at&lt;/SPAN&gt; &lt;SPAN class=""&gt;start&lt;/SPAN&gt; &lt;SPAN class=""&gt;of&lt;/SPAN&gt; &lt;SPAN class=""&gt;entity:&lt;/SPAN&gt; &lt;SPAN class=""&gt;line&lt;/SPAN&gt; &lt;SPAN class=""&gt;7&lt;/SPAN&gt;, &lt;SPAN class=""&gt;column&lt;/SPAN&gt; 0&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Has anyone come across this? I have no idea where to start when it comes to troubleshooting.&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Mar 2023 17:01:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/633455#M108445</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2023-03-06T17:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qualys TA: WARNING: Failed to parse API Output...XML or text declaration not at start of entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/633558#M108469</link>
      <description>&lt;P&gt;I'm not familiar with this TA, but I've had a read through the code and it looks like there could be a couple of issues at play here. Please take this advice with a pinch of salt because I haven't been able to directly test this TA.&lt;BR /&gt;&lt;BR /&gt;First and foremost: The TA does not seem to raise any exceptions (and interrupt the normal flow) when the API returns a non OK response. It does seem to enter a debug log for non-200 response codes. Can you see "Got NOK response from API" in the previous line(s) of your logs?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if request.getcode() != 200:
    qlogger.debug("Got NOK response from API")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would indicate that something is wrong on the API-side. These issues tend to be related to authentication/authorization issues. Make sure that your API credentials have not expired and the correct permissions have been set to read host vm_detection's.&lt;BR /&gt;&lt;BR /&gt;If you're happy with API configuration, the next thing that I would look at is the fact that the TA seems to stage the API output in ./&lt;SPAN&gt;TA-QualysCloudPlatform/tmp/ before ingesting it (so $SPLUNK_HOME/etc/apps/TA-QualysCloudPlatform/tmp/) .&lt;BR /&gt;&lt;BR /&gt;Make sure that the volume mounted for this directory is not full up.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;df -h&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Given that this error corresponds with the fact that the API is not returning data in the expected XML format, I would try and isolate the relevant ./tmp/ file and see if there are any relevant clues such as unusual characters etc. If there are lots of ./tmp/ files in this directory then you &lt;EM&gt;could&lt;/EM&gt; try deleting them to make sure any old half-written files are not kicking around and causing the issue.&lt;BR /&gt;&lt;BR /&gt;These filenames are generated dynamically using properties such as&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;os&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getpid&lt;/SPAN&gt;&lt;SPAN&gt;() and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;current_thread&lt;/SPAN&gt;&lt;SPAN&gt;().&lt;/SPAN&gt;&lt;SPAN&gt;getName&lt;/SPAN&gt;&lt;SPAN&gt;() so it's going to be quite hard for the folks on Splunk Community to help you debug this remotely.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That being said, if nothing obvious is jumping out with the above, then I suggest that you reach out to Qualys directly as this is not a Splunk Supported add-on. You could also try sharing your inputs.conf and some more logs (obfuscated as appropriate) to see if anything else jumps out to the community.&lt;BR /&gt;&lt;BR /&gt;Good Luck!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:02:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/633558#M108469</guid>
      <dc:creator>Tom_Lundie</dc:creator>
      <dc:date>2023-03-07T14:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Qualys TA: WARNING: Failed to parse API Output...XML or text declaration not at start of entity</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/634086#M108542</link>
      <description>&lt;P&gt;Thank you - this is good information on how the TA works. I'm working with Qualys support now and hoping to find an answer. I gave them feedback about their lack of exception handling. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 16:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Qualys-TA-WARNING-Failed-to-parse-API-Output-XML-or-text/m-p/634086#M108542</guid>
      <dc:creator>ejwade</dc:creator>
      <dc:date>2023-03-10T16:48:31Z</dc:date>
    </item>
  </channel>
</rss>

