go-pdagent

command module
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

Note: This project is currently in beta, for the current Python-based agent see: https://github.com/PagerDuty/pdagent

PagerDuty Agent

An agent daemon to aid in creating PagerDuty events.

Goals of this project include providing:

  • A command-line interface for creating PagerDuty events.
  • A local entry point for PagerDuty's Events API.
  • Ensuring that events are properly ordered for each integration.
  • Handling back pressure or when PagerDuty is inaccessible.

If you're looking for a more comprehensive PagerDuty API Go client library and CLI, see: https://github.com/PagerDuty/go-pagerduty

Installation

Binaries for our officially supported platforms can be found on the releases page.

Usage

On first run we recommend running pdagent init to generate a default config file. By default this file will live in ~/.pdagent along with any other artifacts.

Once the config has been created, to start the daemon:

pdagent server

There are a number of other commands available that are listed as part of the command's help command:

pdagent help

Perhaps the most common command, sending events:

pdagent enqueue \
  -k your_key_goes_here \
  -t trigger \
  -d "This is only a test" \
  -u "http://pagerduty.com" \
  -e "error" \
  -f some_field=some_value

Architecture

pdagent architecture diagram

At a high level, the agent has three key components:

  • Server: The daemon itself where most of the heavy lifting occurs.
  • Client: An HTTP client to simplify making requests against the server.
  • CLI: A command line tool for working with both the server and client commands.

Development

Looking to contribute? See development for some helpful tips.

Current Status

This project aims to eventually replace the existing pdagent project, but with some goals in mind before doing so:

  • Events API V1 support.
  • Events API V2 support.
    • Parity with existing pd-send functionality.
    • Comprehensive Events API V2 payload support (no links / images yet).
  • HTTP configuration.
    • Custom cert files.
    • Proxy and firewall support.
    • Local server security.
  • Event queuing.
  • Persistent queuing.
  • Legacy command wrappers.
    • pd-send
    • pd-queue
  • Releasing
    • Init and pre/post install scripts.
    • Github release support.
      • Source
      • Darwin
      • Linux (deb/rpm)
      • Checksums.
      • Signature files.
    • deb repo support.
    • rpm repo support.
      • Signed packages.
  • pdagent-integrations support.
    • pd-nagios
    • pd-sensu
    • pd-zabbix

Documentation

Overview

Copyright © 2020 PagerDuty, Inc. <info@pagerduty.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL