Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Add default metrics supported by OpenCensus system metrics package #258

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mayurkale22
Copy link
Member

This updates: #225

|-------------------------------------------|-------|----------------------------|-----------------------------------------------------------------------------------------------|-----------------|
| system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode |
| system/processes/created | 1 | Int64 Cumulative | Total number of times a process was created. | Hostname |
| system/processes/running | 1 | Int64 Gauge | Total number of running processes. | Hostname |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add blocked process
system/processes/blocked, 1, Int64 Gauge, Number of processes blocked.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

| system/processes/created | 1 | Int64 Cumulative | Total number of times a process was created. | Hostname |
| system/processes/running | 1 | Int64 Gauge | Total number of running processes. | Hostname |
| system/disk/total | By | Int64 Gauge | The total available system disk space in bytes. | Hostname, Volume |
| system/disk/used | By | Int64 Gauge | The total used system disk space in bytes. | Hostname, Volume |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add memory related stats
system/memory/used
system/memory/total
system/memory/free
all of them are Int64 Gauges.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added.

| process/memory/rss | By | Int64 Gauge | Resident memory size in bytes. | Hostname |
| process/file_descriptor/max | 1 | Int64 Gauge | The maximum limit of file descriptor count. | Hostname |
| process/file_descriptor/open | 1 | Int64 Gauge | The number of open file descriptor count. | Hostname |
| process/start_time | s | Int64 Cumulative | The start time of the process since unix epoch in seconds. | Hostname |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has no meaning. As it will be constant. May be a wall-clock time would be better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, removed. Thx


| Metric Name | Unit | Type | Description | Labels |
|-------------------------------------------|-------|----------------------------|--------------------------------------------------------------------|-------------------------|
| system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rghetia can you add your idea about the idle/total/user label idea?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already included here but I would rephrase it differently.

system/cpu_seconds | s | Int64 Cumulative | System CPU in seconds | Hostname, Mode = { total, idle, system, nice, user, iowait, stolen}

Similarly other metrics can be redefined with common metric and possible Label and its values.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done.


| Metric Name | Unit | Type | Description | Labels |
|-------------------------------------------|-------|----------------------------|--------------------------------------------------------------------|-------------------------|
| system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is already included here but I would rephrase it differently.

system/cpu_seconds | s | Int64 Cumulative | System CPU in seconds | Hostname, Mode = { total, idle, system, nice, user, iowait, stolen}

Similarly other metrics can be redefined with common metric and possible Label and its values.


### Labels
The label keys associated with the above metrics.

| Label Key | Description |
|--------------------|----------------------------------------------------------------------------------------------------------|
| Mode | The amount of time spent by the CPU in state (i.e. `user, nice, system, idle, iowait`). |
| Mode | The amount of time spent by the CPU in state (i.e. `user, nice, system, idle, iowait, stolen`). |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the label value is related to metric it might be better to put that in the label column rather than here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Label is a combination of key and description, to avoid unnecessary duplication in metrics table I have added separate table for labels. Let me know if you still want me to change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants