- 重要な情報
- はじめに
- 用語集
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Supported OS
Solr チェックは、Solr クラスターの状態とパフォーマンスを追跡します。インデックス化されたドキュメント数、キャッシュのヒット数、エビクション数、平均リクエスト時間、毎秒の平均リクエスト数などのメトリクスを収集します。
Solr チェックは Datadog Agent パッケージに含まれています。Solr ノードに追加でインストールする必要はありません。
このチェックは JMX ベースなので、Solr サーバーで JMX リモートを有効にする必要があります。詳細については、JMX チェックに関するドキュメントを参照してください。
ホストで実行中の Agent に対してこのチェックを構成するには:
Agent のコンフィギュレーションディレクトリのルートにある conf.d/
フォルダーの solr.d/conf.yaml
ファイルを編集します。使用可能な全コンフィギュレーションオプションの詳細については、サンプル solr.d/conf.yaml を参照してください。
init_config:
## @param is_jmx - boolean - required
## Whether or not this file is a configuration for a JMX integration.
#
is_jmx: true
## @param collect_default_metrics - boolean - required
## Whether or not the check should collect all default metrics.
#
collect_default_metrics: true
instances:
## @param host - string - required
## Solr host to connect to.
- host: localhost
## @param port - integer - required
## Solr port to connect to.
port: 9999
conf
パラメーターは、インテグレーションによって収集されるメトリクスのリストです。次の 2 つのキーのみが許可されます。
include
(必須): フィルターの辞書。これらのフィルターに一致する属性は、exclude
フィルターにも一致している場合を除き、収集されます (以下を参照)。exclude
(オプション): フィルターの辞書。これらのフィルターに一致する属性は収集されません。特定の Bean に対して、メトリクスは次のようにタグ付けされます。
mydomain:attr0=val0,attr1=val1
この例では、メトリクスは mydomain
(Bean 内の属性によっては多少異なる) になり、タグ attr0:val0
、attr1:val1
、domain:mydomain
が付きます。
include
キー内の指定したエイリアスが_キャメルケース_として書式設定されている場合、_スネークケース_に変換されます。たとえば MyMetricName
は、Datadog では my_metric_name
と表示されます。
attribute
フィルターは、次の 2 種類の値を受け入れます。
キーが属性名の辞書(以下を参照)。この場合、メトリクスのエイリアスを指定でき、それが Datadog でメトリクス名になります。ゲージまたはカウンターとしてメトリクスタイプを指定することもできます。カウンターを選択した場合は、メトリクスの秒あたりの速度が計算されます。
conf:
- include:
attribute:
maxThreads:
alias: tomcat.threads.max
metric_type: gauge
currentThreadCount:
alias: tomcat.threads.count
metric_type: gauge
bytesReceived:
alias: tomcat.bytes_rcvd
metric_type: counter
属性名のリスト(以下を参照)。この場合、メトリクスタイプはゲージで、メトリクス名は jmx.\[ドメイン名].\[属性名]
です。
conf:
- include:
domain: org.apache.cassandra.db
attribute:
- BloomFilterDiskSpaceUsed
- BloomFilterFalsePositives
- BloomFilterFalseRatio
- Capacity
- CompressionRatio
- CompletedTasks
- ExceptionCount
- Hits
- RecentHitRate
フィルターのリストは、5.3.0 よりも新しい Datadog Agent でのみサポートされます。以前のバージョンを使用している場合は、代わりにシングルトンと複数の include
ステートメントを使用します。
# Datadog Agent > 5.3.0
conf:
- include:
domain: domain_name
bean:
- first_bean_name
- second_bean_name
# Older Datadog Agent versions
conf:
- include:
domain: domain_name
bean: first_bean_name
- include:
domain: domain_name
bean: second_bean_name
コンテナ環境の場合は、JMX を使用したオートディスカバリーのガイドを参照してください。
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml
ファイルでこれを有効にします。
logs_enabled: true
Solr はデフォルトで log4j
ロガーを使用します。ログ出力のフォーマットをカスタマイズするには、server/resources/log4j2.xml
ファイルを編集します。デフォルトでは、Datadog のインテグレーションパイプラインが以下のコンバージョンパターンをサポートします。
%maxLen{%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%notEmpty{ =>%ex{short}}}{10240}%n
フォーマットが異なる場合は、インテグレーションパイプラインを複製して編集してください。
solr.d/conf.yaml
ファイルのコメントを解除して、ログコンフィギュレーションブロックを編集します。環境に基づいて、 type
、path
、service
パラメーターの値を変更してください。使用可能なすべての構成オプションの詳細については、サンプル solr.d/solr.yaml を参照してください。
logs:
- type: file
path: /var/solr/logs/solr.log
source: solr
# To handle multi line that starts with yyyy-mm-dd use the following pattern
# log_processing_rules:
# - type: multi_line
# pattern: \d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])
# name: new_log_start_with_date
Kubernetes 環境のログを有効にするには、Kubernetes ログ収集を参照してください。
Agent の status サブコマンドを実行し、Checks セクションで solr
を探します。
solr.cache.evictions (gauge) | The total number of cache evictions per second. Shown as eviction |
solr.cache.hits (gauge) | The number of cache hits per second. Shown as hit |
solr.cache.inserts (gauge) | The total number of cache inserts per second. Shown as set |
solr.cache.lookups (gauge) | The total number of cache lookups per second. Shown as get |
solr.document_cache.evictions (gauge) | The total number of cache evictions per second. Shown as eviction |
solr.document_cache.hits (gauge) | The number of cache hits per second. Shown as hit |
solr.document_cache.inserts (gauge) | The total number of cache inserts per second. Shown as set |
solr.document_cache.lookups (gauge) | The total number of cache lookups per second. Shown as get |
solr.filter_cache.evictions (gauge) | The total number of cache evictions per second. Shown as eviction |
solr.filter_cache.hits (gauge) | The number of cache hits per second. Shown as hit |
solr.filter_cache.inserts (gauge) | The total number of cache inserts per second. Shown as set |
solr.filter_cache.lookups (gauge) | The total number of cache lookups per second. Shown as get |
solr.query_result_cache.evictions (gauge) | The total number of cache evictions per second. Shown as eviction |
solr.query_result_cache.hits (gauge) | The number of cache hits per second. Shown as hit |
solr.query_result_cache.inserts (gauge) | The total number of cache inserts per second. Shown as set |
solr.query_result_cache.lookups (gauge) | The total number of cache lookups per second. Shown as get |
solr.search_handler.request_times.50percentile (gauge) | Request processing time in milliseconds (50percentile). Shown as millisecond |
solr.search_handler.request_times.75percentile (gauge) | Request processing time in milliseconds (75percentile). Shown as millisecond |
solr.search_handler.request_times.95percentile (gauge) | Request processing time in milliseconds (95percentile). Shown as millisecond |
solr.search_handler.request_times.98percentile (gauge) | Request processing time in milliseconds (98percentile). Shown as millisecond |
solr.search_handler.request_times.99percentile (gauge) | Request processing time in milliseconds (99percentile). Shown as millisecond |
solr.search_handler.request_times.999percentile (gauge) | Request processing time in milliseconds (999percentile). Shown as millisecond |
solr.search_handler.request_times.one_minute_rate (gauge) | Requests per second received over the past minutes. Shown as request |
solr.search_handler.request_times.mean_rate (gauge) | Average number of requests received per second since the Solr core was first created. Shown as request |
solr.search_handler.request_times.mean (gauge) | The average time per request. Shown as millisecond |
solr.search_handler.avg_requests_per_sec (gauge) | Average number of requests received per second since the Solr core was first created. Shown as request |
solr.search_handler.avg_time_per_req (gauge) | The average time per request. Shown as millisecond |
solr.search_handler.errors (gauge) | Number of errors per second encountered by the handler. Shown as error |
solr.search_handler.requests (gauge) | Number of requests per second processed by the handler. Shown as request |
solr.search_handler.time (gauge) | The sum of all request processing times (in milliseconds) per second. |
solr.search_handler.timeouts (gauge) | Number of responses per second received with partial results. Shown as timeout |
solr.searcher.maxdoc (gauge) | One greater than the largest possible document number (Solr version <= 6). Shown as document |
solr.searcher.maxdocs (gauge) | One greater than the largest possible document number (Solr version >= 7). Shown as document |
solr.searcher.numdocs (gauge) | The total number of indexed documents. Shown as document |
solr.searcher.warmup (gauge) | The time spent warming up. Shown as millisecond |
Solr チェックには、イベントは含まれません。
solr.can_connect
Agent が監視対象の SolR インスタンスに接続できず、メトリクスを収集できない場合は、CRITICAL
を返します。それ以外の場合は、OK
を返します。
Statuses: ok, クリティカル
バージョン 4.1.0 で datadog-agent jmx
コマンドが追加されました。
sudo datadog-agent jmx list matching
sudo datadog-agent jmx list limited
sudo datadog-agent jmx list collected
sudo datadog-agent jmx list not-matching
sudo datadog-agent jmx list everything
sudo datadog-agent jmx collect
jmxfetch が false や true といった文字列値のみを返す場合は、それを Datadog のゲージメトリクスに変換して使用できます。たとえば、jmxfetch で次のような値を返すとします。
"myJmxfetch:false" = myJmxfetch:0
"myJmxfetch:true" = myJmxfetch:1
次のように attribute
フィルターを使用します。
# ...
attribute:
myJmxfetch:
alias: your_metric_name
metric_type: gauge
values:
"false": 0
"true": 1