クレーンモニタリング用の AWS IoT Events ディテクターモデル - AWS IoT Events

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

クレーンモニタリング用の AWS IoT Events ディテクターモデル

機器またはデバイスのフリートに障害やオペレーションの変更がないかモニタリングし、そのようなイベントが発生したときにアクションをトリガーします。状態、ルール、アクションJSONを指定するディテクターモデルを定義します。これにより、温度や圧力などの入力をモニタリングし、しきい値違反を追跡し、アラートを送信できます。この例では、クレーンとモーターのディテクターモデルを示し、過熱の問題を検出し、しきい値を超えたSNSときに Amazon に通知します。モニタリングを中断することなく、モデルを更新して動作を絞り込むことができます。

ファイル: craneDetectorModel.json

{ "detectorModelName": "craneDetectorModel", "detectorModelDefinition": { "states": [ { "stateName": "Running", "onEnter": { "events": [ { "eventName": "init", "condition": "true", "actions": [ { "setVariable": { "variableName": "craneThresholdBreached", "value": "0" } } ] } ] }, "onInput": { "events": [ { "eventName": "Overheated", "condition": "$input.TemperatureInput.temperature > 35", "actions": [ { "setVariable": { "variableName": "craneThresholdBreached", "value": "$variable.craneThresholdBreached + 1" } } ] }, { "eventName": "Crane Threshold Breached", "condition": "$variable.craneThresholdBreached > 5", "actions": [ { "sns": { "targetArn": "arn:aws:sns:us-east-1:123456789012:CraneSNSTopic" } } ] }, { "eventName": "Underheated", "condition": "$input.TemperatureInput.temperature < 25", "actions": [ { "setVariable": { "variableName": "craneThresholdBreached", "value": "0" } } ] } ] } } ], "initialStateName": "Running" }, "key": "craneid", "roleArn": "arn:aws:iam::123456789012:role/columboSNSRole" }

既存のディテクターモデルを更新する。ファイル: updateCraneDetectorModel.json

{ "detectorModelName": "craneDetectorModel", "detectorModelDefinition": { "states": [ { "stateName": "Running", "onEnter": { "events": [ { "eventName": "init", "condition": "true", "actions": [ { "setVariable": { "variableName": "craneThresholdBreached", "value": "0" } }, { "setVariable": { "variableName": "alarmRaised", "value": "'false'" } } ] } ] }, "onInput": { "events": [ { "eventName": "Overheated", "condition": "$input.TemperatureInput.temperature > 30", "actions": [ { "setVariable": { "variableName": "craneThresholdBreached", "value": "$variable.craneThresholdBreached + 1" } } ] }, { "eventName": "Crane Threshold Breached", "condition": "$variable.craneThresholdBreached > 5 && $variable.alarmRaised == 'false'", "actions": [ { "sns": { "targetArn": "arn:aws:sns:us-east-1:123456789012:CraneSNSTopic" } }, { "setVariable": { "variableName": "alarmRaised", "value": "'true'" } } ] }, { "eventName": "Underheated", "condition": "$input.TemperatureInput.temperature < 10", "actions": [ { "setVariable": { "variableName": "craneThresholdBreached", "value": "0" } } ] } ] } } ], "initialStateName": "Running" }, "roleArn": "arn:aws:iam::123456789012:role/columboSNSRole" }

ファイル: motorDetectorModel.json

{ "detectorModelName": "motorDetectorModel", "detectorModelDefinition": { "states": [ { "stateName": "Running", "onEnter": { "events": [ { "eventName": "init", "condition": "true", "actions": [ { "setVariable": { "variableName": "motorThresholdBreached", "value": "0" } } ] } ] }, "onInput": { "events": [ { "eventName": "Overheated And Overpressurized", "condition": "$input.PressureInput.pressure > 70 && $input.TemperatureInput.temperature > 30", "actions": [ { "setVariable": { "variableName": "motorThresholdBreached", "value": "$variable.motorThresholdBreached + 1" } } ] }, { "eventName": "Motor Threshold Breached", "condition": "$variable.motorThresholdBreached > 5", "actions": [ { "sns": { "targetArn": "arn:aws:sns:us-east-1:123456789012:MotorSNSTopic" } } ] } ] } } ], "initialStateName": "Running" }, "key": "motorId", "roleArn": "arn:aws:iam::123456789012:role/columboSNSRole" }

既存のディテクターモデルを更新する。ファイル: updateMotorDetectorModel.json

{ "detectorModelName": "motorDetectorModel", "detectorModelDefinition": { "states": [ { "stateName": "Running", "onEnter": { "events": [ { "eventName": "init", "condition": "true", "actions": [ { "setVariable": { "variableName": "motorThresholdBreached", "value": "0" } } ] } ] }, "onInput": { "events": [ { "eventName": "Overheated And Overpressurized", "condition": "$input.PressureInput.pressure > 70 && $input.TemperatureInput.temperature > 30", "actions": [ { "setVariable": { "variableName": "motorThresholdBreached", "value": "$variable.motorThresholdBreached + 1" } } ] }, { "eventName": "Motor Threshold Breached", "condition": "$variable.motorThresholdBreached > 5", "actions": [ { "sns": { "targetArn": "arn:aws:sns:us-east-1:123456789012:MotorSNSTopic" } } ] } ] } } ], "initialStateName": "Running" }, "roleArn": "arn:aws:iam::123456789012:role/columboSNSRole" }