/home/mip/mip/public/img/credit/datatables/pcp.tar
derived/cpu-util.conf000064400000002706151521027140010602 0ustar00# derived metrics for cpu utilization

kernel.cpu.util.user = (100 * rate(kernel.all.cpu.user)) / hinv.ncpu
kernel.cpu.util.user(oneline) = percentage of user time across all CPUs, including guest CPU time

kernel.cpu.util.nice = (100 * rate(kernel.all.cpu.nice)) / hinv.ncpu
kernel.cpu.util.nice(oneline) = percentage of nice user time across all CPUs, including guest nice CPU time

kernel.cpu.util.sys = (100 * rate(kernel.all.cpu.sys)) / hinv.ncpu
kernel.cpu.util.sys(oneline) = percentage of sys time across all CPUs

kernel.cpu.util.idle = (100 * rate(kernel.all.cpu.idle)) / hinv.ncpu
kernel.cpu.util.idle(oneline) = percentage of idle time across all CPUs

kernel.cpu.util.intr = (100 * rate(kernel.all.cpu.intr)) / hinv.ncpu
kernel.cpu.util.intr(oneline) = percentage of interrupt time across all CPUs
kernel.cpu.util.intr(helptext) = '\
Percentage of time spent processing interrupts across all CPUs.
This value includes both soft and hard interrupt processing time.'

kernel.cpu.util.wait = (100 * rate(kernel.all.cpu.wait.total)) / hinv.ncpu
kernel.cpu.util.wait(oneline) = percentage of wait time across all CPUs

kernel.cpu.util.steal = (100 * rate(kernel.all.cpu.steal)) / hinv.ncpu
kernel.cpu.util.steal(oneline) = percentage of virtualization CPU steal time across all CPUs
kernel.cpu.util.steal(helptext) = '\
Percentage of time across all CPUs when a CPU had a runnable process,
but the hypervisor (virtualisation layer) chose to run something else
instead.'
derived/mssql.conf000064400000005315151521027140010176 0ustar00#
# Copyright (c) 2019-2020, Red Hat.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# 
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
#
# Microsoft SQL server derived metrics
# These derived metrics complete calculation of those metrics requiring
# client-side computation using multiple base metrics from SQL Server.
#

mssql.buffer_manager.buffer_cache_hit_ratio = 100 * (mssql.buffer_manager.raw_buffer_cache_hit_ratio / mssql.buffer_manager.raw_buffer_cache_hit_ratio_base)
mssql.buffer_manager.buffer_cache_hit_ratio(oneline) = percentage of pages found in the buffer cache without reading from disk
mssql.buffer_manager.buffer_cache_hit_ratio(helptext) = '\
Ratio of raw_buffer_cache_hit_ratio over raw_buffer_cache_hit_ratio_base
as a percentage.'

mssql.databases.log_cache_hit_ratio = 100 * (mssql.databases.raw_log_cache_hit_ratio / mssql.databases.raw_log_cache_hit_ratio_base)
mssql.databases.log_cache_hit_ratio(oneline) = percentage of log cache reads satisfied from the log cache
mssql.databases.log_cache_hit_ratio(helptext) = '\
Ratio of raw_log_cache_hit_ratio over raw_log_cache_hit_ratio_base
as a percentage.'

mssql.latches.average_latch_wait_time = (mssql.latches.raw_average_latch_wait_time / mssql.latches.raw_average_latch_wait_time_base)
mssql.latches.average_latch_wait_time(oneline) = average delay associated with latch acquisition
mssql.latches.average_latch_wait_time(helptext) = '\
A latch is a short-term synchronization object that ensures data integrity
on objects in SQL Server memory.  A latch wait is a delay associated with
access to a latch, and may be caused by the I/O system not keeping up with
latch requests.'

mssql.locks.average_wait_time = (mssql.locks.raw_average_wait_time / mssql.locks.raw_average_wait_time_base)
mssql.locks.average_wait_time(oneline) = average delay associated with lock acquisition
mssql.locks.average_wait_time(helptext) = '\
Average lock wait time is aggregated time that processes spend waiting for
other processes to release a SQL Server lock.'

mssql.plan_cache.cache_hit_ratio = (mssql.plan_cache.raw_cache_hit_ratio / mssql.plan_cache.raw_cache_hit_ratio_base)
mssql.plan_cache.cache_hit_ratio(oneline) = percentage of plan cache reads satisfied from the plan cache
mssql.plan_cache.cache_hit_ratio(helptext) = '\
Ratio of raw_cache_hit_ratio over raw_cache_hit_ratio_base as a percentage.'
derived/denki.conf000064400000001537151521027140010133 0ustar00#
# Copyright (c) 2023, Red Hat.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
#
# Denki (power) derived metrics
#
denki.bat.energy_now_rate = rate(denki.bat.energy_now) * 3600
denki.bat.energy_now_rate(oneline) = Rate of charging/discharging the battery
denki.bat.energy_now_rate(helptext) = '\
The rate of charging/discharging the battery, computed from looking at the
current charge level of the battery over time.'
derived/iostat.conf000064400000066652151521027140010355 0ustar00#
# Copyright (C) 2016-2021 Red Hat.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# 
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#

#
# IOSTAT derived metrics (per-device for regular block devices)
# These derived metrics complement the disk.dev.* metrics tree.
# Note:
#	not all the base disk.dev.* metrics are available for some
#	platforms (e.g. *BSD systems), so the defined(x) predicates
#	are used to guard the expressions ... the guards are not
#       exhaustive and have been simplified to use the _least_ widely
#	available metrics, because if these are not in the PMNS then
#	the _more_ likely metrics won't be there
# Note:
#	we use disk.dev.read to provide the indom for disk.dev.await,
#	then chain all the remaining metadata off disk.dev.await
#

disk.dev.await = defined(disk.dev.total_rawactive) ? \
    (delta(disk.dev.total) == 0 ? \
	mkconst(0, meta=disk.dev.read, type=double, semantics=instant, units="millisec/count") \
	: delta(disk.dev.total_rawactive) / delta(disk.dev.total)) \
    : novalue(meta=disk.dev.read, type=double, semantics=instant, units="millisec/count")
disk.dev.await(oneline) = average time read and write requests queued and serviced
disk.dev.await(helptext) = '\
average time in milliseconds that read and write requests
were queued (and serviced) during the reporting interval.'

disk.dev.r_await = defined(disk.dev.read_rawactive) ? \
    (delta(disk.dev.read) == 0 ? \
	mkconst(0, meta=disk.dev.await) \
	: delta(disk.dev.read_rawactive) / delta(disk.dev.read)) \
    : novalue(meta=disk.dev.await)
disk.dev.r_await(oneline) = average time read requests queued and serviced 
disk.dev.r_await(helptext) = '\
average time in milliseconds that read requests were queued
(and serviced) during the reporting interval.'

disk.dev.w_await = defined(disk.dev.write_rawactive) ? \
    (delta(disk.dev.write) == 0 ? \
	mkconst(0, meta=disk.dev.await) \
	: delta(disk.dev.write_rawactive) / delta(disk.dev.write)) \
    : novalue(meta=disk.dev.await)
disk.dev.w_await(oneline) = average time write requests queued and serviced
disk.dev.w_await(helptext) = '\
average time in milliseconds that write requests were queued
(and serviced) during the reporting interval.'

disk.dev.d_await = defined(disk.dev.discard_rawactive) && defined(disk.dev.discard) ? \
    (delta(disk.dev.discard) == 0 ? \
	mkconst(0, meta=disk.dev.await) \
	: delta(disk.dev.discard_rawactive) / delta(disk.dev.discard)) \
    : novalue(meta=disk.dev.await)
disk.dev.d_await(oneline) = average time discard requests queued and serviced
disk.dev.d_await(helptext) = '\
average time in milliseconds that discard requests were queued
(and serviced) during the reporting interval.'

disk.dev.f_await = defined(disk.dev.flush_rawactive) && defined(disk.dev.flush) ? \
    (delta(disk.dev.flush) == 0 ? \
	mkconst(0, meta=disk.dev.await) \
	: delta(disk.dev.flush_rawactive) / delta(disk.dev.flush)) \
    : novalue(meta=disk.dev.await)
disk.dev.f_await(oneline) = average time flush requests queued and serviced
disk.dev.f_await(helptext) = '\
average time in milliseconds that flush requests were queued
(and serviced) during the reporting interval.'

disk.dev.avg_qlen = defined(disk.dev.read_rawactive) && defined(disk.dev.write_rawactive) ? \
    (rate(disk.dev.read_rawactive) + rate(disk.dev.write_rawactive)) \
    : novalue(meta=disk.dev.read, type=double, semantics=instant, units="")
disk.dev.avg_qlen(oneline) = average read and write queue length
disk.dev.avg_qlen(helptext) = '\
average read and write I/O queue length to the device during the reporting interval.'

disk.dev.avg_rqsz = (delta(disk.dev.read) + delta(disk.dev.write)) == 0 ? \
    mkconst(0, meta=disk.dev.read, type="double", semantics="instant", units="kbyte/count") \
    : rescale(delta(disk.dev.read_bytes) + delta(disk.dev.write_bytes), "kbyte") / (delta(disk.dev.read) + delta(disk.dev.write))
disk.dev.avg_rqsz(oneline) = average I/O request size for both reads and writes
disk.dev.avg_rqsz(helptext) = '\
average I/O request size for both reads and writes during the reporting interval.'

disk.dev.r_avg_rqsz = delta(disk.dev.read) == 0 ? \
    mkconst(0, meta=disk.dev.avg_rqsz) \
    : rescale(delta(disk.dev.read_bytes), "kbyte") / delta(disk.dev.read)
disk.dev.r_avg_rqsz(oneline) = average I/O request size for reads to the device
disk.dev.r_avg_rqsz(helptext) = '\
average I/O request size for reads to the device during the reporting interval.'

disk.dev.w_avg_rqsz = delta(disk.dev.write) == 0 ? \
    mkconst(0, meta=disk.dev.avg_rqsz) \
    : rescale(delta(disk.dev.write_bytes), "kbyte") / delta(disk.dev.write)
disk.dev.w_avg_rqsz(oneline) = average I/O request size for writes to the device
disk.dev.w_avg_rqsz(helptext) = '\
average I/O request size for writes to the device during the reporting interval.'

disk.dev.d_avg_rqsz = defined(disk.dev.discard_bytes) && defined(disk.dev.discard) ? \
    (delta(disk.dev.discard) == 0 ? \
	mkconst(0, meta=disk.dev.avg_rqsz) \
	: rescale(delta(disk.dev.discard_bytes), "kbyte") / delta(disk.dev.discard)) \
    : novalue(meta=disk.dev.avg_rqsz)
disk.dev.d_avg_rqsz(oneline) = average I/O request size for discards to the device
disk.dev.d_avg_rqsz(helptext) = '\
average I/O request size for discards to the device during the reporting interval.'

disk.dev.util = defined(disk.dev.avactive) ? \
    100 * rate(disk.dev.avactive) \
    : novalue(meta=disk.dev.read, type=double, semantics=instant, units="")
disk.dev.util(oneline) = percentage of time device was busy processing requests
disk.dev.util(helptext) = '\
The percentage of time during the reporting interval that the
device was busy processing requests (reads and writes). A value
of 100% indicates device saturation.'

#
# IOSTAT derived metrics (per dm device for device-mapper)
# These derived metrics complement the disk.dm.* metrics tree.
# Note:
#	none of the disk.dm.* metrics are available for some platforms
#	(e.g. *BSD systems), so the defined(disk.dm.read) predicate
#	is used to return novalue() in this case where we have no clue
#	as to any indom; otherwise this follows the pattern used for
#	the disk.dev metrics
#
disk.dm.await = defined(disk.dm.read) ? \
    (defined(disk.dm.total_rawactive) ? \
	(delta(disk.dm.total) == 0 ? \
	    mkconst(0, meta=disk.dm.read, type=double, semantics=instant, units="millisec/count") \
	    : delta(disk.dm.total_rawactive) / delta(disk.dm.total)) \
	: novalue(meta=disk.dm.read, type=double, semantics=instant, units="millisec/count")) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.dm.await(oneline) = average time read and write requests queued and serviced
disk.dm.await(helptext) = '\
average time in milliseconds that read and write requests
were queued (and serviced) to the device-mapper logical
device during the reporting interval.'

disk.dm.r_await = defined(disk.dm.read) ? \
    (defined(disk.dm.read_rawactive) ? \
	(delta(disk.dm.read) == 0 ? \
	    mkconst(0, meta=disk.dm.await) \
	    : delta(disk.dm.read_rawactive) / delta(disk.dm.read)) \
	: novalue(meta=disk.dm.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.dm.r_await(oneline) = average time read requests queued and serviced
disk.dm.r_await(helptext) = '\
average time in milliseconds that read requests were queued
(and serviced) to the device-mapper logical device during
the reporting interval.'

disk.dm.w_await = defined(disk.dm.read) ? \
    (defined(disk.dm.write_rawactive) ? \
	(delta(disk.dm.write) == 0 ? \
	    mkconst(0, meta=disk.dm.await) \
	    : delta(disk.dm.write_rawactive) / delta(disk.dm.write)) \
	: novalue(meta=disk.dm.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.dm.w_await(oneline) = average time write requests queued and serviced
disk.dm.w_await(helptext) = '\
average time in milliseconds that write requests were queued
(and serviced) to the device-mapper logical device during
the reporting interval.'

disk.dm.d_await = defined(disk.dm.read) ? \
    (defined(disk.dm.discard_rawactive) && defined(disk.dm.discard) ? \
	(delta(disk.dm.discard) == 0 ? \
	    mkconst(0, meta=disk.dm.await) \
	    : delta(disk.dm.discard_rawactive) / delta(disk.dm.discard)) \
	: novalue(meta=disk.dm.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.dm.d_await(oneline) = average time discard requests queued and serviced
disk.dm.d_await(helptext) = '\
average time in milliseconds that discard requests were queued
(and serviced) to the device-mapper logical device during
the reporting interval.'

disk.dm.f_await = defined(disk.dm.read) ? \
    (defined(disk.dm.flush_rawactive) && defined(disk.dm.flush) ? \
	(delta(disk.dm.flush) == 0 ? \
	    mkconst(0, meta=disk.dm.await) \
	    : delta(disk.dm.flush_rawactive) / delta(disk.dm.flush)) \
	: novalue(meta=disk.dm.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.dm.f_await(oneline) = average time flush requests queued and serviced
disk.dm.f_await(helptext) = '\
average time in milliseconds that flush requests were queued
(and serviced) to the device-mapper logical device during
the reporting interval.'

disk.dm.avg_qlen = defined(disk.dm.read) ? \
    (defined(disk.dm.read_rawactive)  && defined(disk.dm.write_rawactive)? \
	(rate(disk.dm.read_rawactive) + rate(disk.dm.write_rawactive)) \
	: novalue(meta=disk.dm.read, type=double, semantics=instant, units="")) \
    : novalue(type=double, semantics=instant, units="")
disk.dm.avg_qlen(oneline) = average read and write queue length
disk.dm.avg_qlen(helptext) = '\
average read and write I/O queue length to the device-mapper logical
device during the reporting interval.'

disk.dm.avg_rqsz = defined(disk.dm.read) ? \
    (defined(disk.dm.read_bytes) ? \
	(delta(disk.dm.read) + delta(disk.dm.write) == 0 ? \
	    mkconst(0, meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.dm.read_bytes) + delta(disk.dm.write_bytes), "kbyte") / (delta(disk.dm.read) + delta(disk.dm.write))) \
	: novalue(meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.dm.avg_rqsz(oneline) = average I/O request size for reads and writes to the device
disk.dm.avg_rqsz(helptext) = '\
average I/O request size for reads and writes to the device-mapper logical
device during the reporting interval.'

disk.dm.r_avg_rqsz = defined(disk.dm.read) ? \
    (defined(disk.dm.read_bytes) ? \
	(delta(disk.dm.read) == 0 ? \
	    mkconst(0, meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.dm.read_bytes), "kbyte") / delta(disk.dm.read)) \
	: novalue(meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.dm.r_avg_rqsz(oneline) = average I/O request size for reads to the device
disk.dm.r_avg_rqsz(helptext) = '\
average I/O request size for reads to the device-mapper logical device
during the reporting interval.'

disk.dm.w_avg_rqsz = defined(disk.dm.read) ? \
    (defined(disk.dm.write_bytes) ? \
	(delta(disk.dm.write) == 0 ? \
	    mkconst(0, meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.dm.write_bytes), "kbyte") / delta(disk.dm.write)) \
	: novalue(meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.dm.w_avg_rqsz(oneline) = average I/O request size for writes to the device
disk.dm.w_avg_rqsz(helptext) = '\
average I/O request size for writes to the device-mapper logical device
during the reporting interval.'

disk.dm.d_avg_rqsz = defined(disk.dm.read) ? \
    (defined(disk.dm.discard_bytes) && defined(disk.dm.discard) ? \
	(delta(disk.dm.discard) == 0 ? \
	    mkconst(0, meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.dm.discard_bytes), "kbyte") / delta(disk.dm.discard)) \
	: novalue(meta=disk.dm.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.dm.d_avg_rqsz(oneline) = average I/O request size for discards to the device
disk.dm.d_avg_rqsz(helptext) = '\
average I/O request size for discards to the device-mapper logical device
during the reporting interval.'

disk.dm.util = defined(disk.dm.read) ? \
    (defined(disk.dm.avactive) ? \
	(100 * rate(disk.dm.avactive)) \
	: novalue(meta=disk.dm.read, type="double", semantics="instant", units="")) \
    : novalue(type="double", semantics="instant", units="")
disk.dm.util(oneline) = percentage of time device was busy processing requests
disk.dm.util(helptext) = '\
The percentage of time during the reporting interval that the
device-mapper logical device was busy processing requests (reads
and writes). A value of 100% indicates device saturation.'

#
# IOSTAT derived metrics (per md device for multiple devices)
# These derived metrics complement the disk.md.* metrics tree.
# Note:
#	none of the disk.md.* metrics are available for some platforms
#	(e.g. *BSD systems), so the defined(disk.md.read) predicate
#	is used to return novalue() in this case where we have no clue
#	as to any indom; otherwise this follows the pattern used for
#	the disk.dev metrics
#
disk.md.await = defined(disk.md.read) ? \
    (defined(disk.md.total_rawactive) ? \
	(delta(disk.md.total) == 0 ? \
	    mkconst(0, meta=disk.md.read, type=double, semantics=instant, units="millisec/count") \
	    : delta(disk.md.total_rawactive) / delta(disk.md.total)) \
	: novalue(meta=disk.md.read, type=double, semantics=instant, units="millisec/count")) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.md.await(oneline) = average time read and write requests queued and serviced
disk.md.await(helptext) = '\
average time in milliseconds that read and write requests
were queued (and serviced) to the per-multi-device logical
device during the reporting interval.'

disk.md.r_await = defined(disk.md.read) ? \
    (defined(disk.md.read_rawactive) ? \
	(delta(disk.md.read) == 0 ? \
	    mkconst(0, meta=disk.md.await) \
	    : delta(disk.md.read_rawactive) / delta(disk.md.read)) \
	: novalue(meta=disk.md.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.md.r_await(oneline) = average time read requests queued and serviced
disk.md.r_await(helptext) = '\
average time in milliseconds that read requests were queued
(and serviced) to the per-multi-device logical device during
the reporting interval.'

disk.md.w_await = defined(disk.md.read) ? \
    (defined(disk.md.write_rawactive) ? \
	(delta(disk.md.write) == 0 ? \
	    mkconst(0, meta=disk.md.await) \
	    : delta(disk.md.write_rawactive) / delta(disk.md.write)) \
	: novalue(meta=disk.md.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.md.w_await(oneline) = average time write requests queued and serviced
disk.md.w_await(helptext) = '\
average time in milliseconds that write requests were queued
(and serviced) to the per-multi-device logical device during
the reporting interval.'

disk.md.d_await = defined(disk.md.read) ? \
    (defined(disk.md.discard_rawactive) && defined(disk.md.discard) ? \
	(delta(disk.md.discard) == 0 ? \
	    mkconst(0, meta=disk.md.await) \
	    : delta(disk.md.discard_rawactive) / delta(disk.md.discard)) \
	: novalue(meta=disk.md.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.md.d_await(oneline) = average time discard requests queued and serviced
disk.md.d_await(helptext) = '\
average time in milliseconds that discard requests were queued
(and serviced) to the per-multi-device logical device during
the reporting interval.'

disk.md.f_await = defined(disk.md.read) ? \
    (defined(disk.md.flush_rawactive) && defined(disk.md.flush) ? \
	(delta(disk.md.flush) == 0 ? \
	    mkconst(0, meta=disk.md.await) \
	    : delta(disk.md.flush_rawactive) / delta(disk.md.flush)) \
	: novalue(meta=disk.md.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.md.f_await(oneline) = average time flush requests queued and serviced
disk.md.f_await(helptext) = '\
average time in milliseconds that flush requests were queued
(and serviced) to the per-multi-device logical device during
the reporting interval.'

disk.md.avg_qlen = defined(disk.md.read) ? \
    (defined(disk.md.write_rawactive)  && defined(disk.md.write_rawactive)? \
	(rate(disk.md.read_rawactive) + rate(disk.md.write_rawactive)) \
	: mkconst(0, meta=disk.md.read, type=double, semantics=instant, units="")) \
    : novalue(type=double, semantics=instant, units="")
disk.md.avg_qlen(oneline) = average read and write queue length
disk.md.avg_qlen(helptext) = '\
average read and write I/O queue length to the per-multi-device logical
device during the reporting interval.'

disk.md.avg_rqsz = defined(disk.md.read) ? \
    (defined(disk.md.read_bytes) ? \
	(delta(disk.md.read) + delta(disk.md.write)) == 0 ? \
	    mkconst(0, meta=disk.md.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.md.read_bytes) + delta(disk.md.write_bytes), "kbyte") / (delta(disk.md.read) + delta(disk.md.write)) \
	: novalue(meta=disk.md.read, type="double", semantics="instant", units=" kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.md.avg_rqsz(oneline) = average I/O request size for reads and writes to the device
disk.md.avg_rqsz(helptext) = '\
average I/O request size for reads and writes to the per-multi-device logical
device during the reporting interval.'

disk.md.r_avg_rqsz = defined(disk.md.read) ? \
    (defined(disk.md.read_bytes) ? \
	(delta(disk.md.read) == 0 ? \
	    mkconst(0, meta=disk.md.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.md.read_bytes), "kbyte") / delta(disk.md.read)) \
	: novalue(meta=disk.md.read, type="double", semantics="instant", units=" kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.md.r_avg_rqsz(oneline) = average I/O request size for reads to the device
disk.md.r_avg_rqsz(helptext) = '\
average I/O request size for reads to the per-multi-device logical device
during the reporting interval.'

disk.md.w_avg_rqsz = defined(disk.md.read) ? \
    (defined(disk.md.write_bytes) ? \
	(delta(disk.md.write) == 0 ? \
	    mkconst(0, meta=disk.md.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.md.write_bytes), "kbyte") / delta(disk.md.write)) \
	: novalue(meta=disk.md.read, type="double", semantics="instant", units=" kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.md.w_avg_rqsz(oneline) = average I/O request size for writes to the device
disk.md.w_avg_rqsz(helptext) = '\
average I/O request size for writes to the per-multi-device logical device
during the reporting interval.'

disk.md.d_avg_rqsz = defined(disk.md.read) ? \
    (defined(disk.md.discard_bytes) && defined(disk.md.discard) ? \
	(delta(disk.md.discard) == 0 ? \
	    mkconst(0, meta=disk.md.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.md.discard_bytes), "kbyte") / delta(disk.md.discard)) \
	: novalue(meta=disk.md.read, type="double", semantics="instant", units=" kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.md.d_avg_rqsz(oneline) = average I/O request size for discards to the device
disk.md.d_avg_rqsz(helptext) = '\
average I/O request size for discards to the per-multi-device logical device
during the reporting interval.'

disk.md.util = defined(disk.md.read) ? \
    (defined(disk.md.avactive) ? \
	(100 * rate(disk.md.avactive)) \
	: novalue(meta=disk.md.read, type="double", semantics="instant", units="")) \
    : novalue(type="double", semantics="instant", units="")
disk.md.util(oneline) = percentage of time device was busy processing requests
disk.md.util(helptext) = '\
The percentage of time during the reporting interval that the
per-multi-device logical device was busy processing requests
(reads and writes). A value of 100% indicates device saturation.'

#
# IOSTAT derived metrics (per wwid device for aggregated multipath statistics)
# These derived metrics complement the disk.wwid.* metrics tree.
# Note:
#	none of the disk.wwid.* metrics are available for some platforms
#	(e.g. *BSD systems), so the defined(disk.wwid.read) predicate
#	is used to return novalue() in this case where we have no clue
#	as to any indom; otherwise this follows the pattern used for
#	the disk.dev metrics
#
disk.wwid.await = defined(disk.wwid.read) ? \
    (defined(disk.wwid.total_rawactive) ? \
	(delta(disk.wwid.total) == 0 ? \
	    mkconst(0, meta=disk.wwid.read, type=double, semantics=instant, units="millisec/count") \
	    : delta(disk.wwid.total_rawactive) / delta(disk.wwid.total)) \
	: novalue(type=double, semantics=instant, units="millisec/count")) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.wwid.await(oneline) = average time read and write requests queued and serviced
disk.wwid.await(helptext) = '\
average time in milliseconds that read and write requests
were queued (and serviced) during the reporting interval.'

disk.wwid.r_await = defined(disk.wwid.read) ? \
    (defined(disk.wwid.read_rawactive) ? \
	(delta(disk.wwid.read) == 0 ? \
	    mkconst(0, meta=disk.wwid.await) \
	    : delta(disk.wwid.read_rawactive) / delta(disk.wwid.read)) \
	: novalue(meta=disk.wwid.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.wwid.r_await(oneline) = average time read requests queued and serviced 
disk.wwid.r_await(helptext) = '\
average time in milliseconds that read requests were queued
(and serviced) during the reporting interval.'

disk.wwid.w_await = defined(disk.wwid.read) ? \
    (defined(disk.wwid.write_rawactive) ? \
	(delta(disk.wwid.write) == 0 ? \
	    mkconst(0, meta=disk.wwid.await) \
	    : delta(disk.wwid.write_rawactive) / delta(disk.wwid.write)) \
	: novalue(meta=disk.wwid.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.wwid.w_await(oneline) = average time write requests queued and serviced
disk.wwid.w_await(helptext) = '\
average time in milliseconds that write requests were queued
(and serviced) during the reporting interval.'

disk.wwid.d_await = defined(disk.wwid.read) ? \
    (defined(disk.wwid.discard_rawactive) && defined(disk.wwid.discard) ? \
	(delta(disk.wwid.discard) == 0 ? \
	    mkconst(0, meta=disk.wwid.await) \
	    : delta(disk.wwid.discard_rawactive) / delta(disk.wwid.discard)) \
	: novalue(meta=disk.wwid.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.wwid.d_await(oneline) = average time discard requests queued and serviced
disk.wwid.d_await(helptext) = '\
average time in milliseconds that discard requests were queued
(and serviced) during the reporting interval.'

disk.wwid.f_await = defined(disk.wwid.read) ? \
    (defined(disk.wwid.flush_rawactive) && defined(disk.wwid.flush) ? \
	(delta(disk.wwid.flush) == 0 ? \
	    mkconst(0, meta=disk.wwid.await) \
	    : delta(disk.wwid.flush_rawactive) / delta(disk.wwid.flush)) \
	: novalue(meta=disk.wwid.await)) \
    : novalue(type=double, semantics=instant, units="millisec/count")
disk.wwid.f_await(oneline) = average time flush requests queued and serviced
disk.wwid.f_await(helptext) = '\
average time in milliseconds that flush requests were queued
(and serviced) during the reporting interval.'

disk.wwid.avg_qlen = defined(disk.wwid.read) ? \
    (defined(disk.wwid.read_rawactive) && defined(disk.wwid.write_rawactive) ? \
	(rate(disk.wwid.read_rawactive) + rate(disk.wwid.write_rawactive)) \
	: mkconst(0, meta=disk.wwid.read, type=double, semantics=instant, units="")) \
    : novalue(type=double, semantics=instant, units="")
disk.wwid.avg_qlen(oneline) = average read and write queue length
disk.wwid.avg_qlen(helptext) = '\
average read and write I/O queue length to the device during the reporting interval.'

disk.wwid.avg_rqsz = defined(disk.wwid.read) ? \
    (defined(disk.wwid.read_bytes) ? \
	(delta(disk.wwid.read) + delta(disk.wwid.write) == 0 ? \
	    mkconst(0, meta=disk.wwid.read, type="double", semantics="instant", units="kbyte / count") \
	    : rescale(delta(disk.wwid.read_bytes) + delta(disk.wwid.write_bytes), "kbyte") / (delta(disk.wwid.read) + delta(disk.wwid.write))) \
	: novalue(meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.wwid.avg_rqsz(oneline) = average I/O request size for both reads and writes
disk.wwid.avg_rqsz(helptext) = '\
average I/O request size for both reads and writes during the reporting interval.'

disk.wwid.r_avg_rqsz = defined(disk.wwid.read) ? \
    (defined(disk.wwid.read_bytes) ? \
	(delta(disk.wwid.read) == 0 ? \
	    mkconst(0, meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.wwid.read_bytes), "kbyte") / delta(disk.wwid.read)) \
	: novalue(meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.wwid.r_avg_rqsz(oneline) = average I/O request size for reads to the device
disk.wwid.r_avg_rqsz(helptext) = '\
average I/O request size for reads to the device during the reporting interval.'

disk.wwid.w_avg_rqsz = defined(disk.wwid.read) ? \
    (defined(disk.wwid.write_bytes) ? \
	(delta(disk.wwid.write) == 0 ? \
	    mkconst(0, meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.wwid.write_bytes), "kbyte") / delta(disk.wwid.write)) \
	: novalue(meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.wwid.w_avg_rqsz(oneline) = average I/O request size for writes to the device
disk.wwid.w_avg_rqsz(helptext) = '\
average I/O request size for writes to the device during the reporting interval.'

disk.wwid.d_avg_rqsz = defined(disk.wwid.read) ? \
    (defined(disk.wwid.discard_bytes) && defined(disk.wwid.discard) ? \
	(delta(disk.wwid.discard) == 0 ? \
	    mkconst(0, meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count") \
	    : rescale(delta(disk.wwid.discard_bytes), "kbyte") / delta(disk.wwid.discard)) \
	: novalue(meta=disk.wwid.read, type="double", semantics="instant", units="kbyte/count")) \
    : novalue(type="double", semantics="instant", units="kbyte/count")
disk.wwid.d_avg_rqsz(oneline) = average I/O request size for discards to the device
disk.wwid.d_avg_rqsz(helptext) = '\
average I/O request size for discards to the device during the reporting interval.'

disk.wwid.util = defined(disk.wwid.read) ? \
    (defined(disk.wwid.avactive) ? \
	(100 * rate(disk.wwid.avactive)) \
	: novalue(meta=disk.wwid.read, type="double", semantics="instant", units="")) \
    : novalue(type="double", semantics="instant", units="")
disk.wwid.util(oneline) = percentage of time device was busy processing requests
disk.wwid.util(helptext) = '\
The percentage of time during the reporting interval that the
device was busy processing requests (reads and writes). A value
of 100% indicates device saturation.'
derived/openmetrics.conf000064400000002424151521027140011365 0ustar00#
# Copyright (c) 2024, Red Hat.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
# 
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
#
# OpenMetrics derived metrics
# These derived metrics complete calculation of those metrics requiring
# client-side computation using multiple base metrics from OpenMetrics.
#

openmetrics.grafana.go_memstats_last_gc_since_start_time_seconds = ( openmetrics.grafana.go_memstats_last_gc_time_seconds - openmetrics.grafana.process_start_time_seconds)
openmetrics.grafana.go_memstats_last_gc_since_start_time_seconds(oneline) = Number of seconds since start time of last garbage collection
openmetrics.grafana.go_memstats_last_gc_since_start_time_seconds(helptext) = '\
Difference of go_memstats_last_gc_time_seconds and process_start_time.
Difference of the number of seconds since unix epoch of last garbage
collection and of the start time of the process since unix epoch.'
derived/proc.conf000064400000003575151521027140010010 0ustar00# derived metrics for processes

# metrics to provide additional process details
proc.psinfo.age = kernel.all.uptime - proc.psinfo.start_time
proc.psinfo.age(oneline) = time in seconds since process was started
proc.psinfo.age(helptext) = '\
time in seconds since process was started, calculated from
proc.psinfo.start_time subtracted from kernel.all.uptime.'

proc.io.total_bytes = instant(proc.io.read_bytes) + instant(proc.io.write_bytes) - instant(proc.io.cancelled_write_bytes)
proc.io.total_bytes(oneline) = total bytes read and written by process
proc.io.total_bytes(helptext) = '\
total bytes read and written by the process, less cancelled written bytes.'

# metrics to identify resource hogs
proc.hog.cpu = 100 * (rate(proc.psinfo.utime) + rate(proc.psinfo.stime)) / (kernel.all.uptime - proc.psinfo.start_time)
proc.hog.cpu(oneline) = average percentage CPU utilization of each process
proc.hog.cpu(helptext) = '\
average CPU utilization of each process expressed as a percentage
of time since the process started.'

proc.hog.mem = proc.memory.vmrss + proc.memory.vmswap
proc.hog.mem(oneline) = sum of resident and swapped memory used by the process
proc.hog.mem(helptext) = '\
amount of resident and swapped memory used by each process.'

proc.hog.disk = (rate(proc.io.read_bytes) + rate(proc.io.write_bytes) - rate(proc.io.cancelled_write_bytes)) / (kernel.all.uptime - proc.psinfo.start_time)
proc.hog.disk(oneline) = average I/O rate of each process since it was started
proc.hog.disk(helptext) = '\
average I/O rate (reads and writes less cancelled writes) of each process
since it was started.'

proc.hog.net = rate(bpf.proc.net.tcp.recv.bytes) + rate(bpf.proc.net.tcp.send.bytes) + rate(bpf.proc.net.udp.recv.bytes) + rate(bpf.proc.net.udp.send.bytes)
proc.hog.net(oneline) = sum of network usage by the process
proc.hog.net(helptext) = '\
sum of network usage (TCP/UDP recv/send) by each process.'