Skip to content

Instantly share code, notes, and snippets.

@Deconstrained
Deconstrained / pagerduty-agent
Last active November 1, 2018 15:38 — forked from jcurreee/pagerduty-agent
Add PagerDuty Agent notification method for Check_MK
#!/bin/bash
# PagerDuty Agent
COMMAND="/usr/bin/env - /usr/share/pdagent-integrations/bin/pd-nagios"
if [ "$NOTIFY_WHAT" = "SERVICE" ]; then
$COMMAND -n service -k $NOTIFY_PARAMETER_1 -t $NOTIFY_NOTIFICATIONTYPE -f SERVICEDESC="$NOTIFY_SERVICEDESC" -f SERVICESTATE="$NOTIFY_SERVICESTATE" -f HOSTNAME="$NOTIFY_HOSTNAME"
elif [ "$NOTIFY_WHAT" = "HOST" ]; then
$COMMAND -n host -k $NOTIFY_PARAMETER_1 -t $NOTIFY_NOTIFICATIONTYPE -f HOSTNAME="$NOTIFY_HOSTNAME" -f HOSTSTATE="$NOTIFY_HOSTSTATE"
fi
@Deconstrained
Deconstrained / get_incident_details_csv.py
Last active September 7, 2017 23:31 — forked from lfepp/get_incident_details_csv.py
Output PagerDuty incident details to a CSV
#!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the