Skip to main content

Allow argus-server to create tickets in Github

Project description

argus_ticket_github

This is a plugin to create tickets in Github from Argus

Settings

  • TICKET_PLUGIN: "argus_ticket_github.GithubPlugin"

  • TICKET_ENDPOINT: "https://github.com/" or link to self-hosted instance, absolute URL

  • TICKET_AUTHENTICATION_SECRET: Create a personal access token with the scope repo:

    {
        "token": token
    }
    

    It is recommended to create a Github API user and to ensure that that user has the necessary authorization for creating issues in the relevant repository.

  • TICKET_INFORMATION:

    Project namespace and name (obligatory)

    {
        "project_namespace_and_name": project_namespace_and_name
    }
    

    To know which project to create the ticket in the Github API needs to know the owner and name of it. The owner is the user or organization the Github repository belongs to and the name is the name of the Github project.

    For the Github project Hello Git World the dictionary would look like this:

    {
       "project_namespace_and_name": "githubtraining/hellogitworld",
    }
    

    Labels (optional)

    There are two ways of automatically filling labels:

    1. Labels that are always the same, independent of the incident. These will be set in labels_set.

      {
          "labels_set" : [
              label1,
              label2,
              label3,
          ]
      }
      
    2. Labels that are filled by attributes of the Argus incident. These are set in labels_mapping which is a list of the names of the attributes as they are returned by the API (e.g. start_time). If the information can be found in the tags the it has to be a dictionary with tag as the key and the name of the tag as the value (e.g. {"tag": "host"}).

      {
          "labels_mapping" : [
              attribute_of_incident,
              {"tag": name_of_tag},
          ]
      }
      

Code style

argus_ticket_github uses black as a source code formatter. Black can be installed by running

$ pip install black

A pre-commit hook will format new code automatically before committing. To enable this pre-commit hook, run

$ pre-commit install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

argus_ticket_github-1.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file argus_ticket_github-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for argus_ticket_github-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c6539f5f8aa8f0f7b56d1daf65e37588d5aa47c8c5bf546b3b9394e9cc1b4f3
MD5 44b40aba20554a39bed001d9d92bca79
BLAKE2b-256 93f8b1b23e80974c1803e3bbb409ce535f836081b713b886205bd4a9bf0ec7d2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page