Use max_dbs_open to set warning and critical levels for open dbs graph
Remove unused variable