SendAlert

サーバシステムや監視ソフトウェアなどからアラート情報をAPIで送信できます。

HTTPメソッドAction名称
GET または POSTSendAlertインシデントAPI
1: リクエストパラメータ
パラメータタイプ必須意味最大文字数リクエスト例備考
ServiceCodeStringサービスコード40uom12345678ご契約のサービスコードを指定してください
NodeNameStringノード名1024testnode_001

アラート情報の発生元のサーバシステムを指定してください。アラート通知/対応設定で利用します

MonitoringIdString監視ID3012345

アラートの監視項目(監視条件)を一意に特定できるIDを指定してください。アラート通知/対応設定で利用します

DetectionMessageString検知メッセージ2048

Mar 30 01:30:10

testnode_001

root: cron failed.

アラート情報の詳細を指定してください
ExplanationString説明2048System Errorアラート情報の概要を指定してください
ObstacleDetectionTimeString障害検知日時1420150330013010YYYYMMDDhhmmss の形式で指定してください
SeverityString重要度31

以下から指定してください

  • 1:アラート :ポータル表示、メール/電話、手順書対応可能
  • 2:ワーニング:ポータル表示、メール/電話、手順書対応可能
  • 5:復旧 :ポータル表示のみ可能
MessageIdStringメッセージID36msgid00001アラートを一意に特定できるIDを指定してください
MessageGroupStringメッセージグループ2048Log Detailインシデントメッセージのグループを指定してください
SurveillanceServerString監視サーバ40
surveillance_server
監視サーバ名を指定してください
2: レスポンス
フィールドタイプ意味備考
ResultCodeString実行結果コード正常の場合、0を返却します
3: エラーメッセージ
エラーHTTP Status CodeErrorTypeErrorMessage説明備考
パラメータエラー200

UOM

Parameter

Error

UOM parameter error occurred. Uom contract is none.UOMの契約が存在しない
パラメータエラー200

UOM

Parameter

Error

UOM parameter error occurred. Monitoring contract is none.UOMの監視契約が存在しない
パラメータエラー200

UOM

Parameter

Error

UOM parameter error occurred. Obstacle_detection_time is only number.障害検知日時の数値が不正

障害検知日時(obstacle_detection_time)は数字のみで構成してください

パラメータエラー200

UOM

Parameter

Error

UOM parameter error occurred. Obstacle_detection_time is digit invalid.障害検知日時の桁数が不正障害検知日時(obstacle_detection_time)の桁数は14桁で指定してください
パラメータエラー200

UOM

Parameter

Error

UOM parameter error occurred. Severity is invalid.重要度の指定が不正重要度(Severity)は指定のものをご利用ください
パラメータエラー200

UOM

Parameter

Error

Wrong 'obstacle_detection_time' is selected.検知日時の指定が不正

不正な障害検知日時(obstacle_detection_time)が指定されています

パラメータエラー200UOM Parameter ErrorUOM parameter error occurred. Some characters contained in the Monitoring ID are not allowed to enter. The available characters are half-width alpha numeric, hyphen (-), underscore (_) and dot (.).監視IDの指定が不正監視IDに半角英数字、ハイフン、アンダーバー、ドット以外の文字が設定されています
例外エラー200

UOM

Exception

Error

UOM system exception error occurred.UOM-API設備のシステム障害
4:警告メッセージ

なし

5:制限

なし

6:サンプル
config.rb
##
## 個別設定
##

# API のキー設定
IIJAPI_ACCESS_KEY = "1234567890ABCDEFGHIJ"
IIJAPI_SECRET_KEY = "1234567890ABCDEFGHIJabcdefghijklmnopqr+1"

##
## API の基本設定
##

# API の ENDPOINT 設定
IIJAPI_ENDPOINT = "https://uom.api.iij.jp"
IIJAPI_SSL_NO_VERIFY = true

# API バージョンの設定
APIVERSION = "20150912"

# Content-Type の設定
CONTENTTYPEVALUE = "application/json; charset=utf-8"

# インシデントAPI
# 以下の内容は、適宜修正してください。
ACTION = "SendAlert"
PARAMS = '{
	"ServiceCode" : "uom12345678",
	"NodeName" : "testnode_001",
	"MonitoringId" : "12345",
	"DetectionMessage" : "Mar 30 01:30:10 testnode_001 root: cron failed.",
	"Explanation" : "System Error",
	"ObstacleDetectionTime" : "20150330013010",
	"Severity" : "1",
	"MessageId" : "msgid00001"
}'
レスポンス(XML)
<SendAlertResponse>
	<RequestId>xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx</RequestId>
	<ResultCode>0</ResultCode>
</SendAlertResponse>
レスポンス(JSON)
{
	"SendAlertResponse": {
		"RequestId": "xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxxxx",
		"ResultCode": "0"
	}
}