Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
This plugin finds the number of unused databases, that is, the databases that have created or not been accessed or modified a certain time ago.
Current Version
1.0
Last Release Date
2013-07-18
Owner
Rumman DBA
Website
http://www.rummandba.com/2013/06/nagios-script-to-find-unused-databases.html
Download URL
https://github.com/irumman/check_postgres_unused_db
License
GPL
Compatible With
It uses plpythonu language to create a function named "check_pg_unused_db_f" in the db to find out the directory status of the databases and uses the following query:
SELECT OID, datname, replace(check_pg_unused_db_f('"$TIME_MODE"', OID::int ),' ','_') as check_time FROM pg_database WHERE datallowconn and NOT datistemplate and datname NOT IN ('postgres')
If check_time is greater than the described value for unused criteria, it counts to increment one and if the count is greater than critical or warning value it gives alert.
The following parameters are used to define the unused database :- -m --mode mode of time to check with current time to mark as unused (c = create, a = access, m = modified; default : a) -t --time number of times after that database should be marked as unused -x --units units of measurement to compare (s = seconds; m = minutes; h = hours; D = days; M = months; Y = year)
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!