Forge Home

promtotwilio

Manage promtotwilio

331 downloads

155 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.1.0 (latest)
  • 1.0.0
released Jun 29th 2023
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet >= 6.21.0 < 8.0.0
  • , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppetfinland-promtotwilio', '1.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppetfinland-promtotwilio
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppetfinland-promtotwilio --version 1.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppetfinland/promtotwilio — version 1.1.0 Jun 29th 2023

promtotwilio

This Puppet module helps manage promtotwilio, which is "a simple and stupid program that will receive webhooks from Prometheus to send them as text message (using Twilio) with the summary of the alert."

Setup

You need a Twilio account and before using this module should test that you can send SMS manually, e.g. with curl.

Usage

Once the prerequisites of this module are taken care of, its usage is fairly straightforward:

class { 'promtotwilio':
  sid      => 'your-twilio-account-sid',
  token    => 'your-twilio-auth-token',
  sender   => 'your-twilio-phone-number',
  receiver => 'phone-number-to-send-sms-to',
  port     => 9191,
}

You can download promtotwilio from a custom URL using the url parameter, or you can place a copy of promtotwilio on your Puppet fileserver. The source parameter defines where the Puppet File resource gets the binary from.

The default listen port, 9090, may conflict with Prometheus. If you're using unpatched version of promtotwilio then port 9090 is your only choice.

To have alerts sent via SMS you need to configure Alertmanager routes in /etc/alertmanager/alertmanager.conf. Here's a simplistic example where alerts of critical severity get routed as SMS; other alerts will use default route (e.g. email).

route:
  --- snip ---
  routes:
  - match:
      severity: critical
    receiver: sms
receivers:
- name: sms
  webhook_configs:
  - url: http://127.0.0.1:9191/send