-
Notifications
You must be signed in to change notification settings - Fork 281
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
Plugin(database::postgres::plugin) - mode(backends): Add an option to take into account the sum of connections from all databasess. #5350
Comments
Hello :) If I understand correctly what is returned by the query of this plugin, we should have an extract of this form? (I don't have a dataset on which to check the query)
If so, I have a plugin return looking like this with
So if all this is correct, I'm not sure I understand what you mean by "It calculates a percentage per database while max_connections is defined for all databases."?
And for the enhancement suggestion "An option should be added to take into account the sum of connections from all databasess." Do you mean something that would give a "total connections" in this style of return?
|
Hello I have many databases : current datname max_connections 100 Plugin : warning 80 In this situation all new connections are blocked (without critical alert) because : sum(current) = max_connections So, the only important return to avoid that is the percentage total of connections compared to the max_connections. Regards |
Hello, I'm interested in this development request. Indeed, the sum of connection would be a must have. SELECT by SELECT this is used to output the total number of connections, on all bases, even if excluded. /usr/lib/centreon/plugins/centreon_postgresql.pl --plugin=database::postgres::plugin --mode=backends --host=XXX.XXX.XXX.XXX --username='postgres' --password='' --port='5432' --database='' --warning='90' --critical='95' --exclude='^((postgres|template1|template0))' --verbose OK: All client database connections are ok | 'app1#database.clients.connected.count'=10;0:450;0:475;0;500 'app2#database.clients.connected.count'=10;0:450;0:475;0;500 'Total#database.clients.connected.count'=23;0:450;0:475;0;500 Regards |
Hello :) @Emanuel-Bourel thank you for your contribution 🙏 , we'll take a look at your solution (maybe the inclusion of inactive connections would be set using an option) and validate if it solve this mix of thresholds bug and enhancement request. |
Hello
I dont understand this mode.
It calculates a percentage per database while max_connections is defined for all databases.
An option should be added to take into account the sum of connections from all databasess.
Regards
The text was updated successfully, but these errors were encountered: