[Oracle Cloud] モニタリングサービスのメトリック一覧を確認する方法

本記事の目的

Monitorig Serviceのメトリック(監視項目)の一覧を確認する方法を調べてみた。

 

確認方法

マニュアルのリスト

マニュアルの「Supported Services」にMonitoring Serviceに対応しているサービスがリストされており、そこにあるリンクからサービス毎のメトリックの説明が確認できる。

例えば、Networking Serviceだと以下の4つのページに分けて記載されている。

 

 

OCI CLIでの取得方法

もう少しスマートに一覧を取得できないかと思ったら、OCI CLIに「monitoring metric list」というコマンドが用意されていた。

取得結果がこちら↓

$ oci monitoring metric list -c <compartment_id> | jq -r '(.data[] | [."namespace", ."name"]) | @csv' | sort -u

oci_computeagent,"CpuUtilization"
oci_computeagent,"DiskBytesRead"
oci_computeagent,"DiskBytesWritten"
oci_computeagent,"DiskIopsRead"
oci_computeagent,"DiskIopsWritten"
oci_computeagent,"MemoryUtilization"
oci_computeagent,"NetworksBytesIn"
oci_computeagent,"NetworksBytesOut"
oci_compute_infrastructure_health,"instance_status"
oci_compute_infrastructure_health,"maintenance_status"
oci_compute,"InstanceMetadataRequests"
oci_objectstorage,"ObjectCount"
oci_objectstorage,"StoredBytes"
oci_objectstorage,"UncommittedParts"
oci_vcn,"VnicEgressDropsSecurityList"
oci_vcn,"VnicFromNetworkBytes"
oci_vcn,"VnicFromNetworkPackets"
oci_vcn,"VnicIngressDropsSecurityList"
oci_vcn,"VnicToNetworkBytes"
oci_vcn,"VnicToNetworkPackets"

 

一覧は表示されるが、表示されているサービスが圧倒的に少ない。

コマンドの説明をあらためて見ると↓

Returns metric definitions that match the criteria specified in the request. Compartment OCID required.

どうやら、このコマンドは指定したコンパートメント内に作成されているリソースに関連するメトリックのみを表示するもののようだ。

※該当コンパートメントでは、コンピュートインスタンス(VM)は作成しているが、コンピュートインスタンス(BM)は作成していないので、BMにのみ関連するhealth_statusのメトリックは一覧に記載されていない。

 

全てのメトリックの一覧を取得できるわけではないが、あるコンパートメント内のリソースに関連するメトリックを一覧化したいだけならこれで十分そう。

 

 

スポンサードリンク

Be the first to comment

Leave a Reply

Your email address will not be published.


*