Skip to main content

A statsd server that publishes to cloudwatch

Project description

This is a simple service that runs in the foreground and publishes metrics received via the statsd protocol on udp port 8125 to CloudWatch. It’s expecting to run on EC2 with an IAM Instance Profile defined.

Installation

You can install this with pip:

pip install statsd-cloudwatch

It will install a binary called statsd_cloudwatch. This will run in the foreground and listen on port 8125. To run it as a service you can use systemd or upstart.

The following snippets assuming you have created a user called statsd.

For upstart, add /etc/init/statsd.conf:

start on runlevel [2345]
stop on runlevel [!2345]
setuid statsd
setgid statsd
kill timeout 900
respawn
exec /app/bin/statsd_cloudwatch

Credentials

It is assumed that you will run this service on EC2 instances and that they will receive their credentials via the Amazon metadata service. You will need the following IAM policy:

{
    "Statement": [{
        "Action": ["cloudwatch:PutMetricData"],
        "Effect": "Allow",
        "Resource": "*"
    }]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

statsd-cloudwatch-0.0.3.zip (8.3 kB view details)

Uploaded Source

File details

Details for the file statsd-cloudwatch-0.0.3.zip.

File metadata

File hashes

Hashes for statsd-cloudwatch-0.0.3.zip
Algorithm Hash digest
SHA256 78603fef2ecdb448d3e64444e21e46a64ab82b6d9251709a4c5bf90938e47132
MD5 1a21362f23620165e27fab54d473eedd
BLAKE2b-256 1479f1ecea4badbd374b2333410c548eb5d98bdaa6f22dfec427d817c8421291

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page