Skip to content
Permalink
Browse files

Merge pull request #8 from jbjouvin/add_endpoint_plugin_update_readme

add endpoint plugin
  • Loading branch information...
iksaif committed Aug 28, 2018
2 parents 434712e + 4444914 commit 6db223de9c4f9eb23439023009dfd739fee84f78
Showing with 25 additions and 2 deletions.
  1. +25 −2 defcon/plugins/README.md
@@ -58,8 +58,6 @@ Module: `defcon.plugins.alertmanager.AlertmanagerPlugin`

To be used to set defcon based on alerts.

## Static

```python
{
'api': 'http://alertmanager:9090/api/v1', // Url to root API.
@@ -72,6 +70,31 @@ To be used to set defcon based on alerts.
}
```

# Endpoint

Module: `defcon.plugins.endpoint.EndpointPlugin`

To be used to set defcon based on Endpoint.


```python
{
'url': 'http://endpoint/api/v1', // Url to API.
}
```

response of the API have to be like the simple defcon API:

```json
{
"name": "Production",
"contact": "production@prod.com",
"link": "https://confluence/production+Home",
"defcon": 3,
"description": "fooo"
}
```

## Write you own plugin.

Take a look at [static.py](static.py), basically you need to implement the `statuses` method of a `Plugin` sub-class to make it return a list of status based on the settings you receive.

0 comments on commit 6db223d

Please sign in to comment.
You can’t perform that action at this time.