PostgresQL

check_postgresql_unused_db

Description:

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

Compatible With

  • Nagios 3.x

Owner

License

GPL


Project Files
Project Notes
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)
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
36,221