Hi,
i’m using check_oracle_health to monitor some basic oracle metrics. that works well.
Our DBAs are using an additional check script to monitor some deeper metrics (especially to monitor Oracle RAC). Now i want to include these additional checks into Icinga.
Some of the required arguments like DB instance, username and password are already defined in the host object (for use with check_oracle_health). Now i want to use them in a new apply service with my custom command. but how can i do that?
Host Object:
object Host "scan-listener-xyz.localdomain" { import "generic-host" address = "scan-listener-xyz.localdomain" vars.dbtype = "oracle-rac" vars.db_instances["DB1"]= { oracle_health_username = "icinga" oracle_health_password = "pw1" } vars.db_instances["DB2"]= { oracle_health_username = "icinga" oracle_health_password = "pw2" } vars.db_instances["DB3"]= { oracle_health_username = "icinga" oracle_health_password = "pw3" }
Service:
apply Service "RAC Diskgroup " for (db => config in host.vars.db_instances) { import "generic-service" check_command = "oracle_rac_check" vars.plugin_db = db vars.plugin_mode = "check_diskgroup" vars.plugin_user = ????host.vars.db_instances.????.oracle_health_username???? vars.plugin_password = ????host.vars.db_instances.????.oracle_health_password???? vars += config display_name = "[" + db + "]" + " Diskgroups" assign where host.vars.dbtype == "oracle-rac" }
Btw…i’ve created a custom command and the check is working if i enter a string into vars.plugin_user & vars.plugin_password.