Skip to content

Instantly share code, notes, and snippets.

@ixgeek
ixgeek / smokemtr.py
Last active February 1, 2019 15:42 — forked from empireshades/smokemtr.py
Script updated to work when 'edgetrigger = yes.' Further, compensates for an apparent smokeping bug that causes the sixth arg not to pass on the 'cleared' alert.
#!/bin/env python
'''This is a script which runs an MTR (matt's traceroute)
against a target hosts - meant to be triggered by a
smokeping alert. Output is emailed and saved to log.'''
import argparse, datetime, subprocess, smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText