Hi
I am monitoring RDS Instances using this plugin https://manpages.org/pmp-check-aws-rdspy/7#description
Script can be found here https://github.com/percona/percona-moni ... aws-rds.py
It's working for all RDS instances except anything in the eu-west-3 region.
I am not so confident with Python and need some help.
Error message I am getting back is
Traceback (most recent call last):
File "/usr/local/nagios/libexec/./check_rds_baseline.py", line 404, in <module>
main()
File "/usr/local/nagios/libexec/./check_rds_baseline.py", line 232, in main
info = rds.get_list()
File "/usr/local/nagios/libexec/./check_rds_baseline.py", line 68, in get_list
result[reg] = rds.get_all_dbinstances()
AttributeError: 'NoneType' object has no attribute 'get_all_dbinstances'
Monitoring RDS Instances
Re: Monitoring RDS Instances
Hello KentBa,
Have you renamed the script from pmp-check-aws-rdspy.py to check_rds_baseline.py?
If so, based on the following it looks like your connection failed, causing rds to be null since the connection failed:
You should check your AWS credentials for that region and ensure that your permissions are consistent. It's also possible that your connection to that region is poor or broken. You may also need to update your Boto library. You could try adding a print statement such as the following to the exception:
Have you renamed the script from pmp-check-aws-rdspy.py to check_rds_baseline.py?
If so, based on the following it looks like your connection failed, causing rds to be null since the connection failed:
Code: Select all
try:
rds = boto.rds.connect_to_region(reg, profile_name=self.profile)
result[reg] = rds.get_all_dbinstances()Code: Select all
except (boto.provider.ProfileNotFoundError, boto.exception.BotoServerError) as msg:
print("Error connecting to region {}: {}".format(reg, msg))
debug(msg)Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Re: Monitoring RDS Instances
Thanks, yes I renamed the script.
AWS credentials are okay, the credentials are not region specific and do work for all other regions. I am also using the credentials for other Cloudwatch checks for this region in Nagios.
It's almost like the boto library doesnt' think eu-west-3 exists. I will try updating it.
AWS credentials are okay, the credentials are not region specific and do work for all other regions. I am also using the credentials for other Cloudwatch checks for this region in Nagios.
It's almost like the boto library doesnt' think eu-west-3 exists. I will try updating it.
Re: Monitoring RDS Instances
I am using
pip show boto3
Name: boto3
Version: 1.26.122
pip show boto3
Name: boto3
Version: 1.26.122
Re: Monitoring RDS Instances
Have you verified the integrity of the eu-west-3 server? If there is something wrong with the server or its configuration, that might explain why Boto is unable to connect to it.
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Re: Monitoring RDS Instances
It's not just one server, it's all of them. Infact I can't even list any instances in the eu-west-3 region the -L parameter . The same thing happens for ap-southeast-3 or if I try to do it, and I get the same error when trying to list a region that doesn't exist.