Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 4:03 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: Audit upload fails
PostPosted: Tue Aug 23, 2016 3:06 am 
Offline
Newbie

Joined: Fri Apr 05, 2013 12:51 am
Posts: 17
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


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Tue Aug 23, 2016 9:04 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
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]

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Tue Aug 23, 2016 11:16 pm 
Offline
Newbie

Joined: Fri Apr 05, 2013 12:51 am
Posts: 17
[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.

Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Wed Aug 24, 2016 12:38 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Wed Aug 24, 2016 3:07 am 
Offline
Newbie

Joined: Fri Apr 05, 2013 12:51 am
Posts: 17
Blank screen. No messages at all.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Wed Aug 24, 2016 4:40 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Wed Aug 24, 2016 5:45 am 
Offline
Newbie

Joined: Fri Apr 05, 2013 12:51 am
Posts: 17
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Wed Aug 24, 2016 6:26 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Audit upload fails
PostPosted: Wed Aug 24, 2016 8:34 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
[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).

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group