Skip to content

Instantly share code, notes, and snippets.

@mogi
Last active November 2, 2018 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogi/e57ca28cf1ef7ae74c780ebe3c4461f8 to your computer and use it in GitHub Desktop.
Save mogi/e57ca28cf1ef7ae74c780ebe3c4461f8 to your computer and use it in GitHub Desktop.
運用連絡の雛形を出力する
SS=$1
# get json
curl -s "https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Fstatus.cybozu.com%2Frss%2Fmonitor-${SS}?tz=540" > /tmp/${SS}.json
# output template
cat << EOS
以下の時間帯、サービスにアクセスし辛くなっていました。
現在は解消しています。
EOS
# output messages
echo "${SS}"
echo "https://status.cybozu.com/status/monitor-${SS}"
json=$(cat /tmp/ty31.json |jq .items)
len=$(echo $json | jq length)
for i in $( seq 0 $(($len - 1)) ); do
echo $json | jq -r .[$i].title
echo $json | jq -r .[$i].content
done
@mogi
Copy link
Author

mogi commented Nov 2, 2018

出力例

hiroki_mogi:~ $ ./gen_contact.sh ty31
以下の時間帯、サービスにアクセスし辛くなっていました。
現在は解消しています。

https://status.cybozu.com/status/monitor-ty31
kintone
2018/11/02 14:00(UTC+9) - 2018/11/02 14:01(UTC+9) Service unavailable for more than 10 consecutive seconds
kintone
2018/11/02 13:01(UTC+9) - 2018/11/02 13:02(UTC+9) Service unavailable for more than 10 consecutive seconds
Garoon
2018/10/31 14:51(UTC+9) - 2018/10/31 14:51(UTC+9) Service unavailable for more than 10 consecutive seconds
Garoon
2018/10/29 20:11(UTC+9) - 2018/10/29 20:11(UTC+9) Service unavailable for more than 10 consecutive seconds
Garoon
2018/10/25 17:39(UTC+9) - 2018/10/25 17:39(UTC+9) Service unavailable for more than 10 consecutive seconds
Garoon
2018/10/25 14:22(UTC+9) - 2018/10/25 14:22(UTC+9) Service unavailable for more than 10 consecutive seconds
Administration
2018/10/25 14:22(UTC+9) - 2018/10/25 14:22(UTC+9) Service unavailable for more than 10 consecutive seconds
kintone
2018/10/25 14:22(UTC+9) - 2018/10/25 14:22(UTC+9) Service unavailable for more than 10 consecutive seconds
kintone
2018/10/25 14:20(UTC+9) - 2018/10/25 14:21(UTC+9) Service unavailable for more than 10 consecutive seconds
Cybozu Office
2018/10/25 11:36(UTC+9) - 2018/10/25 11:36(UTC+9) Service unavailable for more than 10 consecutive seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment