In DB2 the standard plugin used is check_db2_health of consule labs.
Our scenario:
We have 10 - 12 DBs instance on same server. Each instance may be on different version. Since the current plugin uses DBI connection and DB2:DBI library need to be compiled for specific version of DB2 this becomes roadblock when DB2 has multiple version in the same server.
So long history short what we want to do is ![]()
Option 1:
- Capture the DB instance passed
- Execute the DB2 Profile for that instance - somehow in the command (but db2profile is instance specific - icinga user can execute it (Linux)) - how to dynamically build command based on different db2profile
- Then execute the check_db_health
Option 2
Or
Possibly in the command itself execute the script as the instance owner but again dynamically capture instance owner.
Give sudo permission to command for icinga user
sudo -u $instance$ -c “check_db2_health”
The instance should be dynamic for each DB instance passed by argument from the service.
All configuration done in Director
Regards