• /
  • EnglishEspañolFrançais日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、このページを参照してください。

問題を作成する

New Relic Logs設定アクション

|View as Markdown (English)

このページでは、ワークフロー自動化アクションカタログで利用可能なNew Relic Logsの設定アクションのリファレンスを提供します。これらのアクションを使用して、ログ設定リソース — 解析ルール、データパーティションルール、難読化表現とルール、およびパイプライン設定 — をクエリし、ワークフロー定義から直接、Grokパターンの検証やパイプライン設定の更新などの操作を実行します。

前提条件

ワークフローの自動化でNew Relic Logsの設定アクションを使用する前に、以下の準備ができていることを確認してください:

  • ログ管理設定にアクセスするための適切な権限を持つNew Relicアカウント。
  • ログ設定をクエリまたは更新する各アカウントのアカウントIDです。

解析ルールの一覧

アクション識別子はnewrelic.logConfigurations.listParsingRulesです。

アカウントに設定されたすべてのログ解析ルールを返します。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。解析ルールを一覧表示するNew Relicアカウント。正の整数である必要があります。

123456

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "parsingRules", "expression": ".data.actor.account.logConfigurations.parsingRules"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"actor": {
"account": {
"logConfigurations": {
"parsingRules": [
{
"id": "123",
"accountId": 123456,
"description": "Parse nginx access logs",
"enabled": true,
"grok": "%{IP:clientip} %{WORD:method} %{URIPATHPARAM:request}",
"lucene": "logtype:nginx",
"nrql": "SELECT * FROM Log WHERE logtype = 'nginx'",
"attribute": "message",
"deleted": false,
"source": "USER",
"updatedAt": "2026-08-01T12:00:00Z"
}
]
}
}
}
}
}

source はnullではない列挙型です:USERまたはBUILT_IN。updatedAtはnullを許容します。

ワークフローの例

name: list_log_parsing_rules
description: Audit all active log parsing rules for an account
steps:
- name: listParsingRules
type: action
action: newrelic.logConfigurations.listParsingRules
version: 1
inputs:
accountId: 123456
selectors:
- name: parsingRules
expression: ".data.actor.account.logConfigurations.parsingRules"
next: end

データパーティションルールを一覧表示します。

アクション識別子はnewrelic.logConfigurations.listDataPartitionRulesです。

アカウントに設定されているすべてのログデータパーティションルールを返します。これには、各パーティションのネストされたliveArchiveConfigurationが含まれます。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。データパーティションルールを一覧表示する対象のNew Relicアカウントです。正の整数でなければなりません。

123456

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "partitions", "expression": ".data.actor.account.logConfigurations.dataPartitionRules"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"actor": {
"account": {
"logConfigurations": {
"dataPartitionRules": [
{
"id": "456",
"targetDataPartition": "Log_nginx",
"description": "Routes nginx logs to a dedicated partition",
"enabled": true,
"nrql": "logtype = 'nginx'",
"retentionPolicy": "STANDARD",
"deleted": false,
"createdAt": "2026-08-01T12:00:00Z",
"updatedAt": "2026-08-01T12:00:00Z",
"liveArchiveConfiguration": {
"id": "789",
"enabled": false,
"retentionPolicy": "STANDARD",
"eventType": "Log"
}
}
]
}
}
}
}
}

description、nrql、retentionPolicy、およびupdatedAtはnull許容です。liveArchiveConfiguration.retentionPolicyはnull非許容です。

ワークフローの例

name: list_data_partition_rules
description: Audit how logs are routed across data partitions
steps:
- name: listDataPartitionRules
type: action
action: newrelic.logConfigurations.listDataPartitionRules
version: 1
inputs:
accountId: 123456
selectors:
- name: partitions
expression: ".data.actor.account.logConfigurations.dataPartitionRules"
next: end

難読化表現の一覧

アクション識別子はnewrelic.logConfigurations.listObfuscationExpressionsです。

アカウントに設定されているすべての難読化表現を返します。難読化表現は、難読化ルールがログ内の機密データを照合するために使用する正規表現パターンを定義します。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。難読化表現を一覧表示する対象のNew Relicアカウント。正の整数でなければなりません。

123456

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "expressions", "expression": ".data.actor.account.logConfigurations.obfuscationExpressions"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"actor": {
"account": {
"logConfigurations": {
"obfuscationExpressions": [
{
"id": "abc123",
"name": "Credit card number",
"description": "Matches 13-16 digit credit card numbers",
"regex": "(\\b\\d{13,16}\\b)",
"createdAt": "2026-08-01T12:00:00Z",
"updatedAt": "2026-08-01T12:00:00Z"
}
]
}
}
}
}
}

description null許容です。

ワークフローの例

name: list_obfuscation_expressions
description: Verify sensitive data patterns are configured for an account
steps:
- name: listObfuscationExpressions
type: action
action: newrelic.logConfigurations.listObfuscationExpressions
version: 1
inputs:
accountId: 123456
selectors:
- name: expressions
expression: ".data.actor.account.logConfigurations.obfuscationExpressions"
next: end

難読化ルールを一覧表示します。

アクション識別子はnewrelic.logConfigurations.listObfuscationRulesです。

各ルールが適用するアクションと式を含め、アカウントに設定されているすべての難読化ルールを返します。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。難読化ルールを一覧表示するNew Relicアカウント。正の整数でなければなりません。

123456

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "rules", "expression": ".data.actor.account.logConfigurations.obfuscationRules"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"actor": {
"account": {
"logConfigurations": {
"obfuscationRules": [
{
"id": "rule123",
"name": "Mask credit cards",
"description": "Obfuscates credit card numbers in all logs",
"enabled": true,
"filter": "SELECT * FROM Log",
"actions": [
{
"id": "act456",
"attributes": ["message", "body"],
"expression": {
"id": "abc123",
"name": "Credit card number",
"regex": "(\\b\\d{13,16}\\b)"
},
"method": "MASK"
}
],
"createdAt": "2026-08-01T12:00:00Z",
"updatedAt": "2026-08-01T12:00:00Z"
}
]
}
}
}
}
}

description null許容です。filterの型はNrqlです。actions[].attributesは属性名文字列のリストです。actions[].expressionは完全な難読化表現オブジェクトです。

ワークフローの例

name: list_obfuscation_rules
description: Audit which sensitive-data obfuscation rules are active
steps:
- name: listObfuscationRules
type: action
action: newrelic.logConfigurations.listObfuscationRules
version: 1
inputs:
accountId: 123456
selectors:
- name: rules
expression: ".data.actor.account.logConfigurations.obfuscationRules"
next: end

パイプライン設定の取得

アクション識別子はnewrelic.logConfigurations.getPipelineConfigurationです。

アカウントの現在のログパイプライン設定を取得し、パイプラインで有効または無効になっている処理ステップを表示します。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。パイプライン設定を取得するNew Relicアカウントです。正の整数でなければなりません。

123456

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "config", "expression": ".data.actor.account.logConfigurations.pipelineConfiguration"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"actor": {
"account": {
"logConfigurations": {
"pipelineConfiguration": {
"accountId": 123456,
"accountLevelNativeJsonEnabled": false,
"enrichmentDisabled": false,
"entitySynthesisDisabled": false,
"hasNativeJsonEntitlementEnabled": false,
"infraAgentAttributesCleanupEnabled": false,
"jsonParsingDisabled": false,
"nrLinkingExtractionDisabled": false,
"nrUnmarshallingFieldsDisabled": false,
"obfuscationDisabled": false,
"parsingDisabled": false,
"patternsEnabled": true,
"pluginAttributesCleanupEnabled": false,
"recursiveJsonParsingDisabled": false,
"syslogJsonParsingDisabled": false,
"transformationDisabled": false,
"updatedAt": "2026-08-01T12:00:00Z"
}
}
}
}
}
}

updatedAt null許容 — 設定がデフォルトから変更されていない場合はnullです。

ワークフローの例

name: get_pipeline_configuration
description: Read current pipeline configuration before making changes
steps:
- name: getPipelineConfiguration
type: action
action: newrelic.logConfigurations.getPipelineConfiguration
version: 1
inputs:
accountId: 123456
selectors:
- name: pipelineConfig
expression: ".data.actor.account.logConfigurations.pipelineConfiguration"
next: end

Grokパターンのテスト

アクション識別子はnewrelic.logConfigurations.testGrokです。

1つ以上のサンプルログ行に対してGrokパターンをテストし、抽出された属性とともに各行が一致したかどうかを返します。解析ルールを作成する前に、このアクションを使用してGrokパターンを検証してください。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。GrokパターンをテストするNew Relicアカウント。正の整数である必要があります。

123456

grok

弦

必須。ログ行に対してテストするGrokパターンです。

"sampleattribute=%{NUMBER:test:int}"

logLines

リスト

必須。Grokパターンをテストするためのサンプルログ行です。

["sampleattribute=42", "sampleattribute=hello"]

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "grokResults", "expression": ".data.actor.account.logConfigurations.testGrok"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"actor": {
"account": {
"logConfigurations": {
"testGrok": [
{
"logLine": "sampleattribute=42",
"matched": true,
"attributes": [
{
"name": "test",
"value": "42"
}
]
},
{
"logLine": "sampleattribute=hello",
"matched": false,
"attributes": []
}
]
}
}
}
}
}

ワークフローの例

name: test_grok_pattern
description: Validate a Grok pattern against sample log lines before creating a parsing rule
steps:
- name: testGrokPattern
type: action
action: newrelic.logConfigurations.testGrok
version: 1
inputs:
accountId: 123456
grok: "sampleattribute=%{NUMBER:test:int}"
logLines:
- "sampleattribute=42"
- "sampleattribute=hello"
selectors:
- name: grokResults
expression: ".data.actor.account.logConfigurations.testGrok"
next: end

パイプライン設定の更新

アクション識別子はnewrelic.logConfigurations.upsertPipelineConfigurationです。

アカウントのログパイプライン設定を作成または更新し、パイプラインで有効にする処理ステップを制御します。すべてのフラグ入力はオプションです — フラグを省略すると、現在の値は変更されません。

次の表は、このアクションで利用可能なすべての入力フィールドについて説明しています。

入力

タイプ

説明

例

アカウントID

整数

必須。パイプライン設定を更新するNew Relicアカウント。正の整数でなければなりません。

123456

accountLevelNativeJsonEnabled

ブール値

オプション。アカウントレベルのネイティブJSON解析を有効にします。

false

enrichmentDisabled

ブール値

オプション。ログエンリッチメントを無効にします。

false

entitySynthesisDisabled

ブール値

オプション。ログからのエンティティ合成を無効にします。

false

hasNativeJsonEntitlementEnabled

ブール値

オプション。ネイティブJSONエンタイトルメントを有効にします。

false

infraAgentAttributesCleanupEnabled

ブール値

オプション。infrastructureエージェント属性のクリーンアップを有効にします。

false

jsonParsingDisabled

ブール値

オプション。ログメッセージのJSON解析を無効にします。

false

nrLinkingExtractionDisabled

ブール値

オプション。New Relicのリンクメタデータの抽出を無効にします。

false

nrUnmarshallingFieldsDisabled

ブール値

オプション。New Relicフィールドのアンマーシャリングを無効にします。

false

obfuscationDisabled

ブール値

オプション。難読化処理を無効にします。

false

parsingDisabled

ブール値

オプション。ログ解析ルールを無効にします。

false

patternsEnabled

ブール値

オプション。ログパターン機能を有効にします。

true

pluginAttributesCleanupEnabled

ブール値

オプション。プラグイン属性のクリーンアップを有効にします。

false

recursiveJsonParsingDisabled

ブール値

オプション。再帰的JSON解析を無効にします。

false

syslogJsonParsingDisabled

ブール値

オプション。syslogメッセージのJSON解析を無効にします。

false

transformationDisabled

ブール値

オプション。ログ変換ルールを無効にします。

false

selectors

リスト

オプション。アクションの出力から特定のフィールドを抽出するためのJQセレクター。

[{"name": "pipelineConfiguration", "expression": ".data.logConfigurationsUpsertPipelineConfiguration.pipelineConfiguration"}]

次の表は、このアクションによって返されるすべての出力フィールドについて説明しています。

出力

タイプ

例

success

ブール値

true ステップがエラーなしで実行された場合。

errorMessage

弦

呼び出しがHTTP/トランスポート・レベルで失敗した場合にのみ値が設定されます。成功時はnullです。

data

オブジェクト

{
"data": {
"logConfigurationsUpsertPipelineConfiguration": {
"pipelineConfiguration": {
"accountId": 123456,
"accountLevelNativeJsonEnabled": false,
"enrichmentDisabled": false,
"entitySynthesisDisabled": false,
"hasNativeJsonEntitlementEnabled": false,
"infraAgentAttributesCleanupEnabled": false,
"jsonParsingDisabled": false,
"nrLinkingExtractionDisabled": false,
"nrUnmarshallingFieldsDisabled": false,
"obfuscationDisabled": false,
"parsingDisabled": false,
"patternsEnabled": true,
"pluginAttributesCleanupEnabled": false,
"recursiveJsonParsingDisabled": false,
"syslogJsonParsingDisabled": false,
"transformationDisabled": false,
"updatedAt": "2026-10-15T10:00:00Z"
}
}
}
}

updatedAt null許容 — 設定がデフォルトから変更されていない場合はnullです。

ワークフローの例

name: update_pipeline_configuration
description: Disable parsing and obfuscation temporarily during an incident
steps:
- name: upsertPipelineConfiguration
type: action
action: newrelic.logConfigurations.upsertPipelineConfiguration
version: 1
inputs:
accountId: 123456
parsingDisabled: false
obfuscationDisabled: false
patternsEnabled: true
selectors:
- name: pipelineConfiguration
expression: ".data.logConfigurationsUpsertPipelineConfiguration.pipelineConfiguration"
next: end
Copyright © 2026 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.