The product page of Watcher mentions the option to alert Jira.
Get Notified the Way You Want
Easily set up email alerts when incidents occur, or integrate Watcher into your existing monitoring infrastructure via webhook to send alerts to JIRA, HipChat, PagerDuty, Slack, and more.
I can't seem to find how to do this and how it works. I found ElastAlert on the internet and this is able to create tickets in Jira or even update a ticket. Can Watcher do this also? How does it work ?
You can use the WebHook action to integrate with any 3rd party service that has an RESTful API, including Jira. We are planning a more native integration, which will make it a bit simpler, but you should be able to integrate with Jira today.
Currently this can be done using the webhook action. This action enables you to create a generic HTTP request to an external service. For example, if you enable JIRA API. Here's an example action that create a jira issue (using the same example as in JIRA docs):
{
...,
"actions" : {
"create_jira_issue" : {
"webhook" : {
"host" : "localhost",
"port" : 2990,
"method" : "post",
"path" : "/jira/rest/api/2/issue"
"auth" : {
"basic" : {
"username" : "admin",
"password" : "admin"
}
},
"body" : {
"fields": {
"project": {
"id": "10000"
},
"summary": "No REST for the Wicked.",
"description": "Creating of an issue using ids for projects and issue types using the REST API",
"issuetype": {
"id": "3"
}
}
}
}
}
}
}
Interesting! I might be mistaken but wouldn't that just make a thin jira issue? It wouldn't really have a lot of information regarding the issue. I haven't been able to find something for it yet but isn't it possible to add data or logs to it?
The example above is simply the same example as in their intro doc... only within a watch. Their API for creating an issue is much richer than that though. The webhook body can be templated as well.
no, you're not missing something, indeed the body field should be a templated string, not an object (with all the json parts escaped).. not ideal... we should look into it to see how we can simplify this (perhaps with an alternative jsonBody field)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.