Guys ,
Thank you all but i resolved the issue .
let me share with you the solution.
When you run the script with nagios / root you must create a file called .boto in the home directory with the accessKey & SecretKey.
BUT when nagios run the script like daemon we need to use another method that include the AccessKey & SecretKey inside the script.
Code: Select all
Cloudwatch_Connection_Virginia = boto.ec2.cloudwatch.CloudWatchConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, True, None, None, None, None, None, 0, None)
AFTER THAT
Code: Select all
Alarm_Virginia = Cloudwatch_Connection_Virginia.describe_alarms(None, None, None, None, "ALARM", None
Now everything is working fine
Thank you all for your great help !!!!!