Zabbix→OTRS 연계
■ 소개
Zabbix에서 이상 검지하면 OTRS에 기표하는 스크립트를 작성했습니다 ···
오류를 결정하지는 않았지만 구현은 유료입니다.
상수는 적시에 변경하십시오.
■환경
・OTRS-6.0.6
· Zabbix3.5
■ 스크립트 배치
/usr/lib/zabbix/alertscripts/otrs.sh
#!/bin/sh
ticket_title=${1:-'タイトル'}
ticket_body=${2:-'本文'}
OTRS_IP="192.168.11.66"
OTRS_USER="<OTRSのユーザ>"
OTRS_PASS="<OTRSのパスワード>"
TICKET_TYPE="Unclassified"
TICKET_QUEUE="Raw"
TICKET_STATE="new"
TICKET_PRIORITY="5"
TICKET_CUSTOMER="[email protected]"
session=`/usr/bin/curl -s -X POST "http://${OTRS_IP}/otrs/nph-genericinterface.pl/Webservice/Ticket/login" \
-d "{ \"UserLogin\": \"${OTRS_USER}\", \"Password\": \"${OTRS_PASS}\"}" | /usr/bin/jq -r '.SessionID'`
ret=`/usr/bin/curl -s -X POST -H "Content-Type:application/json" \
-d "{ \"SessionID\":\"${session}\", \
\"Ticket\": \
{\"Title\":\"${ticket_title}\", \
\"Type\": \"${TICKET_TYPE}\", \
\"Queue\":\"${TICKET_QUEUE}\", \
\"State\":\"${TICKET_STATE}\", \
\"PriorityID\":\"${TICKET_PRIORITY}\", \
\"CustomerUser\":\"${TICKET_CUSTOMER}\"}, \
\"Article\":{ \
\"Subject\":\"${ticket_title}\", \
\"Body\":\"${ticket_body}\", \
\"ContentType\":\"text/plain; charset=utf8\"} \
}" "http://${OTRS_IP}/otrs/nph-genericinterface.pl/Webservice/Ticket/TicketCreate" `
■ Zabbix 등록
관리, 미디어 유형에서 미디어 유형 만들기를 엽니다.

아래 정보를 입력하여 추가

'관리', '사용자'에서 Admin의 '미디어' 열기

'추가'에서 스크립트 등록

설정, 액션에서 액션 만들기 열기

아래 정보를 입력하여 추가

※기본 메시지에 개행이 있으면 에러가 되므로 개행을 지울 것

OTRS 확인

기표되었습니다.
이상입니다.
Reference
이 문제에 관하여(Zabbix→OTRS 연계), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/takahito007/items/1aedd367b181cbb93a53텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)