Page 1 of 1

OpenVAS for Postgresql

Posted: Wed Jun 21, 2017 9:24 am
by ced134
Hi,

I have installed OpenVAS onto Centos 7 from the Atomic repo. It appears to be built with SQLite3 support, (the clue being in the name /usr/sbin/openvasmd -> /usr/openvasmd-sqlite)

I need to convert to using Postgresql -- is there a ready-made exec for Centos (using the same install locations as the above) or do I need to do my own build from source?

Thanks.

Re: OpenVAS for Postgresql

Posted: Wed Jun 21, 2017 4:41 pm
by scott
I completely forgot about the postgres support in there! I'd be happy to add that in. We ran into a similar situation with OSSEC, and I think we could use the same split package setup from OSSEC (mysql or postgres support in its case) with openvasmd. That way you can avoid a postgres dependency if the system unless you're specifically using it.

Re: OpenVAS for Postgresql

Posted: Thu Jun 22, 2017 5:49 am
by ced134
That would be great, thanks.

Chris

Re: OpenVAS for Postgresql

Posted: Tue Aug 29, 2017 6:48 am
by harahauk
I am eagerly awaiting this as well. Can't seem to find binary packages with this activated.
I'll compile the manager for now, but going to watch out for updates

Thanks

Re: OpenVAS for Postgresql

Posted: Tue Sep 05, 2017 12:04 pm
by scott
yeah its spectacularly difficult to put together. So far the connector itself almost never works. Still in progress though, we'll beat it eventually

Re: OpenVAS for Postgresql

Posted: Sun Oct 01, 2017 10:37 pm
by amgroup
I have similar question on OpenVAS with PGSQL.

I used the atomic rpm OpenVAS 9.x installation. Then I ran the openvas-migrate-to-postgres. It created tables in the tasks db. That is a good sign!
Questions:
Is OpenVAS 9 RPM built to support postgres? Where can I find the rpm build options?
Where can I define the PGSQL connection for the OpenVAS to use instead of it using the default sqlite3?

I noticed that the openvasmd has the -d, --database=<file/name> Use <file/name> as database for SQLite/Postgres. If I want to use the PGSQL, how do I define this parameter? What is the valid setting here?
A DB connect would require to have a hostname/ip, database name, userid, password. How can these connection info be provided to OpenVAS so it uses the PGSQL instead of SQLite?
I also noticed that the /etc/sysconfig/openvas-manager and scanner has the OPTIONS="" . My guess is that the --database parameter could be defined here.

Thank you,

Re: OpenVAS for Postgresql

Posted: Wed Nov 08, 2017 12:18 pm
by flock3
Hi,

I would be interested in the answer to amgroups questions.
How can I proof that my OpenVAS is using the Postgres DB after I ran the migrate-to-postgres script?
Is it a good sign that my tasks.db in /var/lib/openvas/mgr/ grows? Is this the path for the new postgres DB or is this still the sqlite3 DB file!?

There seems to be not enough documentation about the whole topic ):

I'm thankfull for every helpful input I can get.

Cheers,
flock3

Re: OpenVAS for Postgresql

Posted: Tue Nov 21, 2017 10:07 am
by scott
That is the sqlite file, the postgres db would be under /var/lib/postgres/

Re: OpenVAS for Postgresql

Posted: Mon Jan 08, 2018 6:07 am
by flock3
Hi Scott,

thanks. So my OpenVAS instance keeps using sqlite.
Do you know how I can then link to the new Postgres installation?

I wasn't able to find that specific configuration step in the documentation.

Thanks in advance,
flock3