We should write a base NagiosCheckSQL that would handle the query construction.