2017 © Pedro Peláez
 

library rabbit-rabbit-cloudwatch

An AWS CloudWatch integration for pmill/rabbit-rabbit

image

pmill/rabbit-rabbit-cloudwatch

An AWS CloudWatch integration for pmill/rabbit-rabbit

  • Sunday, April 22, 2018
  • by pmill
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

pmill/rabbit-rabbit-cloudwatch

Introduction

This library is an integration for pmill/rabbit-rabbit allows you to send RabbitMQ queue counts as CloudWatch metrics when the queue counts match conditions., (*1)

Requirements

This library package requires PHP 7.1 or later, and AWS credentials that give you permission to put CLoudWatch metric data (cloudwatch:PutMetricData)., (*2)

Installation

The recommended way to install is through Composer., (*3)

# Install Composer
curl -sS https://getcomposer.org/installer | php

Next, run the Composer command to install the latest version:, (*4)

composer require pmill/rabbit-rabbit-cloudwatch

Usage

The following example send the current queue count as a metric to Amazon CloudWatch., (*5)

$config = new RabbitConfig([
    'baseUrl' => 'localhost:15672',
    'username' => 'guest',
    'password' => 'guest',
]);

$manager = new ConsumerManager($config);

$vhostName = '/';
$queueName = 'messages';
$metricName = 'queue_:queueName';

$cloudWatchClient = new CloudWatchClient([
    'version' => 'latest',
    'region' => 'eu-west-1',
    'credentials' => [
        'key' => '',
        'secret' => '',
    ],
]);

$manager->addRule(
    new CloudWatchRule(
        $vhostName,
        $queueName,
        $cloudWatchClient,
        $metricName
    ),
    new GreaterThan(0)
);

$manager->run();

Version History

0.1.0 (22/04/2018), (*6)

  • First public release of rabbit-rabbit-cloudwatch

Copyright

pmill/rabbit-rabbit-cloudwatch Copyright (c) 2018 pmill (dev.pmill@gmail.com) All rights reserved., (*7)

The Versions

22/04 2018

dev-master

9999999-dev https://github.com/pmill/rabbit-rabbit-ecs

An AWS CloudWatch integration for pmill/rabbit-rabbit

  Sources   Download

MIT

The Requires

 

api php rabbitmq aws management rules cloudwatch

22/04 2018

v0.1.0

0.1.0.0 https://github.com/pmill/rabbit-rabbit-ecs

An AWS CloudWatch integration for pmill/rabbit-rabbit

  Sources   Download

MIT

The Requires

 

api php rabbitmq aws management rules cloudwatch