Skip to main content

Python script that allows you to subscribe to Arista Telemetry events and then send them to an SMTP server for email notifications.

Emails are sent for events that occur while the alerter is running—you won’t get alerts for past events.

We recommend you set up email filters to limit notifications. For example, you can set up filters to ignore “INFO” events based on the email subject.

Installation

Python 2.7 and pip are required.

You can download the alerter via pip by running pip install telemetry-email-alerter.

Usage

You can start up the alerter by running:

telemetry-email-alerter <telemetry-server> <smtp-server> <email-1> <email-2> ... <email-n>

The full list of arguments accepted by the script are listed below.

Name

Required?

Default

Description

telemetryUrl

yes

The IP address or hostname of your CVP Telemetry instance

smtpServer

yes

The IP address or hostname of your SMTP (email) server

sendToAddress

yes

The emails to send notifications to. You can specify multiple emails

–sendCcAddress a@example.com b@example.com

no

Emails to CC notifications for. You can specify multiple emails

–port 1234

no

465

The port your SMTP server listens to if it use a non-standard port

–subjectPrefix ‘CVP Alert’

no

[CloudVision Telemetry]

A message to prepend to email subjects

–noSmtpSsl

no

off (SSL is used)

Disable SSL for SMTP connections

–smtpUsername a@example.com

no

SMTP server username if authentication is required

–smtpPassword secret

no

SMTP server password if authentication is required. You will be prompted at startup if this is not provided

–noTelemetrySsl

no

off (SSL is used)

Disable SSL for Telemetry connections

–telemetryUsername example

no

Telemetry username if authentication is required

–telemetryPassword secret

no

Telemetry password if authentication is required. You will be prompted at startup if this is not provided

–noSslValidation

no

off (validation is used)

Disables validation of SSL certificates. For debugging purposes. Not advised to use in real environments

–verbose

no

off

Show logging messages

Using an SMTP server

We recommend you use an SMTP server you run and maintain yourself. Your company might have one you can use.

Alternatively you can use the Gmail SMTP server. You can use your Gmail username and an app password. Be aware of its send limits though—it’s certainly possible you might exceed them.

Development info

You will need Python 2.7 with pip and virtualenv. You can read more about these in the Python packaging documentation. Create a virtualenv to house the dependencies of this project. Once that’s done, you can install dependencies by running pip install -r requirements.pip from the project root.

You can test email notifications by using the Gmail SMTP server mentioned in Using an SMTP server. Alternatively you can use an app like mailslurper on your machine locally.

To run the script locally, you can run the telemetry_email_alerter package from the project root:

python telemetry_email_alerter [...args]

Release files for telemetry-email-alerter 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for telemetry-email-alerter 1.0.7
File Size Uploaded
telemetry_email_alerter-1.0.7.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for telemetry-email-alerter 1.0.7
File Interpreter ABI Platform
telemetry_email_alerter-1.0.7-py2.7.egg Legacy Egg format - - Details

Total release size: 22.6 kB

Release files / telemetry_email_alerter-1.0.7.tar.gz

Download URL telemetry_email_alerter-1.0.7.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
469743666b480f7bda078b2e9b87069e0338189d5aada36328d5423620b6da60
BLAKE2b-256 checksum
How to use checksums
1f28e6c96a3b519f8c185c87b786fa9402b66106f270ff62bcceaf6332cad369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / telemetry_email_alerter-1.0.7-py2.7.egg

Download URL telemetry_email_alerter-1.0.7-py2.7.egg
Size 13.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
a17b63ec62f1f0bd7cac920aa7d2bac902209d179635fffaaf269716c97bcdd3
BLAKE2b-256 checksum
How to use checksums
286b6f0bebd72f7a3c6ab5e8b3189cedb2ab6a98c392ce1851933894a136546e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

1 release file

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page