diff --git a/nagios/bin/pmp-check-aws-rds.py b/nagios/bin/pmp-check-aws-rds.py index 57b7834..39096c0 100755 --- a/nagios/bin/pmp-check-aws-rds.py +++ b/nagios/bin/pmp-check-aws-rds.py @@ -98,7 +98,7 @@ def debug(val): """Debugging output""" global options if options.debug: - print 'DEBUG: %s' % val + print('DEBUG: %s' % val) def main(): @@ -155,6 +155,12 @@ def main(): 'db.t2.large': 8, 'db.t2.xlarge': 16, 'db.t2.2xlarge': 32, + 'db.t3.micro': 1, + 'db.t3.small': 2, + 'db.t3.medium': 4, + 'db.t3.large': 8, + 'db.t3.xlarge': 16, + 'db.t3.2xlarge': 32, 'db.m3.medium': 3.75, 'db.m3.large': 7.5, 'db.m3.xlarge': 15, @@ -222,7 +228,7 @@ def main(): sys.exit() elif options.db_list: info = rds.get_list() - print 'List of all DB instances in %s region(s):' % (options.region,) + print('List of all DB instances in %s region(s):' % (options.region,)) pprint.pprint(info) sys.exit() elif not options.ident: @@ -233,7 +239,7 @@ def main(): if info: pprint.pprint(vars(info)) else: - print 'No DB instance "%s" found on your AWS account and %s region(s).' % (options.ident, options.region) + print('No DB instance "%s" found on your AWS account and %s region(s).' % (options.ident, options.region)) sys.exit() elif not options.metric or options.metric not in metrics.keys(): @@ -356,7 +362,7 @@ def main(): try: storage = db_classes[info.instance_class] except: - print 'Unknown DB instance class "%s"' % info.instance_class + print('Unknown DB instance class "%s"' % info.instance_class) sys.exit(CRITICAL) free = '%.2f' % (free / 1024 ** 3) @@ -382,12 +388,12 @@ def main(): # Final output if status != UNKNOWN and perf_data: - print '%s %s | %s' % (short_status[status], note, perf_data) + print('%s %s | %s' % (short_status[status], note, perf_data)) elif status == UNKNOWN and not options.forceunknown: - print '%s %s | null' % ('OK', note) + print('%s %s | null' % ('OK', note)) sys.exit(0) else: - print '%s %s' % (short_status[status], note) + print('%s %s' % (short_status[status], note)) sys.exit(status)