Mr. Wagner,
  Thank you very much for your response.  I agree it would appear as though the 
results from my OMP query show a list of reports.  However, I think I am asking 
it for the details of one report.  Here are two consecutive commands and their 
responses.

First, get the tasks and their valid first report id:

[root@ggc-scan2 ggc]# omp --config-file=/opt/ggc/conf/omp.conf -X '<get_tasks/>'
<get_tasks_response status_text="OK" 
status="200"><apply_overrides>0</apply_overrides><task 
id="13e06596-d35d-449d-b60e-775e353033b6"><owner><name>x</name></owner><name>test
 scan</name><comment>test 
scan</comment><creation_time>2017-08-30T22:37:37-05:00</creation_time><modification_time>2017-08-30T22:37:48-05:00</modification_time><writable>1</writable><in_use>0</in_use><permissions><permission><name>Everything</name></permission></permissions><user_tags><count>0</count></user_tags><alterable>0</alterable><config
 id="daba56c8-73ec-11df-a475-002264764cea"><name>Full and 
fast</name><type>0</type><trash>0</trash></config><target 
id="18f8ee06-4a53-4789-8bb4-d3729c3d9bd9"><name>GGC 
Targets</name><trash>0</trash></target><hosts_ordering>sequential</hosts_ordering><scanner
 id="08b69003-5fc2-4037-a479-93b440211c73"><name>OpenVAS 
Default</name><type>2</type><trash>0</trash></scanner><status>Done</status><progress>-1</progress><report_count>1<finished>1</finished></report_count><trend></trend><schedule
 
id=""><name></name><next_time>over</next_time><trash>0</trash></schedule><schedule_periods>0</schedule_periods><first_report><report
 
id="f9d9b494-abb8-4737-b394-5c72aa6b2a1f"><timestamp>2017-08-30T22:37:37-05:00</timestamp><scan_start>2017-08-30T22:37:47-05:00</scan_start><scan_end>2017-08-31T03:00:28-05:00</scan_end><result_count><debug>0</debug><hole>6</hole><info>32</info><log>706</log><warning>82</warning><false_positive>0</false_positive></result_count><severity>10.0</severity></report></first_report><last_report><report
 
id="f9d9b494-abb8-4737-b394-5c72aa6b2a1f"><timestamp>2017-08-30T22:37:37-05:00</timestamp><scan_start>2017-08-30T22:37:47-05:00</scan_start><scan_end>2017-08-31T03:00:28-05:00</scan_end><result_count><debug>0</debug><hole>6</hole><info>32</info><log>706</log><warning>82</warning><false_positive>0</false_positive></result_count><severity>10.0</severity></report></last_report><observers></observers><alert
 id="f36839bf-edda-40e1-9ad0-d4bde12d65b6"><name>Scan started email 
2</name></alert><alert id="2074c873-a2f9-4334-815a-03fe973cef46"><name>Scan 
completed email 
2</name></alert><result_count>823</result_count><preferences><preference><name>Maximum
 concurrently executed NVTs per 
host</name><scanner_name>max_checks</scanner_name><value>5</value></preference><preference><name>Maximum
 concurrently scanned 
hosts</name><scanner_name>max_hosts</scanner_name><value>5</value></preference><preference><name>Network
 Source 
Interface</name><scanner_name>source_iface</scanner_name><value></value></preference><preference><name>Add
 results to Asset 
Management</name><scanner_name>in_assets</scanner_name><value>yes</value></preference><preference><name>Apply
 Overrides when adding 
Assets</name><scanner_name>assets_apply_overrides</scanner_name><value>yes</value></preference><preference><name>Min
 QOD when adding 
Assets</name><scanner_name>assets_min_qod</scanner_name><value>70</value></preference><preference><name>Auto
 Delete 
Reports</name><scanner_name>auto_delete</scanner_name><value>no</value></preference><preference><name>Auto
 Delete Reports 
Data</name><scanner_name>auto_delete_data</scanner_name><value>10</value></preference></preferences></task><filters
 id=""><term>apply_overrides=0 min_qod=70 first=1 rows=30 
sort=name</term><keywords><keyword><column>apply_overrides</column><relation>=</relation><value>0</value></keyword><keyword><column>min_qod</column><relation>=</relation><value>70</value></keyword><keyword><column>first</column><relation>=</relation><value>1</value></keyword><keyword><column>rows</column><relation>=</relation><value>30</value></keyword><keyword><column>sort</column><relation>=</relation><value>name</value></keyword></keywords></filters><sort><field>name<order>ascending</order></field></sort><tasks
 max="1000" 
start="1"></tasks><task_count>1<filtered>1</filtered><page>1</page></task_count></get_tasks_response>

Next, get the report detail using the report ID returned by the previous 
command:

[root@ggc-scan2 ggc]# omp --config-file=/opt/ggc/conf/omp.conf -R 
f9d9b494-abb8-4737-b394-5c72aa6b2a1f
<report id="f9d9b494-abb8-4737-b394-5c72aa6b2a1f" 
format_id="a994b278-1f62-11e1-96ac-406186ea4fc5" extension="xml" type="scan" 
content_type="text/xml"><owner><name>ggc</name></owner><name>2017-08-30T22:37:47-05:00</name><comment></comment><creation_time>2017-08-30T22:37:47-05:00</creation_time><modification_time>2017-08-31T03:00:28-05:00</modification_time><writable>0</writable><in_use>0</in_use><task
 id="13e06596-d35d-449d-b60e-775e353033b6"><name>test 
scan</name></task><report_format 
id="a994b278-1f62-11e1-96ac-406186ea4fc5"><name>XML</name></report_format></report>

[root@ggc-scan2 ggc]#

My config file specified only has the following:

[Connection]
host=localhost
port=9390
username=x
password=x

I cannot determine how to get omp -R or omp -X '<get_reports report_id=x'/> to 
give me the actual report detail, no matter what I try.  I've used XML, I've 
included details="1", I've turned on logging for openvasmd and use the command 
it logs, and more and still I can't get past this.  I'm almost to the point of 
looking through source code.  Not necessarily requesting a solution so much as 
any suggestion you have as to how to debug this further would be greatly 
appreciated.

Thanks,
 Trent Townsend

-----Original Message-----
From: Openvas-discuss [mailto:openvas-discuss-boun...@wald.intevation.org] On 
Behalf Of Jan-Oliver Wagner
Sent: Wednesday, September 6, 2017 1:58 PM
To: openvas-discuss@wald.intevation.org
Subject: Re: [Openvas-discuss] report not generating


Hello,

I am not quite sure what problem you have.

But maybe you mix up a single report (with results) and a list of reports ?
The XML you posted looks like the latter and your omp call like the first.


Am Mittwoch, 6. September 2017, 14:50:53 CEST schrieb Trent Townsend:
> Good day.  I'm humbly requesting again if anyone has seen such
> behavior as that described below.  I've reached my wits end on this
> one and my PM is asking me for answers.  Thanks in advance.
>
> Trent
>
> From: Trent Townsend
> Sent: Friday, September 1, 2017 3:23 PM
> To: openvas-discuss@wald.intevation.org
> Subject: report not generating
>
> Seemingly at random, my reports from OMP CLI stopped working.  I
> copied the following XML from openvasmd.log which *can* generate the
> reports properly from the web GUI.
>
> omp -Xi '<get_reports details="1" ignore_pagination="1" filt_id="0"
> filter="min_qod=70 autofp=0 apply_overrides=1 notes=1 overrides=1
> result_hosts_only=1 first=1 rows=100 sort-reverse=severity levels=hml"
> pos="1" notes_details="1" overrides_details="1"
> report_id="b7c7d80e-fbbd-46f9-9da1-5745907c2301" delta_report_id="0"
> format_id="5057e5cc-b825-11e4-9d0e-28d24461215b"/>'
>
> However, unlike when I run it from the GUI, I only get the following
> (notice the filter is even not correct):
>
>     <get_reports_response status_text="OK" status="200">
>       <report id="b7c7d80e-fbbd-46f9-9da1-5745907c2301"
> format_id="5057e5cc-b825-11e4-9d0e-28d24461215b" extension="xml"
> type="scan" content_type="text/xml"> <owner>
>           <name>ggc</name>
>         </owner>
>         <name>2017-09-01T10:18:43-05:00</name>
>         <comment></comment>
>         <creation_time>2017-09-01T10:18:43-05:00</creation_time>
>         <modification_time>2017-09-01T14:27:15-05:00</modification_time>
>         <writable>0</writable>
>        <in_use>0</in_use>
>         <task id="af2eac8a-da24-419f-8625-b995aebba45e"></task>
>         <report_format id="5057e5cc-b825-11e4-9d0e-28d24461215b">
>           <name>Anonymous XML</name>
>         </report_format>
>       </report>
>       <filters id="">
>         <term>apply_overrides=0 min_qod=70 first=1 rows=30 sort=name</term>
>         <keywords>
>           <keyword>
>             <column>apply_overrides</column>
>             <relation>=</relation>
>             <value>0</value>
>           </keyword>
>           <keyword>
>             <column>min_qod</column>
>             <relation>=</relation>
>             <value>70</value>
>           </keyword>
>           <keyword>
>             <column>first</column>
>             <relation>=</relation>
>             <value>1</value>
>           </keyword>
>           <keyword>
>             <column>rows</column>
>             <relation>=</relation>
>             <value>30</value>
>           </keyword>
>           <keyword>
>             <column>sort</column>
>             <relation>=</relation>
>             <value>name</value>
>           </keyword>
>         </keywords>
>       </filters>
>       <sort>
>         <field>name
>           <order>ascending</order>
>         </field>
>       </sort>
>       <reports max="1000" start="1"></reports>
>       <report_count>3
>         <filtered>1</filtered>
>         <page>1</page>
>       </report_count>
>     </get_reports_response>
>
>
> I have no idea what caused this change.  Looking at openvasmd.log shows no
> errors when running the report using omp.   What would keep OMP CLI from
> generating the full report (it did in previous days so I'm not sure
> what has changed)?  The result above shows a report count of 3 but
> I've now deleted all reports except for 1 and it still only shows
> output similar to the following.  What I need is the full XML report with 
> details.
>
> Thanks in advance,
> Trent
>
>
>
>
>
> This email is confidential and intended solely for the use of the
> individual to whom it is addressed. Any views or opinions presented
> are solely those of the author, and do not necessarily represent those 
> of Next Step Innovation. If you are not the intended recipient, be
> advised that you have received this email in error, and that any use,
> dissemination, forwarding, printing or copying of this email is
> strictly prohibited. If you have received this email in error, please contact 
> the sender.


--
Dr. Jan-Oliver Wagner |  +49-541-760278-0  |  http://www.greenbone.net/ 
Greenbone Networks GmbH, Neumarkt 12, 49074 Osnabrück | AG Osnabrück, HR B
202460
Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner 
_______________________________________________
Openvas-discuss mailing list
Openvas-discuss@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss


This email is confidential and intended solely for the use of the individual to 
whom it is addressed. Any views or opinions presented are solely those of the 
author, and do not necessarily represent those of Next Step Innovation. If you 
are not the intended recipient, be advised that you have received this email in 
error, and that any use, dissemination, forwarding, printing or copying of this 
email is strictly prohibited. If you have received this email in error, please 
contact the sender.


_______________________________________________
Openvas-discuss mailing list
Openvas-discuss@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss

Reply via email to