Skip to content
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

Monitoring support and documentation #85

Open
SuperQ opened this issue Dec 12, 2019 · 11 comments
Open

Monitoring support and documentation #85

SuperQ opened this issue Dec 12, 2019 · 11 comments

Comments

@SuperQ
Copy link

SuperQ commented Dec 12, 2019

I'm looking into this project for production use, and one thing I'm not sure about is how we can get monitoring data out of this system. We currently use pgbouncer and the pgbouncer_exporter to monitor it in Prometheus.

Is there a similar level of functionality here? Would it be possible for Odyssey to expose Prometheus data directly?

@pmwkaa
Copy link
Contributor

pmwkaa commented Dec 12, 2019

Hi,

Odyssey is mostly compatible with PgBouncer administrative console, so most likely everything will work out of the box. If something is not working, I am sure that can be easily added or fixed. It is worth to try :)

@SuperQ
Copy link
Author

SuperQ commented Dec 12, 2019

Sounds good. The pgbouncer exporter code basically runs SHOW on several subsystems.

You can see the column mapping here

@x4m
Copy link
Collaborator

x4m commented Dec 12, 2019

There's no show databases for now, but it's quite easy to add it.

@SuperQ
Copy link
Author

SuperQ commented Dec 12, 2019

While it's nice to be compatible with pgbouncer, it might be worth the effort to provide a "real" Prometheus metrics endpoint. For example, there is a C library that can be used.

This way monitor isn't in-line with database connections. It's also possible to expose a lot more interesting data than is possible with just the pgbouncer-compatible metrics. For example, Prometheus supports histograms, so relatively cheap heatmap data can be exposed from the odyssey instances.

@x4m
Copy link
Collaborator

x4m commented Dec 13, 2019

It certainly makes sense to provide "plugin system" for monitoring connections and make some examples string with Prometheus.
But adding show databases is way easier...

@x4m
Copy link
Collaborator

x4m commented Jan 20, 2020

I've implemented SHOW DATABASES in #102

@pySilver
Copy link

@x4m dumb question, but am I expected to create database for console on my own and odyssey will install required tables on its own?

@x4m
Copy link
Collaborator

x4m commented May 18, 2020

@x4m dumb question, but am I expected to create database for console on my own and odyssey will install required tables on its own?

Just add to config

storage "local" {
	type "local"
}

database "console" {
	user default {
		authentication "none"
		pool "session"
		storage "local"
	}
}

And you will be able to connect to DB console

@pySilver
Copy link

Thanks! It works.

@linuxoid69
Copy link

@x4m dumb question, but am I expected to create database for console on my own and odyssey will install required tables on its own?

Just add to config

storage "local" {
	type "local"
}

database "console" {
	user default {
		authentication "none"
		pool "session"
		storage "local"
	}
}

And you will be able to connect to DB console

Can It work with remote type?
I have tried but without success.
In my case that RDS

@pratikbin
Copy link
Contributor

Any easy way to monitor odyssey on Prometheus ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants