Message notification via LINE Notify with personal token.
https://notify-bot.line.me/en/
Maven build package comprises of dockerfile-maven-plugin which automatically create Docker image for line-notify-gateway by default. You have two options to build line-notify-gateway.
mvn clean package
mvn clean package -Ddockerfile.skip
$JAVA_HOME/bin/java -Dlogging.file=${YOUR_LOG_DIR} -Dlogging.level.ROOT=${LEVEL} -jar line-notify-gateway.jar
docker run -d -p 18081:18081 -e line-notify.personal-access-token='${YOUR_LINE_NOTIFY_PRIVATE_ACCESS_TOKEN}' --name line-notify-gateway nontster/line-notify-gateway
POST /v1/notify-with-token?noify_token=${YOUR_LINE_NOTIFY_PRIVATE_ACCESS_TOKEN}¬ify_service=${YOUR_SERVICE_NAME}&message=${YOUR_MESSAGE}
- noify_token (required)
- notify_service (required)
- message (required)
- thumbnail_url (optional)
- image_url (optional)
- sticker (optional)
If you specify access token via environment variable when start application you can omit noify_token parameter and use below API instead
POST /v1/notify?notify_service=${YOUR_SERVICE_NAME}&message=${YOUR_MESSAGE}
- notify_service (required)
- message (required)
- thumbnail_url (optional)
- image_url (optional)
- sticker (optional)
Sticker list (https://devdocs.line.me/files/sticker_list.pdf)
POST /v1/alertmanager/payload?noify_token=${YOUR_LINE_NOTIFY_PRIVATE_ACCESS_TOKEN}
Content-Type: application/json
{
"version": "4",
"groupKey": <string>, // key identifying the group of alerts (e.g. to deduplicate)
"status": "<resolved|firing>",
"receiver": <string>,
"groupLabels": <object>,
"commonLabels": <object>,
"commonAnnotations": <object>,
"externalURL": <string>, // backlink to the Alertmanager.
"alerts": [
{
"status": "<resolved|firing>",
"labels": <object>,
"annotations": <object>,
"startsAt": "<rfc3339>",
"endsAt": "<rfc3339>",
"generatorURL": <string> // identifies the entity that caused the alert
},
...
]
}
Alert {{groupLabels.alertname}} is {{status}}
Severity {{commonLabels.severity}}
Affected nodes,
{{#alerts}}
- {{labels.instance}}
{{/alerts}}
Alert {{groupLabels.alertname}} for nodes below has been {{status}}
{{#alerts}}
- {{labels.instance}}
{{/alerts}}
- (2,24) for alert firing
- (1,114) for alert resolved
POST /v1/github/payload?noify_token=${YOUR_LINE_NOTIFY_PRIVATE_ACCESS_TOKEN}
Content-Type: application/json
Currently support GitHub Event Types are create
, issues
, issue_comment
, pull_request
, pull_request_review
, pull_request_review_comment
, release
GET /management/metrics