Comments (3)
Okay, so I finally figured this out and I'm going to leave behind how I actually resolved this on my own for "the next guy". ;)
Here's the exact curl that I used to create an incident in OpenDuty:
curl --insecure -H "Content-type: application/json" -H "Authorization: token thisismysecret" -X POST -d '{"service_key":"b893c504c51c26c720056ed94ec53049b9b9d0a4","event_type":"trigger","description":"test","incident_key":"1234567","details":"Details here"}' http://192.168.0.92:9080/api/create_event
Now, just to break this down, here's where each bit comes from:
"Authorization: token thisismysecret" comes from the settings file, specifically, I have this set in my openduty.settings_dev file:
SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'thisismysecret'
The "service_key" comes from first creating a service, and then creating an API key for the service. In this case, I named my service "Nagios" which had a "Service ID" of "84b689a038614539ad37582519de207e" and I then created the API Key by the name of "nagios_api_key" that ended up being "b893c504c51c26c720056ed94ec53049b9b9d0a4".
Hope this helps someone and that I wasn't just being dense. :)
from openduty.
we have to create first the service ? :(
from openduty.
@gabrielfsousa Yes, you have to create the Schedule, Escalation policy, Service and the API Key in order to be able to send via the API.
from openduty.
Related Issues (20)
- How to do Zabbix Integration HOT 2
- How to integrate edit of occurrence of event rather than complete event HOT 1
- Twilio integration HOT 2
- Question: Is there a mobile application? HOT 1
- OpenLDAP Integration
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-m4sQWU/mercurial/ HOT 1
- cant create event HOT 15
- Demo environment code is not up-to date
- Doubt and FYI: Adding Drupal 7 support
- pip install throwing exception HOT 2
- Unable to start celery worker "ImportError: No module named models"
- Email integration for creating Incidents HOT 2
- Service retry not happening
- Kapacitor/Chronograf integration HOT 1
- Multiprocessing problems HOT 12
- Rocket notifier, set SSL validation to False HOT 1
- Project/repo maintenance status? HOT 12
- Django Compatibility Errors HOT 2
- Demo site does not allow login HOT 5
- openduty requires Twilio of version >=0af4776a961a5b0fef8052082fb1f4027cff172e HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openduty.