Update in: 5 March 2024
Important Notice: This plugin is no longer actively maintained or updated. We strongly advise you to explore alternative plugins available in our library for the latest features and support.
This agent plugin is monitoring AWS-RDS Postgre using AWS API (std and CloudWatch) as well as direct SQL queries to Postgre. The plugin is written in Perl and it using an external configuration file. Some information like the version and the RDS space are stored in the inventory.
Installation pre-requisites:
-
On AWS
- Go to IAM
- Create a policy PANDORA-Monitoring
- Assign full read access to RDS and CloudWatch objects to this policy
- Create a user and assign him the created policy.
-
On the PANDORA agent
- Configure the AWS credentials in the home directory of the user running the agent
- https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
- Create the directory .aws; then create the file credentials
- ~/.aws/credentials
[default]
aws_access_key_id=…SFODNN7E…
aws_secret_access_key=…..ENG/bPxRfiCYEXAMPLEKEY
- Install a postgre client
- sudo yum install postgresql
- Install these Perl modules: Paws, Data::Dumper, DBI, DBD::Pg, Time::Local
- sudo yum install perl-DBD-Pg
- cpan i Paws
- Configure the AWS credentials in the home directory of the user running the agent
-
On the PANDORA console (default configuration)
- Create the agent group RDS-Postgre
- Create the OS RDS-Postgre
- Create these 3 modules groups: AWS-RDS Information, Postgre Information, AWS-RDS Calculated Information
- Create these 2 inventory modules:
- Postgre_Version
- OS: RDS-Postgre
- Format: version;sub-version
- RDS_Space
- OS: RDS-Postgre
- Format: Allocated_Storage_GB
- Postgre_Version
- Create a collection named Baseline_RDS-Postgre
- short name: Baseline_RDS-Postgre
- collection files: the ones contained in Baseline_RDS-Postgre
- Create a Policy named EC_RDS-Postgre
- collection: Baseline_RDS-Postgre
- plugin: /usr/share/pandora_agent/collections/Baseline_RDS-Postgre/AWS-RDS_Postgre_Monitoring.pl /usr/share/pandora_agent/collections/Baseline_RDS-Postgre/pandora_aws-rds_postgre.conf
Usage
Configuration
You can change the default configuration in the log file.
If executed manually, I advise you to set in both files the variable LOGGING to 1, so the messages are display on the screen and not send to the log file.
If the DEBUG is used, set it to 1 on both files. In that case, XML data files are not deleted from the agent data_in (xml_path variable) directory.
Execution
To execute:
- distribute the policy on a target agent.
- execute it manually ./AWS-RDS_Postgre_Monitoring.pl ./pandora_aws-rds_postgre.conf