OpenTelemetry Support
...
Service Integration Guides
Server Metrics to KloudMate
Server Metrics to KloudMate with Host Metrics Receiver
10min
this guide provides instructions on gathering linux and windows server metrics using the opentelemetry host metrics receiver the host metrics receiver generates metrics about the host system from various sources it can also capture metrics on a per process basis for applications running within amazon ec2 instances, azure vms, or on premise servers this is intended to be used when the opentelemetry collector is deployed as an agent to ingest metrics into kloudmate prerequisites install the opentelemetry collector on the specific server that requires metric monitoring refer to the installing the opentelemetry collector guide for detailed instructions step 1 set up the host metrics receiver in the opentelemetry configuration file linux users open the file located at /etc/otelcol contrib/config yaml using your preferred text editor windows users create a new file called config yaml in the c \program files\opentelemetry collector folder you can use notepad or any text editor to do this 1\ in this configuration file, ensure the host metrics receiver is set up to collect and send metrics according to your specific requirements receivers hostmetrics collection interval 60s scrapers cpu metrics system cpu utilization enabled true load cpu average true memory metrics system memory utilization enabled true filesystem \# the below file system type only useful with aws ec2 metrics \# include fs types \# match type strict \# fs types \[ext3, ext4] metrics system filesystem usage enabled true system filesystem utilization enabled true disk {} network {} \#processes {} #applicable only on a linux server \# process metrics are optional, please enable if needed \#process \#metrics \#process cpu utilization \#enabled true \#process memory utilization \#enabled true \# mute various errors reading process metrics running locally in docker \#mute process all errors true please ensure that the configuration includes processes {} for linux systems, as this setting is not applicable or required for windows 2\ configure the processor part to detect resource information from the host and append or override the resource value in telemetry data with this information please choose one of the following options for configuration based on your provider (aws ec2, azure vm, or on premises server) server(can be on premise, non cloud, or cloud) processors batch send batch size 10000 timeout 30s resourcedetection detectors \[system] system resource attributes host name enabled true host id enabled true os type enabled false resource attributes \ key service name action insert from attribute host name aws ec2 optional to retrieve aws ec2 instance tags along with logs and metrics, you must associate an iam role with the ec2 instance that includes the ec2\ describetags policy the processor below needs to be added processors batch send batch size 10000 timeout 30s resourcedetection/ec2 detectors \["ec2"] ec2 tags \ ^tag1$ \ ^tag2$ \ ^label $ \ ^name$ resource attributes \ key service name action insert from attribute ec2 tag name \ key service instance id action insert from attribute host id azure virtual machines processors batch send batch size 10000 timeout 30s resourcedetection/azure detectors \["azure"] azure tags \ ^tag1$ \ ^tag2$ \ ^label $ \ ^name$ resource attributes \ key service name action insert from attribute azure vm name \ key service instance id action insert from attribute host id 3\ set up the kloudmate backend on the exporter part of the open telemetry configuration file and configure the pipeline exporters debug verbosity detailed otlphttp endpoint 'https //otel kloudmate com 4318' headers authorization xxxxxxxx # use the auth key service pipelines metrics receivers \[hostmetrics] processors \[batch, resourcedetection, resource] # apply the correct resourcedetection exporters \[debug, otlphttp] step 3 to restart and verify the status of the opentelemetry (otel) collector, follow these steps for linux execute the following commands sudo systemctl restart otelcol contrib sudo systemctl status otelcol contrib these commands will restart the otel collector and display its current status for windows open the services window press win + r win + r , type services msc , and press ok ok alternatively, search for "services" in the windows start menu in the services window, locate the "opentelemetry collector" service right click the service and select "restart " subsequently, monitor the metrics on the kloudmate dashboard and set up an alarm to receive notifications if the potential metrics for a specific application rise default hostmetrics metric description unit cpu system cpu time total seconds each logical cpu spent on each mode seconds disk system disk io disk bytes transferred bytes system disk io time time disk spent activated seconds system disk merged the number of disk reads/writes merged into single physical disk access operations count system disk operation time time spent in disk operations seconds system disk operations disk operations count count system disk pending operations the queue size of pending i/o operations count system disk weighted io time time disk spent activated multiplied by the queue length seconds load system cpu load average 15m average cpu load over 15 minutes {thread} system cpu load average 5m average cpu load over 5 minutes {thread} system cpu load average 1m average cpu load over 1 minute {thread} file system system filesystem inodes usage filesystem inodes used count system filesystem usage filesystem bytes used bytes memory system memory usage bytes of memory in use bytes network system network connections the number of connections count system network dropped the number of packets dropped count system network errors the number of errors encountered count system network io the number of bytes transmitted and received bytes system network packets the number of packets transferred count paging system paging faults the number of page faults count system paging operations the number of paging operations count system paging usage swap (unix) or pagefile (windows) usage bytes processes system processes count total number of processes in each state count system processes created total number of created processes count process process cpu time total cpu seconds broken down by different states seconds process disk io disk bytes transferred bytes process memory usage the amount of physical memory in use bytes process memory virtual virtual memory size bytes for full details on metrics, click here