ãã£ããã¨
Zabbix5.0ã§è¿½å ãããRedmineã®Webhookã使ã£ã¦ãé害ãã±ãããèªå起票ããã¾ããã
ã¹ã¯ãªãããæ¸ãå¿
è¦ããªããã¨ã¦ã便å©ã§ããã
ç°å¢
Versions | OS |
---|---|
Zabbix5.0 | Amazon Linux 2 |
Redmine3.4 | centos7.7 |
1.Zabbixã®æ§ç¯
å
æ¥ã®è¨äºã®ç°å¢ã使ç¨ãã¾ãã
ç£è¦å¯¾è±¡ã®NWæ©å¨ã追å ããã¦ããç¶æ
ã§ãã
https://mitomito.hatenablog.jp/entry/2020/06/20/070000
2.Redmineã®æ§ç¯
å
¬å¼ãã辿ãã¨Playbookãç¨æããã¦ããã®ã§ãansibleã§æ§ç¯ãã¾ããã
https://github.com/farend/redmine-centos-ansible
3.Redmaineã®è¨å®
åæè¨å®ã¯å
¬å¼ãåèã«ãã¾ãã
https://redmine.jp/tech_note/first-step/
ä»åã¯ä»¥ä¸ãå®æ½ãã¾ããã
3-1. ããã¸ã§ã¯ãã®ä½æ
- å称ã«ãzabbixããå ¥åãä¿åãã¯ãªãã¯
3-2. RedmineAPIã®æå¹å¯
- ç»é¢ä¸é¨ã®[管ç] -> [è¨å®] -> [API] -> [RESTã«ããWebãµã¼ãã¹ãæå¹ã«ãã]
- ãã§ãã¯ãå ¥ãã¦ä¿åãã¯ãªãã¯
3-3. APIã¢ã¯ã»ã¹ãã¼ã®ã¡ã¢
- ç»é¢å³ä¸ã®[å人è¨å®] -> [APIã¢ã¯ã»ã¹ãã¼] -> [表示]ãã¯ãªãã¯
- 表示ãããAPIã¢ã¯ã»ã¹ãã¼ãã¡ã¢
3-4. ãã©ãã«ã¼ã®ä½æããã©ãã«ã¼IDã®ã¡ã¢
- [管ç] -> [ãã©ãã«ã¼ -> [æ°ãããã©ãã«ã¼]ãã¯ãªãã¯
- å称ã«ãé害ããããã©ã«ãã®ã¹ãã¼ã¿ã¹ã«ãæ°è¦ããå ¥åãä¿åãã¯ãªãã¯
- ä½æãããã©ãã«ã¼ãé害ããã¯ãªãã¯ããURLã«å«ã¾ãããã©ãã«ã¼IDãã¡ã¢
ä¾ï¼http://XX.XX.XX.XX/redmine/trackers/4/edit
ããã©ãã«ã¼IDã4ã
4.Zabbixã®è¨å®
Zabbixã¨Redmineãé£æºãããããã®è¨å®ã§ãã
追å ãããã¡ãã£ã¢ã¿ã¤ã[Redmine]ã®Webhookã®åºçªã§ããã
4-1. ãã¯ã{$ZABBIX.URL}ã®è¨å®
4-2. ã¡ãã£ã¢ã¿ã¤ã[Redmine]ã®è¨å®
- [redmine_access_key] = 3-3ã®å¤
- [redmine_project] = 3-1ã®å¤
- [redmine_tracker_id] = 3-4ã®å¤
- [redmine_url] = http://XX.XX.XX.XX/redmine/
4-3. ã¦ã¼ã¶ä½æãã¦ã¼ã¶ã®ã¡ãã£ã¢ã¿ã¤ã追å
- ã·ã¹ãã é£æºç¨ã®ã¦ã¼ã¶ãä½æ
- ã¡ãã£ã¢ã¿ã¤ã[Redmine]ã追å
4-4. ã¢ã¯ã·ã§ã³ã®è¨å®
- ã¢ã¯ã·ã§ã³ã®å®è¡æ¡ä»¶ã«ããã¹ãã°ã«ã¼ã çãã routerãã追å
- å®è¡å 容ã®æ¬¡ã®ã¡ãã£ã¢ã®ã¿ä½¿ç¨ã«ãRedmineãã追å
- å®è¡å 容ã®å®è¡æ¡ä»¶ã«ãã¤ãã³ãæªç¢ºèªãã追å
- 復æ§æãæ´æ°æã®å®è¡å 容ã«ãé害éç¥éä¿¡æ¸ã®ã¦ã¼ã¶ã¼ãã¹ã¦ã«ã¡ãã»ã¼ã¸ãéä¿¡ããè¨å®
åèæé
https://www.zabbix.com/jp/integrations/redmine
5.èªå起票
csr-1ãè½ã¨ããZabbixãpingæãæ¤ç¥ãã¾ããã¢ã¯ã·ã§ã³ãæåãã¦ãã¾ãã
Redmaineã«ç§»åããã¨ããã
ç¡äºã«èªå起票ããã¾ãããã¤ã§ã¢ã¢ã¢ã¢ã¢ã¢ï¼ï¼
å復ãåããã±ããã«è¿½è¨ãã大æºè¶³ã§ãã
éè¨
éèªã«è¼ã£ã¦ãããªã·ã¹ãã é£æºå³ã£ã½ããã¨ãããããã£ãï¼
Playbookãæµãã ãã§ããã£ã¨Redmineãæ§ç¯ã§ããã®ãæ°æã¡ãããã
Ansibleãããã®ã¿ã«ä½¿ãã®ã¯ãã£ãããªãã®ã§ã次ã¯ããã