Amazon EFS
Overviewβ
Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed elastic NFS file system for use with AWS Cloud services and on-premises resources. It is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files, eliminating the need to provision and manage capacity to accommodate growth.
Plugin Pack Assetsβ
Monitored Objectsβ
- Filesystems
Discovery Rulesβ
This pack provides a host discovery rule:
- Hosts
- Services
Rule name | Description |
---|---|
Cloud-Aws-Efs-Api-HostDiscovery | Discover File Systems from your Cloudwatch endpoint |
No services discovery rule available on this pack
Collected Metricsβ
More information about collected metrics is available in the official Amazon documentation: https://docs.aws.amazon.com/efs/latest/ug/monitoring-cloudwatch
- Connections
- Data Usage
Metric name | Description |
---|---|
ClientConnections | The number of client connections to a file system. Unit: Count |
Metric name | Description |
---|---|
DataReadIOBytes | The number of bytes for each file system read operation. Unit: Bytes |
DataWriteIOBytes | The number of bytes for each file write operation. Unit: Bytes |
MetadataIOBytes | The number of bytes for each metadata operation. Unit: Bytes |
TotalIOBytes | The number of bytes for each file system operation, including data read, data write, and metadata operations. Unit: Bytes |
BurstCreditBalance | The number of burst credits that a file system has. Burst credits allow a file system to burst to throughput levels above a file systemβs baseline level for periods of time. Unit: Bytes |
Prerequisitesβ
AWS Privilegesβ
Whether using a service account or a dedicated monitoring account to monitor Cloudwatch metrics, the following rights have to be granted to the IAM role (accesskey/secretkey):
AWS Privilege | Description |
---|---|
elasticfilesystem:DescribeFileSystems | List all EFS Filesystems IDs |
cloudwatch:listMetrics | List all metrics from Cloudwatch AWS/EFS namespace |
cloudwatch:getMetricStatistics | Get metrics values from Cloudwatch AWS/EFS namespace |
Plugin dependenciesβ
To interact with Amazon APIs, you can use either use awscli binary or paws, a perl AWS SDK (recommended). You must install it on every poller that will monitor AWS resources.
Warning At the moment it is not possible to use perl-Paws if you are using a proxy to talk with AWS Cloudwatch APIs.
- perl-Paws-installation
- aws-cli-installation
yum install perl-Paws
yum install awscli
Installationβ
- Online License
- Offline License
- Install the Centreon Plugin on every poller monitoring EFS ressources:
yum install centreon-plugin-Cloud-Aws-Efs-Api
- On Centreon Web interface in "Configuration > Plugin packs > Manager", install the "Amazon EFS" Plugin-Pack
- Install the Centreon Plugin on every poller monitoring EFS ressources:
yum install centreon-plugin-Cloud-Aws-Efs-Api
- Installer the Centreon Plugin-Pack from the RPM:
yum install centreon-pack-cloud-aws-efs.noarch
- On Centreon Web interface in "Configuration > Plugin packs > Manager", install the "Amazon EFS" Plugin-Pack:
Configurationβ
Adding a host into Centreon, link it to the template named "Cloud-Aws-EFS-custom". Once the template applied, some macros have to be configured:
Mandatory | Name | Description |
---|---|---|
X | AWSSECRETKEY | AWS Secret key of your IAM role. Password checkbox must be checked |
X | AWSACESSKEY | AWS Access key of your IAM role. Password checkbox must be checked |
X | AWSREGION | Region where the instance is running |
X | AWSCUSTOMMODE | Custom mode to get metrics, 'awscli' is the default, you can also use 'paws' perl library |
X | AWSFILESYSTEMID | Name of the FileSystem to be monitored |
PROXYURL | Configure proxy URL information | |
EXTRAOPTIONS | Any extraoptions you may want to add to every command_line (eg. a --verbose flag) | |
DUMMYSTATUS | Host state. Default is OK, do not modify it until you know what you are doing | |
DUMMYOUTPUT | Host check output. Default is 'This is a dummy check'. Customize it with your own if needed |
FAQβ
How to check in the CLI that the configuration is OK and what are the main options for ?β
Once the plugin installed, log into your poller using the centreon-engine user account and test by running the following command (Parameters such as name
and proxyurl
have to be adjusted):
/usr/lib/centreon/plugins//centreon_aws_efs_api.pl \
--plugin=cloud::aws::efs::plugin \
--mode=connections \
--custommode='awscli' \
--aws-secret-key='*******************' \
--aws-access-key='**********' \
--region='eu-west-1' \
--name='fs-1234abcd' \
--proxyurl='http://myproxy.mycompany.org:8080'
--filter-metric='' \
--statistic='average' \
--timeframe='600' \
--period='60' \
--warning-client-connections='25' \
--critical-client-connections='50' \
--verbose
OK: 'fs-1234abcd' Statistic 'Sum' Metrics ClientConnections: 19.00 | 'client-connections_sum'=19;;;;
EFS FileSystemId'fs-1234abcd'
Statistic 'Sum' Metrics ClientConnections: 19.00
The command above gets the number of client connections (--mode=connections
) on the fs-1234abcd filesystem (--name='fs-1234abcd'
). This filesystem is hosted on the eu-west-1 AWS region cloud (--region='eu-west-1'
). The calculated metric is a sum of values (--statistic='sum'
) on a 600 secondes / 10 min period (--timeframe='600'
) with one sample per 60s / 1 minute (--period='60'
).
This command would trigger a WARNING alert if the calculated value raises beyond 25 and a CRITICAL value beyond 50.
All the options that can be used with this plugin can be found over the --help
command:
/usr/lib/centreon/plugins//centreon_aws_efs_api.pl --plugin=cloud::aws::efs::plugin --mode=connections --help
Why do I get the following result UNKNOWN: No metrics. Check your options or use --zeroed option to set 0 on undefined values
?β
This command result means that Amazon Cloudwatch does not have any value for the requested period.
This result can be overriden by adding the --zeroed
option in the command. This will force a value of 0 when no metric has been collected and will prevent the UNKNOWN error message