Skip to main content

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.

Monitoring Connector Assets​

Monitored Objects​

  • Filesystems

Discovery Rules​

This pack provides a host discovery rule:

Rule nameDescription
Cloud-Aws-Efs-Api-HostDiscoveryDiscover File Systems from your Cloudwatch endpoint

Collected Metrics​

More information about collected metrics is available in the official Amazon documentation: https://docs.aws.amazon.com/efs/latest/ug/monitoring-cloudwatch

Metric nameDescription
ClientConnectionsThe number of client connections to a file system. Unit: Count

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 PrivilegeDescription
elasticfilesystem:DescribeFileSystemsList all EFS Filesystems IDs
cloudwatch:listMetricsList all metrics from Cloudwatch AWS/EFS namespace
cloudwatch:getMetricStatisticsGet 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.

yum install perl-Paws

Installation​

  1. Install the Centreon Plugin on every poller monitoring EFS ressources:
yum install centreon-plugin-Cloud-Aws-Efs-Api
  1. On Centreon Web interface in Configuration > Monitoring Connector Manager, install the "Amazon EFS" Monitoring Connector

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:

MandatoryNameDescription
XAWSSECRETKEYAWS Secret key of your IAM role. Password checkbox must be checked
XAWSACESSKEYAWS Access key of your IAM role. Password checkbox must be checked
XAWSREGIONRegion where the instance is running
XAWSCUSTOMMODECustom mode to get metrics, 'awscli' is the default, you can also use 'paws' perl library
XAWSFILESYSTEMIDName of the FileSystem to be monitored
PROXYURLConfigure proxy URL information
EXTRAOPTIONSAny extraoptions you may want to add to every command_line (eg. a --verbose flag)
DUMMYSTATUSHost state. Default is OK, do not modify it until you know what you are doing
DUMMYOUTPUTHost 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 proxyurlhave 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