Open-AudIT
https://www.open-audit.org/phpBB3/

Audit upload fails
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=6550
Page 1 of 1

Author:  headkick [ Tue Aug 23, 2016 3:06 am ]
Post subject:  Audit upload fails

1.12.8 running on centos 7.

I can add the linux host by running audit_linux.sh. When I run that script again, it does not upload the new audit. No errors visible. Simply not there. I can delete the record and add it again, rinse, lather, repeat. The only clue I have is in /var/log/httpd/access_log with the line "POST /open-audit/index.php/system/add_system HTTP/1.1" 500 1975 "-" "Wget/1.14 (linux-gnu)". The 500 would imply a PHP error? But, I have other clients where this works fine. I submit via curl or wget directly and I can get no errors, it shows that data is being sent but nothing gets updated in the database.

Any ideas?

Thanks,

Ric

Author:  Mark [ Tue Aug 23, 2016 9:04 am ]
Post subject:  Re: Audit upload fails

HOW are you running audit_linux.sh - on the target machine in a shell? using Discovery?
If you're running it directly on the target machine are you setting the correct parameters?
Something like the below:
[code]./audit_linux.sh submit_online=y create_file=n debugging=5 url="http://YOUR_SERVER/open-audit/index.php/system/add_system[/code]

Author:  headkick [ Tue Aug 23, 2016 11:16 pm ]
Post subject:  Re: Audit upload fails

[quote="Mark"]HOW are you running audit_linux.sh - on the target machine in a shell? using Discovery?
If you're running it directly on the target machine are you setting the correct parameters?
Something like the below:
[code]./audit_linux.sh submit_online=y create_file=n debugging=5 url="http://YOUR_SERVER/open-audit/index.php/system/add_system[/code]


Yes. Set in the script, but yes. I did that from the command line and get back a 500 Internal Server Error.

I went back and deleted a record and was able to run the script from the command line, just audit_linux.sh and it adds it just fine. I run the exact same thing a second time and it will not update the record.

Author:  jpa [ Wed Aug 24, 2016 12:38 am ]
Post subject:  Re: Audit upload fails

What about if you do
[code]./audit_linux.sh submit_online=n create_file=y[/code]
and then submit the data using the web interface: Admin -> Devices -> Add a computer (using an audit result)? Copy-Paste the data into the XML entry box and check Debug Display.

Author:  headkick [ Wed Aug 24, 2016 3:07 am ]
Post subject:  Re: Audit upload fails

Blank screen. No messages at all.

Author:  jpa [ Wed Aug 24, 2016 4:40 am ]
Post subject:  Re: Audit upload fails

Maybe you're running afoul of the new [url=https://community.opmantek.com/display/OA/Blessed+Subnets]blessed subnets[/url] feature. Admin -> Config and then set blessed_subnets_use to 'n' and see what happens.

Author:  headkick [ Wed Aug 24, 2016 5:45 am ]
Post subject:  Re: Audit upload fails

No change. This subnet is 'registered' in the installation.

I may have figured out the issue. In the script is an OrgID. I added the OrgID I had created. Apparently, you cannot do this. In a limited run so far it seems to work if I leave that "". I would have liked to set the script for each org, but that's a big deal.

Author:  jpa [ Wed Aug 24, 2016 6:26 am ]
Post subject:  Re: Audit upload fails

It works for me when I set org_id to a test organization. Maybe I'm not testing the exact code path that you are.

Author:  Mark [ Wed Aug 24, 2016 8:34 am ]
Post subject:  Re: Audit upload fails

[quote="headkick"]I may have figured out the issue. In the script is an OrgID. I added the OrgID I had created. Apparently, you cannot do this.
You should definitely be able to do this. As long as the org_id exists with the database (and you use the ID, not the name). That's what we use when you set the Org on the Discovery page(s).

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/