

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

# IP ディテクター
<a name="ip-detector-component"></a>

IP ディテクターコンポーネント (`aws.greengrass.clientdevices.IPDetector`) は以下の処理を行います。
+ Greengrass コアデバイスのローカルネットワーク接続情報を監視します。この情報には、コアデバイスのネットワークエンドポイントと、MQTT ブローカーが動作するポートが含まれます。
+  AWS IoT Greengrass クラウドサービスのコアデバイスの接続情報を更新します。

クライアントデバイスは Greengrass クラウドディスカバリを使用して、関連するコアデバイスの接続情報を取得できます。その後クライアントデバイスは、正常に接続されるまで各コアデバイスへの接続を試みることができます。

**注記**  <a name="client-device-component-context"></a>
クライアントデバイスは、Greengrass コアデバイスに接続し、処理するために MQTT メッセージとデータを送信するローカル IoT デバイスです。(詳細については、[ローカル IoT デバイスとやり取りする](interact-with-local-iot-devices.md) を参照してください)。

IP ディテクターコンポーネントは、コアデバイスの既存の接続情報を検出した情報に置き換えます。このコンポーネントは既存の情報を削除するため、IP ディテクターコンポーネントを使用するか、接続情報を手動で管理するか選択できます。

**Topics**
+ [バージョン](#ip-detector-component-versions)
+ [タイプ](#ip-detector-component-type)
+ [オペレーティングシステム](#ip-detector-component-os-support)
+ [要件](#ip-detector-component-requirements)
+ [依存関係](#ip-detector-component-dependencies)
+ [構成](#ip-detector-component-configuration)
+ [ローカルログファイル](#ip-detector-component-log-file)
+ [変更ログ](#ip-detector-component-changelog)

## バージョン
<a name="ip-detector-component-versions"></a>

このコンポーネントには、次のバージョンがあります。
+ 2.2.x
+ 2.1.x
+ 2.0.x

## タイプ
<a name="ip-detector-component-type"></a>

<a name="public-component-type-plugin-para1"></a>このコンポーネントはプラグインコンポーネント (`aws.greengrass.plugin`) です。[Greengrass nucleus](greengrass-nucleus-component.md) は、nucleus と同じ Java バーチャルマシン (JVM) でこのコンポーネントを実行します。コアデバイスでこのコンポーネントのバージョンを変更するとき、nucleus が再起動します。

<a name="public-component-type-plugin-para2"></a>このコンポーネントは、Greengrass nucleus と同じログファイルを使用します。詳細については、「[AWS IoT Greengrass ログのモニタリング](monitor-logs.md)」を参照してください。

<a name="public-component-type-more-information"></a>詳細については、「[コンポーネントタイプ](develop-greengrass-components.md#component-types)」を参照してください。

## オペレーティングシステム
<a name="ip-detector-component-os-support"></a>

このコンポーネントは、次のオペレーティングシステムを実行するコアデバイスにインストールできます。
+ Linux
+ Windows

## 要件
<a name="ip-detector-component-requirements"></a>

このコンポーネントには次の要件があります。
+ [Greengrass サービスロール](greengrass-service-role.md)を に関連付け AWS アカウント 、 `iot:GetThingShadow` および アクセス`iot:UpdateThingShadow`許可を付与する必要があります。
+ コアデバイスの AWS IoT ポリシーは、 アクセス`greengrass:UpdateConnectivityInfo`許可を許可する必要があります。詳細については、「[AWS IoT データプレーンオペレーションの ポリシー](device-auth.md#iot-policies)」および「[クライアントデバイスをサポートする最小 AWS IoT ポリシー](device-auth.md#client-device-support-minimal-iot-policy)」を参照してください。
+ デフォルトポートの 8883 以外のポートを使用するようにコアデバイスの MQTT ブローカーコンポーネントを設定する場合、IP ディテクター v2.1.0 以降を使用する必要があります。ブローカーが動作するポートを報告するように設定します。
+ 複雑なネットワーク設定がある場合、IP ディテクターコンポーネントは、クライアントデバイスがコアデバイスに接続できるエンドポイントを識別できない場合があります。IP ディテクターコンポーネントがエンドポイントを管理できない場合、代わりにコア デバイス エンドポイントを手動で管理する必要があります。たとえば、コアデバイスが MQTT ブローカポートを転送するルーターの背後にある場合、コアデバイスのエンドポイントとしてルーターの IP アドレスを指定する必要があります。詳細については、「[コアデバイスのエンドポイントを管理](manage-core-device-endpoints.md)」を参照してください。
+ IP ディテクターコンポーネントは、VPC での実行がサポートされています。

## 依存関係
<a name="ip-detector-component-dependencies"></a>

コンポーネントをデプロイすると、 は互換性のあるバージョンの依存関係 AWS IoT Greengrass もデプロイします。つまり、コンポーネントを正常にデプロイするには、コンポーネントとその依存関係のすべての要件を満たす必要があります。このセクションでは、このコンポーネントの[リリースされたバージョン](#ip-detector-component-changelog)の依存関係と、各依存関係に対するコンポーネントのバージョンを定義するセマンティックバージョン制約をリスト表示しています。コンポーネントの各バージョンの依存関係は、[AWS IoT Greengrass コンソール](https://console.aws.amazon.com//greengrass)でも確認できます。コンポーネントの詳細ページで **[Dependencies]** (依存関係) リストを確認します。

------
#### [ 2.2.3 ]

次の表に、このコンポーネントのバージョン 2.2.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.17.0 | ソフト | 

------
#### [ 2.2.2 ]

次の表に、このコンポーネントのバージョン 2.2.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.16.0 | ソフト | 

------
#### [ 2.2.1 ]

次の表に、このコンポーネントのバージョン 2.2.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.15.0 | ソフト | 

------
#### [ 2.2.0 ]

次の表に、このコンポーネントのバージョン 2.2.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.14.0 | ソフト | 

------
#### [ 2.1.8 – 2.1.9 ]

次の表に、このコンポーネントのバージョン 2.1.8 および 2.1.9 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.13.0 | ソフト | 

------
#### [ 2.1.7 ]

次の表に、このコンポーネントのバージョン 2.1.7 に関する依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.12.0 | ソフト | 

------
#### [ 2.1.6 ]

次の表に、このコンポーネントのバージョン 2.1.6 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.11.0 | ソフト | 

------
#### [ 2.1.5 ]

次の表に、このコンポーネントのバージョン 2.1.5 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.10.0 | ソフト | 

------
#### [ 2.1.4 ]

次の表に、このコンポーネントのバージョン 2.1.4 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.9.0 | ソフト | 

------
#### [ 2.1.3 ]

次の表に、このコンポーネントのバージョン 2.1.3 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.8.0 | ソフト | 

------
#### [ 2.1.2 ]

次の表に、このコンポーネントのバージョン 2.1.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.7.0 | ソフト | 

------
#### [ 2.1.1 ]

次の表に、このコンポーネントのバージョン 2.1.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.6.0 | ソフト | 

------
#### [ 2.1.0 and 2.0.2 ]

次の表に、このコンポーネントのバージョン 2.1.0 および 2.0.2 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.5.0 | ソフト | 

------
#### [ 2.0.1 ]

次の表に、このコンポーネントのバージョン 2.0.1 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.4.0 | ソフト | 

------
#### [ 2.0.0 ]

次の表に、このコンポーネントのバージョン 2.0.0 の依存関係を示します。


| 依存関係 | 互換性のあるバージョン | 依存関係タイプ | 
| --- | --- | --- | 
| [Greengrass nucleus](greengrass-nucleus-component.md) | >=2.2.0 <2.3.0 | ソフト | 

------

コンポーネントの依存関係の詳細については、「[コンポーネント recipe のリファレンス](component-recipe-reference.md#recipe-reference-component-dependencies)」を参照してください。

## 構成
<a name="ip-detector-component-configuration"></a>

このコンポーネントには、コンポーネントのデプロイ時にカスタマイズできる次の設定パラメータが用意されています。

------
#### [ 2.2.x ]

`defaultPort`  <a name="ip-detector-component-configuration-default-port"></a>
<a name="ip-detector-component-configuration-default-port-definition"></a>(オプション) このコンポーネントが IP アドレスを検出するときに報告する MQTT ブローカーポート。デフォルトポート 8883 とは異なるポートを使用するように MQTT ブローカーを設定する場合、このパラメータを指定する必要があります。  
デフォルト: `8883`

`includeIPv4LoopbackAddrs`  <a name="ip-detector-component-configuration-include-ipv4-loopback-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-loopback-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv4 ループバックアドレスが検出および報告されます。これらは、`localhost` など、IP アドレスであり、デバイスが自身と通信できる場所です。このオプションは、コアデバイスとクライアントデバイスを同じシステムで実行するテスト環境で使用します。  
デフォルト: `false`

`includeIPv4LinkLocalAddrs`  <a name="ip-detector-component-configuration-include-ipv4-link-local-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-link-local-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv4 の[リンクローカルアドレス](https://en.wikipedia.org/wiki/Link-local_address)が検出および報告されます。このオプションは、コアデバイスのネットワークに Dynamic Host Configuration Protocol (DHCP) または静的に割り当てられた IP アドレスがない場合に使用します。  
デフォルト: `false`

`includeIPv6LoopbackAddrs`  <a name="ip-detector-component-configuration-include-ipv6-loopback-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv6-loopback-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv6 ループバックアドレスが検出および報告されます。これらは、`localhost` など、IP アドレスであり、デバイスが自身と通信できる場所です。このオプションは、コアデバイスとクライアントデバイスを同じシステムで実行するテスト環境で使用します。このオプションを使用するには、`includeIPv4Addrs` を `false` に設定し、`includeIPv6Addrs` を `true` に設定する必要があります。  
デフォルト: `false`

`includeIPv6LinkLocalAddrs`  <a name="ip-detector-component-configuration-include-ipv6-link-local-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv6-link-local-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv6 の[リンクローカルアドレス](https://en.wikipedia.org/wiki/Link-local_address)が検出および報告されます。このオプションは、コアデバイスのネットワークに Dynamic Host Configuration Protocol (DHCP) または静的に割り当てられた IP アドレスがない場合に使用します。このオプションを使用するには、`includeIPv4Addrs` を `false` に設定し、`includeIPv6Addrs` を `true` に設定する必要があります。  
デフォルト: `false`

`includeIPv4Addrs`  <a name="ip-detector-component-configuration-include-ipv4-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-addrs-definition"></a>(オプション) デフォルトは `true` に設定されています。このオプションを有効にして、コアデバイスにある IPv4 アドレスを発行できます。  
デフォルト: `true`

`includeIPv6Addrs`  <a name="ip-detector-component-configuration-include-ipv6-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv6-addrs-definition"></a>(オプション) このオプションを有効にして、コアデバイスにある IPv6 アドレスを発行できます。このオプションを使用するには、`includeIPv4Addrs` を `false` に設定します。  
デフォルト: `false`

------
#### [ 2.1.x ]

`defaultPort`  <a name="ip-detector-component-configuration-default-port"></a>
<a name="ip-detector-component-configuration-default-port-definition"></a>(オプション) このコンポーネントが IP アドレスを検出するときに報告する MQTT ブローカーポート。デフォルトポート 8883 とは異なるポートを使用するように MQTT ブローカーを設定する場合、このパラメータを指定する必要があります。  
デフォルト: `8883`

`includeIPv4LoopbackAddrs`  <a name="ip-detector-component-configuration-include-ipv4-loopback-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-loopback-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv4 ループバックアドレスが検出および報告されます。これらは、`localhost` など、IP アドレスであり、デバイスが自身と通信できる場所です。このオプションは、コアデバイスとクライアントデバイスを同じシステムで実行するテスト環境で使用します。  
デフォルト: `false`

`includeIPv4LinkLocalAddrs`  <a name="ip-detector-component-configuration-include-ipv4-link-local-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-link-local-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv4 の[リンクローカルアドレス](https://en.wikipedia.org/wiki/Link-local_address)が検出および報告されます。このオプションは、コアデバイスのネットワークに Dynamic Host Configuration Protocol (DHCP) または静的に割り当てられた IP アドレスがない場合に使用します。  
デフォルト: `false`

------
#### [ 2.0.x ]

`includeIPv4LoopbackAddrs`  <a name="ip-detector-component-configuration-include-ipv4-loopback-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-loopback-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv4 ループバックアドレスが検出および報告されます。これらは、`localhost` など、IP アドレスであり、デバイスが自身と通信できる場所です。このオプションは、コアデバイスとクライアントデバイスを同じシステムで実行するテスト環境で使用します。  
デフォルト: `false`

`includeIPv4LinkLocalAddrs`  <a name="ip-detector-component-configuration-include-ipv4-link-local-addrs"></a>
<a name="ip-detector-component-configuration-include-ipv4-link-local-addrs-definition"></a>(オプション) このオプションを有効にすると、IPv4 の[リンクローカルアドレス](https://en.wikipedia.org/wiki/Link-local_address)が検出および報告されます。このオプションは、コアデバイスのネットワークに Dynamic Host Configuration Protocol (DHCP) または静的に割り当てられた IP アドレスがない場合に使用します。  
デフォルト: `false`

------

## ローカルログファイル
<a name="ip-detector-component-log-file"></a>

このコンポーネントは、[Greengrass nucleus](greengrass-nucleus-component.md) コンポーネントと同じログファイルを使用します。

------
#### [ Linux ]

```
/greengrass/v2/logs/greengrass.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\greengrass.log
```

------

**このコンポーネントのログを確認するには**
+ コアデバイスに次のコマンドを実行して、このコンポーネントのログファイルをリアルタイムに確認します。`/greengrass/v2` または *C:\$1greengrass\$1v2* を AWS IoT Greengrass ルートフォルダへのパスに置き換えます。

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/greengrass.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\greengrass.log -Tail 10 -Wait
  ```

------

## 変更ログ
<a name="ip-detector-component-changelog"></a>

次の表は、コンポーネントの各バージョンにおける変更を示します。


|  **バージョン**  |  **変更**  | 
| --- | --- | 
|  2.2.3  |  Greengrass nucleus バージョン 2.16.0 リリース用にバージョンが更新されました。  | 
|  2.2.2  | Greengrass nucleus バージョン 2.15.0 リリース用にバージョンが更新されました。 | 
|  2.2.1  | Greengrass nucleus バージョン 2.14.0 リリース用にバージョンが更新されました。 | 
|  2.2.0  | Greengrass nucleus バージョン 2.13.0 のリリース用にバージョンが更新されました。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/ip-detector-component.html)  | 
|  2.1.9  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/ip-detector-component.html)  | 
|  2.1.8  | Greengrass nucleus バージョン 2.12.0 のリリース用にバージョンが更新されました。 | 
|  2.1.7  | Greengrass nucleus バージョン 2.11.0 のリリース用にバージョンが更新されました。 | 
|  2.1.6  | Greengrass nucleus バージョン 2.10.0 のリリース用にバージョンが更新されました。 | 
|  2.1.5  | Greengrass nucleus バージョン 2.9.0 のリリース用にバージョンが更新されました。 | 
|  2.1.4  | Greengrass nucleus バージョン 2.8.0 のリリース用にバージョンが更新されました。 | 
|  2.1.3  |  Greengrass nucleus バージョン 2.7.0 のリリース用にバージョンが更新されました。  | 
|  2.1.2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/ip-detector-component.html)  | 
|  2.1.1  |  Greengrass nucleus バージョン 2.5.0 のリリース用にバージョンが更新されました。  | 
|  2.1.0  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/greengrass/v2/developerguide/ip-detector-component.html)  | 
|  2.0.2  |  Greengrass nucleus バージョン 2.4.0 のリリース用にバージョンが更新されました。  | 
|  2.0.1  |  Greengrass nucleus バージョン 2.3.0 のリリース用にバージョンが更新されました。  | 
|  2.0.0  |  当初のバージョン  | 