-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STEAMPIPE_WORKSPACE_DATABASE is not honored #3537
Comments
@foolioo the
More or less every steampipe command is designed to interact with a remote steampipe service. However, two command sets only operate as servers. These are:
The If I am understanding your use case correctly, the following should get you unblocked:
It looks like it is not clear in our documentation on how the We have opened an issue at #3542 to put it on the roadmap. |
@binaek Thank you for the clarification. When using an external database, the relations (tables) do not exist and it causes Steampipe to fail. When using an external database, what needs to be done for the relations to be created? Is there a way to tell Steampipe to prepare\initialize\migrate the database? |
@binaek Any idea how to solve #3537 (comment)? |
Hi @foolioo Could you expand a bit on what you mean by an external database? Is it a remote steampipe service? The steampipe tables cannot be initialised in a standard installation of postgresql. This is because the steampipe service has a special purpose FDW which is used to communicate with the API plugins. If you could expand on what you are trying to achieve, maybe we can suggest alternative approaches? |
@binaek Basically, trying to decouple between Steampipe and Postgres, such that Steampipe runs on one node and Postgres run on other node, where Steampipe can access the Postgres. Utilizing All I want is to make Steampipe work while providing it with an external Postgres, but it fails since the tables do not exist. |
@binaek Any guidance? |
@binaek friendly ping |
Hi @foolioo apologies for the tardiness. Steampipe is not designed to work with an external Postgresql instance. The core of steampipe is an FDW along with a plugin and connection manager daemon. Having said that, you can start steampipe as a service. When you start steampipe as a service, it behaves as a postgresql database that you can connect to using any postgresql client. |
@binaek Any plans to support an external database? |
Not that I am aware of. Having said that, bear in mind that under the hood steampipe is just your neighbourly Postgresql instance. It has it's own public schema which is made available for writes. Unless you are trying to use a cloud specific database (Aurora and sorts), steampipe should fit most other use cases. |
Looking back at this, you can run Steampipe as a service ( That should work for you |
@binaek There is only a 1 node in your proposal (
Please clarify |
@binaek friendly ping |
@foolioo You run |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Describe the bug
The documentation says that Steampipe can connect to an external database by using
STEAMPIPE_WORKSPACE_DATABASE
environment variableBut Steampipe seems not to honor the value since when the service is up, regardless of the value of
STEAMPIPE_WORKSPACE_DATABASE
, Steampipe still printsHost(s): localhost, 127.0.0.1, 172.20.0.2 Port: 9193 Database: steampipe User: steampipe Password: ********* [use --show-password to reveal] Connection string: postgres://steampipe@localhost:9193/steampipe
While there is no options set in neither workspace configuration, nor database configuration
Steampipe version (
steampipe -v
)To reproduce
Set a connection string for
STEAMPIPE_WORKSPACE_DATABASE
environment variable and start Steampipe serviceThen connect to the database and list the relations
And when looking at the processes, Steampipe did launch the local Postgres server that holds the tables and data
Expected behavior
Steampipe should honor the database connection string provided by
STEAMPIPE_WORKSPACE_DATABASE
environment variable.Plus, it would be lovely if Steampipe would not start a local Postgres database if external one is provided.
Additional context
Note that the external database is not a part of Steampipe Cloud but the issue is the same when providing database connection string to Steampipe Cloud
The text was updated successfully, but these errors were encountered: