Code Monkey home page Code Monkey logo

pagerduty-powershell-cmdlets's Introduction

#PagerDuty PowerShell CmdLets

PowerShell CmdLets for using the PagerDuty API.

  • Send-PagerDutyEvent - allows you to send Trigger, Acknowledge and Resolve events to the PagerDuty API.
  • Get-PagerDutyEvent - gets a list of events from PagerDuty.

Requirements

  • In PagerDuty Admin Console, create a Generic API service for Send-PagerDutyEvent to use. You will need the Service API Key
  • In PagerDuty Admin Console, create an API Access Key service for Get-PagerDutyEvent to use.

Usage

  1. Open PowerShell and ensure you set your Execution Policy to allow scripts be run, for example Set-ExecutionPolicy RemoteSigned.
  2. In PowerShell, enter the directory the you downloaded the script, and dot source it . .\PagerDutyCmdLets.ps1
  3. Use the CmdLet built in help Get-Help Send-PagerDutyEvent or Get-Help Get-PagerDutyEvent

Links

pagerduty-powershell-cmdlets's People

Contributors

matthodge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pagerduty-powershell-cmdlets's Issues

PagerDutyCmdLets.ps1 is not exist

Hi There,

PagerDutyCmdLets.ps1 file does not exist so I have tried to import it as a module, but ran into the following error Import-Module : The member 'ModuleVersion' is not present in the module manifest.
adding ModuleVersion="1.1.1.1" in psd file solved it.

A few fixes for the Get-PagerDutyEvent cmdlet

Sorry, couldn't figure out how to push a branch...or even know what the right thing to do here is... Suspect part of my problem is the new v2 api?

In the PSM1 file...
Line 197: # View only Triggerd incidents should be # View only Triggered incidents
Line 199: [switch]$Triggerd, should be [switch]$Triggered,
Line 221: $query = '?statuses%5B%5D=resolved'
Line 226: $query = '?statuses%5B%5D=acknowledged'
Line 231: $query = '?statuses%5B%5D=triggered'

I made these changes locally, the Get- cmdlet now working fine. (before would just dump everything, filtering query did not work)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.